:root{
  --bg:#eef1f2;--paper:#f8faf9;--ink:#0b1620;--muted:#64707a;--line:#c9d0d3;
  --navy:#102938;--cyan:#42c6d7;--green:#4aa67b;--amber:#d89929;--red:#c64e43;--deep-red:#8f2f2c;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,select{font:inherit}.top-rule{height:5px;background:var(--cyan)}
.site-header{height:82px;display:flex;align-items:center;justify-content:space-between;padding:0 4vw;background:var(--paper);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.brand{display:flex;gap:12px;align-items:center;color:inherit;text-decoration:none}.brand-mark{width:38px;height:38px;display:grid;place-items:center;background:var(--navy);color:white;font-weight:900;font-size:21px}.brand strong,.brand small{display:block}.brand strong{font-size:16px;letter-spacing:.16em}.brand small{font-size:9px;letter-spacing:.13em;color:var(--muted);margin-top:2px}.header-actions{display:flex;align-items:center;gap:22px}.source-state{font-size:10px;letter-spacing:.12em;font-weight:800;color:var(--muted)}.source-state.live{color:var(--green)}.source-state.fallback{color:var(--amber)}.text-button{border:0;background:none;font-size:11px;letter-spacing:.12em;font-weight:800;cursor:pointer;color:var(--ink)}
main{max-width:1480px;margin:0 auto}.hero-grid{display:grid;grid-template-columns:1.25fr .75fr;min-height:390px;border-left:1px solid var(--line);border-right:1px solid var(--line)}.station-heading{padding:72px 5vw 50px;background:var(--paper)}.eyebrow{font-size:10px;letter-spacing:.18em;font-weight:900;color:var(--muted);margin-bottom:16px}.station-line{display:flex;justify-content:space-between;align-items:flex-end;gap:30px}.station-heading h1{font-size:clamp(50px,7vw,110px);line-height:.88;letter-spacing:-.06em;margin:0;text-transform:uppercase;max-width:900px}.station-heading p{font-size:17px;letter-spacing:.15em;font-weight:800;color:var(--muted);margin:22px 0 0}.square-button{width:52px;height:52px;border:1px solid var(--ink);background:transparent;border-radius:0;font-size:23px;cursor:pointer}.status-block{padding:54px 48px;color:white;display:flex;flex-direction:column;justify-content:space-between;background:var(--navy)}.status-block.watch{background:#86611e}.status-block.alert{background:var(--red)}.status-block.evacuation{background:var(--deep-red)}.status-meta{display:flex;justify-content:space-between;gap:16px;font-size:10px;letter-spacing:.13em;font-weight:900}.level-row{display:flex;align-items:flex-end;gap:10px}.height-value{font-size:clamp(80px,8vw,136px);font-weight:900;line-height:.8;letter-spacing:-.07em}.height-unit{font-size:30px;font-weight:800;margin-bottom:8px}.variation-line{border-top:1px solid rgba(255,255,255,.35);padding-top:18px;display:flex;justify-content:space-between;gap:12px}.variation-line strong{font-size:20px}.variation-line span{font-size:11px;text-transform:uppercase;letter-spacing:.12em;align-self:center}
.threshold-section{background:var(--paper);border:1px solid var(--line);padding:48px 5vw 54px}.section-head{display:flex;justify-content:space-between;gap:60px;align-items:flex-end}.section-head h2{font-size:clamp(26px,3vw,45px);margin:0;letter-spacing:-.035em}.section-head p{max-width:560px;margin:0;color:var(--muted);line-height:1.55}.meter-wrap{margin-top:54px}.meter-track{height:12px;background:#dce2e4;position:relative}.meter-fill{height:100%;background:var(--navy);width:0}.meter-marker{position:absolute;top:-10px;height:32px;width:2px;background:var(--ink)}.meter-marker span{position:absolute;top:38px;font-size:9px;letter-spacing:.12em;font-weight:900;white-space:nowrap;transform:translateX(-50%)}.meter-marker.current{background:var(--cyan);width:4px}.meter-marker.alert{background:var(--amber)}.meter-marker.evacuation{background:var(--red)}.meter-values{display:flex;justify-content:space-between;margin-top:42px;font-size:12px;font-weight:900;letter-spacing:.08em}
.content-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(320px,.5fr);border-left:1px solid var(--line);border-right:1px solid var(--line)}.panel{background:var(--paper);padding:44px 5vw;border-bottom:1px solid var(--line)}.history-panel{border-right:1px solid var(--line)}.panel-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:30px}.panel h3{font-size:26px;margin:0;letter-spacing:-.03em}.history-tools{display:flex;flex-direction:column;align-items:flex-end;gap:11px}.history-tools>span{font-size:10px;color:var(--muted);font-weight:800;letter-spacing:.1em}.range-switch{display:flex;border:1px solid var(--line)}.range-button{border:0;border-right:1px solid var(--line);border-radius:0;background:transparent;padding:9px 11px;font-size:9px;letter-spacing:.08em;font-weight:900;cursor:pointer;color:var(--muted)}.range-button:last-child{border-right:0}.range-button.active{background:var(--navy);color:white}.chart-wrap{height:360px;margin-top:30px;position:relative;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}#historyChart{width:100%;height:100%;overflow:visible}.chart-empty{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-size:13px;text-align:center;padding:20px}.chart-grid{stroke:#d5dcde;stroke-width:1;vector-effect:non-scaling-stroke}.chart-axis,.chart-date{font-size:10px;fill:#64707a;font-weight:700;letter-spacing:.02em}.chart-area{fill:#b7d9df;opacity:.44}.chart-reading{fill:none;stroke:#102938;stroke-width:3.5;vector-effect:non-scaling-stroke}.chart-dot{fill:#102938;stroke:#f8faf9;stroke-width:1.5;vector-effect:non-scaling-stroke}.chart-dot.current{fill:#42c6d7;stroke:#102938;stroke-width:2}.chart-threshold{stroke-width:2;stroke-dasharray:8 6;vector-effect:non-scaling-stroke}.chart-threshold.alert{stroke:#d89929}.chart-threshold.evacuation{stroke:#c64e43}.chart-threshold-label{font-size:9px;font-weight:900;letter-spacing:.08em}.chart-threshold-label.alert{fill:#a76912}.chart-threshold-label.evacuation{fill:#a23c34}.chart-legend{display:flex;gap:22px;margin-top:14px;font-size:9px;letter-spacing:.1em;font-weight:900;color:var(--muted)}.chart-legend span{display:flex;align-items:center;gap:7px}.legend-line{width:22px;height:2px;background:var(--navy);display:inline-block}.legend-line.alert{background:var(--amber)}.legend-line.evacuation{background:var(--red)}
.side-panel{padding:0}.port-data,.alert-panel-section{padding:42px}.port-data{border-bottom:1px solid var(--line)}.port-data h3{font-size:32px;text-transform:uppercase;margin-bottom:28px}.detail-list{margin:0}.detail-list>div{display:grid;grid-template-columns:1fr;gap:4px;padding:12px 0;border-top:1px solid var(--line)}.detail-list dt{font-size:8px;letter-spacing:.13em;font-weight:900;color:var(--muted)}.detail-list dd{margin:0;font-size:12px;font-weight:750;line-height:1.4}.source-link{display:inline-flex;margin-top:22px;color:var(--ink);text-decoration:none;font-size:10px;letter-spacing:.11em;font-weight:900;border-bottom:1px solid var(--ink);padding-bottom:3px}.alert-panel-section h3{margin-bottom:26px}.switch-row{display:flex;justify-content:space-between;gap:24px;align-items:center;padding:18px 0;border-top:1px solid var(--line);cursor:pointer}.switch-row strong,.switch-row small{display:block}.switch-row strong{font-size:13px}.switch-row small{font-size:11px;color:var(--muted);margin-top:5px;line-height:1.4}.switch-row input{display:none}.switch-row i{width:42px;height:22px;border:1px solid var(--ink);position:relative;flex:none}.switch-row i:after{content:"";position:absolute;width:14px;height:14px;left:3px;top:3px;background:var(--muted);transition:.2s}.switch-row input:checked+i:after{left:23px;background:var(--cyan)}.primary-button{width:100%;border:0;border-radius:0;background:var(--navy);color:white;padding:16px 18px;font-size:11px;letter-spacing:.12em;font-weight:900;cursor:pointer;margin-top:24px}.fineprint{font-size:10px;line-height:1.5;color:var(--muted)}
.stations-section{background:var(--paper);border:1px solid var(--line);border-top:0;padding:52px 5vw 70px}.stations-head{align-items:flex-end}.filters{display:flex;gap:10px}.filters input,.filters select,.setup-card input{border:1px solid var(--line);border-radius:0;background:white;padding:13px 14px;font-size:11px;font-weight:700;letter-spacing:.05em;outline:none}.filters input{min-width:290px}.station-table-wrap{overflow:auto;margin-top:32px;border-top:2px solid var(--ink)}.station-table{width:100%;border-collapse:collapse;min-width:1050px}.station-table th{text-align:left;font-size:9px;letter-spacing:.13em;padding:13px 10px;color:var(--muted);border-bottom:1px solid var(--line)}.station-table td{padding:16px 10px;border-bottom:1px solid var(--line);font-size:12px;font-weight:700}.station-table tr{cursor:pointer}.station-table tbody tr:hover,.station-table tbody tr.selected-row{background:#edf4f5}.station-table tbody tr.selected-row td:first-child{box-shadow:inset 4px 0 0 var(--cyan)}.station-table .state-pill{font-size:9px;letter-spacing:.1em}.positive{color:#b56f11}.negative{color:#3f7f65}.danger{color:var(--red)}
footer{max-width:1480px;margin:0 auto 50px;padding:28px 4vw;display:flex;justify-content:space-between;gap:30px;color:var(--muted);font-size:10px;line-height:1.5}footer p{max-width:820px;margin:0}footer a{color:var(--ink);text-decoration:none;font-weight:900;letter-spacing:.08em}
.setup-dialog{width:min(720px,calc(100vw - 30px));border:0;border-radius:0;padding:0;background:transparent}.setup-dialog::backdrop{background:rgba(5,15,21,.75);backdrop-filter:blur(3px)}.setup-card{background:var(--paper);padding:42px;position:relative;border-top:5px solid var(--cyan)}.setup-card h2{font-size:42px;letter-spacing:-.045em;margin:0 0 10px}.setup-card>p{color:var(--muted);line-height:1.5}.dialog-close{position:absolute;right:18px;top:16px;border:0;background:none;font-size:30px;cursor:pointer}.setup-card>input{width:100%;margin:18px 0 10px}.dialog-list{height:240px;overflow:auto;border:1px solid var(--line);background:white}.dialog-item{display:flex;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--line);cursor:pointer;font-size:12px}.dialog-item:hover,.dialog-item.selected{background:#e4f2f4}.dialog-item small{color:var(--muted)}.dialog-prefs{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;padding:20px 0 0;font-size:12px}.dialog-prefs label{padding:7px 0}
@media(max-width:1040px){.content-grid{grid-template-columns:1fr}.history-panel{border-right:0}.side-panel{display:grid;grid-template-columns:1fr 1fr}.port-data{border-bottom:0;border-right:1px solid var(--line)}}
@media(max-width:900px){.hero-grid{grid-template-columns:1fr}.station-heading{padding:54px 28px}.status-block{min-height:300px;padding:40px 28px}.section-head,.stations-head,.panel-heading{align-items:flex-start;flex-direction:column;gap:20px}.history-tools{align-items:flex-start;width:100%}.range-switch{max-width:100%;overflow:auto}.threshold-section,.panel,.stations-section{padding-left:28px;padding-right:28px}.side-panel{padding:0;display:block}.port-data,.alert-panel-section{padding:36px 28px}.port-data{border-right:0;border-bottom:1px solid var(--line)}.filters{width:100%;flex-direction:column}.filters input{min-width:0;width:100%}.header-actions .source-state{display:none}.site-header{padding:0 20px}.station-heading h1{font-size:52px}.dialog-prefs{grid-template-columns:1fr}.chart-wrap{height:300px}footer{flex-direction:column;padding:25px 28px}}
@media(max-width:620px){.header-actions{gap:10px}.header-actions .text-button:first-of-type{display:none}.station-heading h1{font-size:44px}.setup-card{padding:34px 24px}.setup-card h2{font-size:34px}.dialog-item{flex-direction:column;gap:4px}.meter-values{font-size:10px}.range-button{padding:8px 9px}.chart-legend{flex-wrap:wrap}}

.official-records{margin-top:34px;border-top:2px solid var(--ink);padding-top:26px}.official-records-head{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:16px}.official-records-head .eyebrow{margin-bottom:8px}.official-records-head h3{font-size:22px}.official-records-head>span{font-size:9px;letter-spacing:.12em;font-weight:900;color:var(--muted)}.official-records-wrap{overflow:auto;border-top:1px solid var(--line)}.official-records-table{width:100%;border-collapse:collapse;min-width:520px}.official-records-table th{text-align:left;font-size:9px;letter-spacing:.12em;color:var(--muted);padding:11px 10px;border-bottom:1px solid var(--line)}.official-records-table td{font-size:12px;padding:12px 10px;border-bottom:1px solid var(--line)}.official-records-table th:first-child,.official-records-table td:first-child{width:44px}.official-records-table th:last-child,.official-records-table td:last-child{text-align:right}.official-records-table td:last-child small{margin-left:10px;font-size:8px;letter-spacing:.1em;color:var(--cyan)}.official-records-table tr.current-record{background:#edf4f5}.official-records-note{margin:12px 0 0;color:var(--muted);font-size:10px;line-height:1.5}
@media(max-width:620px){.official-records-head{align-items:flex-start;flex-direction:column;gap:8px}}

/* --- v0.5 · Adaptación móvil --- */
.mobile-nav{display:none}
button,a,input,select{touch-action:manipulation}

@media(max-width:760px){
  html{scroll-padding-top:96px}
  body{padding-bottom:calc(62px + env(safe-area-inset-bottom))}
  main{width:100%;overflow:hidden}

  .site-header{
    height:92px;
    padding:12px 16px 10px;
    padding-left:max(16px,env(safe-area-inset-left));
    padding-right:max(16px,env(safe-area-inset-right));
    align-items:flex-start;
  }
  .brand{gap:9px}
  .brand-mark{width:34px;height:34px;font-size:18px}
  .brand strong{font-size:14px}.brand small{font-size:8px}
  .header-actions{gap:8px;align-items:flex-start}
  .header-actions .source-state{
    display:block;
    position:absolute;
    left:max(16px,env(safe-area-inset-left));
    bottom:9px;
    font-size:9px;
    letter-spacing:.10em;
  }
  .text-button{min-height:38px;padding:0 7px;font-size:10px}

  .hero-grid{display:block;min-height:0;border-left:0;border-right:0}
  .station-heading{padding:28px 18px 24px;border-bottom:1px solid var(--line)}
  .station-heading .eyebrow{margin-bottom:12px}
  .station-line{align-items:flex-start;gap:14px}
  .station-heading h1{font-size:clamp(34px,11vw,52px);line-height:.92;letter-spacing:-.055em;overflow-wrap:anywhere}
  .station-heading p{font-size:13px;margin-top:14px;letter-spacing:.13em}
  .square-button{width:48px;height:48px;min-width:48px;font-size:20px}

  .status-block{min-height:220px;padding:26px 18px 24px}
  .status-meta{font-size:9px;gap:8px}
  .status-meta span:last-child{text-align:right}
  .height-value{font-size:clamp(76px,23vw,104px)}
  .height-unit{font-size:24px;margin-bottom:5px}
  .variation-line{padding-top:15px;align-items:center}
  .variation-line strong{font-size:17px}
  .variation-line span{font-size:9px;text-align:right}

  .threshold-section{padding:30px 18px 28px;border-left:0;border-right:0}
  .section-head{gap:12px}
  .section-head h2{font-size:28px;line-height:1.04}
  .section-head p{font-size:13px;line-height:1.5}
  .meter-wrap{margin-top:24px}
  .meter-track{display:none}
  .meter-values{
    margin-top:0;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    border-top:2px solid var(--ink);
    border-bottom:1px solid var(--line);
    font-size:10px;
    letter-spacing:.035em;
  }
  .meter-values span{padding:13px 8px 12px;border-right:1px solid var(--line);line-height:1.35}
  .meter-values span:last-child{border-right:0}
  .meter-values span:nth-child(1){box-shadow:inset 0 3px 0 var(--cyan)}
  .meter-values span:nth-child(2){box-shadow:inset 0 3px 0 var(--amber)}
  .meter-values span:nth-child(3){box-shadow:inset 0 3px 0 var(--red)}

  .content-grid{display:block;border-left:0;border-right:0}
  .panel{padding:30px 18px}
  .panel-heading{gap:16px}
  .panel h3{font-size:25px}
  .history-tools{width:100%;gap:8px}
  .range-switch{width:100%;overflow:visible}
  .range-button{flex:1;min-height:42px;padding:8px 5px;font-size:8px;white-space:nowrap}
  .history-tools>span{align-self:flex-end}
  .chart-wrap{height:280px;margin-top:22px;margin-left:-4px;margin-right:-4px}
  #historyChart{display:block}
  .chart-axis,.chart-date{font-size:11px}
  .chart-threshold-label{font-size:9px}
  .chart-legend{gap:14px;margin-top:12px;font-size:8px}

  .official-records{margin-top:28px;padding-top:22px}
  .official-records-head{margin-bottom:12px}
  .official-records-wrap{overflow:visible}
  .official-records-table{min-width:0;table-layout:fixed}
  .official-records-table th,.official-records-table td{padding:11px 7px}
  .official-records-table th:first-child,.official-records-table td:first-child{width:34px}
  .official-records-table th:nth-child(2),.official-records-table td:nth-child(2){width:56%}
  .official-records-table td{font-size:11px}
  .official-records-table td:last-child small{display:block;margin:3px 0 0}

  .side-panel{display:block}
  .port-data,.alert-panel-section{padding:30px 18px}
  .port-data h3{font-size:28px;margin-bottom:22px}
  .detail-list>div{padding:10px 0}
  .detail-list dd{font-size:13px}
  .source-link{min-height:44px;align-items:center;margin-top:14px}
  .switch-row{min-height:62px;padding:14px 0;gap:14px}
  .switch-row i{width:46px;height:24px}
  .switch-row i:after{width:16px;height:16px}
  .switch-row input:checked+i:after{left:25px}
  .primary-button{min-height:50px;font-size:11px}

  .stations-section{padding:34px 18px 26px;border-left:0;border-right:0}
  .stations-head{gap:18px}
  .filters{gap:8px}
  .filters input,.filters select,.setup-card input{font-size:16px;min-height:48px;padding:12px}
  .station-table-wrap{overflow:visible;margin-top:20px}
  .station-table{display:block;min-width:0;width:100%}
  .station-table thead{display:none}
  .station-table tbody{display:block}
  .station-table tr{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px 10px;
    padding:15px 0 16px;
    border-bottom:1px solid var(--line);
  }
  .station-table td{display:block;padding:0;border:0;min-width:0;font-size:12px}
  .station-table td::before{
    content:attr(data-label);
    display:block;
    margin-bottom:4px;
    color:var(--muted);
    font-size:7px;
    line-height:1;
    letter-spacing:.12em;
    font-weight:900;
  }
  .station-table td:first-child{grid-column:1 / span 2;font-size:15px}
  .station-table td:nth-child(2){grid-column:3;text-align:right;color:var(--muted)}
  .station-table td:first-child::before,.station-table td:nth-child(2)::before{display:none}
  .station-table tbody tr:hover{background:transparent}
  .station-table tbody tr.selected-row{background:#edf4f5;margin-left:-18px;margin-right:-18px;padding-left:18px;padding-right:18px}
  .station-table tbody tr.selected-row td:first-child{box-shadow:none}
  .station-table tbody tr.selected-row{box-shadow:inset 4px 0 0 var(--cyan)}
  .station-table .state-pill{font-size:10px}

  footer{margin-bottom:0;padding:26px 18px 24px;font-size:10px}

  .setup-dialog{
    width:100vw;
    max-width:none;
    height:100dvh;
    max-height:none;
    margin:0;
    padding:0;
  }
  .setup-card{
    height:100dvh;
    min-height:0;
    display:flex;
    flex-direction:column;
    padding:24px 18px calc(18px + env(safe-area-inset-bottom));
    border-top:5px solid var(--cyan);
    overflow:hidden;
  }
  .setup-card h2{font-size:34px;margin-bottom:7px}
  .setup-card>p{font-size:13px;margin:4px 0 8px}
  .setup-card>input{margin:10px 0 8px;flex:none}
  .dialog-close{right:10px;top:8px;width:48px;height:48px;font-size:30px}
  .dialog-list{height:auto;min-height:0;flex:1;overflow:auto;-webkit-overflow-scrolling:touch}
  .dialog-item{min-height:56px;padding:12px 13px;align-items:flex-start}
  .dialog-item strong{font-size:13px}.dialog-item small{font-size:10px}
  .dialog-prefs{grid-template-columns:1fr 1fr;gap:0 14px;padding-top:10px;flex:none}
  .dialog-prefs label{min-height:42px;display:flex;align-items:center;gap:7px;font-size:11px}
  .setup-card>.primary-button{flex:none;margin-top:8px}

  .mobile-nav{
    position:fixed;
    left:0;right:0;bottom:0;
    z-index:40;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    min-height:58px;
    padding-bottom:env(safe-area-inset-bottom);
    background:var(--paper);
    border-top:1px solid var(--line);
  }
  .mobile-nav a{
    min-height:58px;
    display:grid;
    place-items:center;
    padding:0 3px;
    border-right:1px solid var(--line);
    color:var(--ink);
    text-decoration:none;
    font-size:8px;
    font-weight:900;
    letter-spacing:.08em;
  }
  .mobile-nav a:last-child{border-right:0}
  .mobile-nav a:active{background:#e8edef}
}

@media(max-width:440px){
  .brand small{display:none}
  .header-actions{gap:2px}
  .text-button{font-size:9px;padding:0 5px}
  .station-heading h1{font-size:clamp(31px,11vw,44px)}
  .status-block{min-height:205px}
  .height-value{font-size:clamp(70px,24vw,92px)}
  .section-head h2{font-size:25px}
  .meter-values{font-size:9px}
  .meter-values span{padding-left:5px;padding-right:5px}
  .panel h3{font-size:23px}
  .range-button{font-size:7.5px;letter-spacing:.04em}
  .official-records-table th:first-child,.official-records-table td:first-child{display:none}
  .official-records-table th:nth-child(2),.official-records-table td:nth-child(2){width:64%}
  .dialog-prefs{grid-template-columns:1fr 1fr}
  .mobile-nav a{font-size:7.5px;letter-spacing:.055em}
}

/* --- v0.6 · Registro comunitario demostrativo --- */
.citizen-panel-section{padding:42px;border-top:1px solid var(--line)}
.citizen-panel-section h3{margin-bottom:12px}
.citizen-module-copy{margin:0 0 20px;color:var(--muted);font-size:12px;line-height:1.55}
.citizen-record-summary{border-top:2px solid var(--ink);border-bottom:1px solid var(--line);padding:14px 0 13px;margin-bottom:4px}
.citizen-record-summary strong,.citizen-record-summary span{display:block}
.citizen-record-summary strong{font-size:9px;letter-spacing:.12em}
.citizen-record-summary span{margin-top:5px;font-size:11px;color:var(--muted);line-height:1.45}
.citizen-record-summary.saved{border-top-color:var(--cyan)}
.citizen-record-summary.saved strong{color:#177b89}
.secondary-button{width:100%;border:1px solid var(--ink);border-radius:0;background:transparent;color:var(--ink);padding:15px 18px;font-size:10px;letter-spacing:.11em;font-weight:900;cursor:pointer;margin-top:18px}
.secondary-button:hover{background:var(--navy);color:white}

.citizen-data-dialog{width:min(820px,calc(100vw - 30px));max-height:min(900px,calc(100dvh - 30px));border:0;border-radius:0;padding:0;background:transparent}
.citizen-data-dialog::backdrop{background:rgba(5,15,21,.78);backdrop-filter:blur(3px)}
.citizen-data-card{background:var(--paper);padding:42px;position:relative;border-top:5px solid var(--cyan);max-height:calc(100dvh - 30px);overflow:auto}
.citizen-data-card h2{font-size:42px;letter-spacing:-.045em;margin:0 0 10px}
.citizen-intro{max-width:680px;margin:0 0 24px;color:var(--muted);font-size:13px;line-height:1.55}
.citizen-location-strip{display:flex;justify-content:space-between;gap:22px;align-items:center;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:13px 0;margin-bottom:20px}
.citizen-location-strip span{font-size:8px;letter-spacing:.13em;font-weight:900;color:var(--muted)}
.citizen-location-strip strong{font-size:12px;text-align:right;text-transform:uppercase}
.citizen-field{display:block;margin-top:16px}
.citizen-field>span{display:block;margin-bottom:7px;font-size:8px;letter-spacing:.13em;font-weight:900;color:var(--muted)}
.citizen-field input{width:100%;min-height:48px;border:1px solid var(--line);border-radius:0;background:white;padding:12px 13px;outline:none;font-size:14px;color:var(--ink)}
.citizen-field input:focus{border-color:var(--navy);box-shadow:inset 3px 0 0 var(--cyan)}
.citizen-map{position:relative;height:250px;margin-top:16px;border:1px solid var(--line);background:#e9edef;overflow:hidden}
.citizen-map svg{width:100%;height:100%;display:block}
.map-river{fill:none;stroke:#93ced6;stroke-width:34;opacity:.85}
.map-road{fill:none;stroke:#c1c9cc;stroke-width:3}
.map-road.major{stroke:#a9b4b8;stroke-width:5}
.map-marker-ring{fill:#f8faf9;stroke:#102938;stroke-width:3}
.map-marker{fill:#42c6d7;stroke:#102938;stroke-width:2}
.map-caption{position:absolute;left:14px;bottom:12px;max-width:350px;background:rgba(248,250,249,.94);border-left:4px solid var(--cyan);padding:9px 11px}
.map-caption strong,.map-caption span{display:block}
.map-caption strong{font-size:8px;letter-spacing:.12em}
.map-caption span{margin-top:3px;font-size:10px;color:var(--muted);line-height:1.35}
.citizen-fields-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.number-with-unit{display:grid;grid-template-columns:1fr 48px}
.number-with-unit input{border-right:0}
.number-with-unit b{display:grid;place-items:center;border:1px solid var(--line);background:#eef1f2;font-size:12px}
.citizen-share-row{display:flex;gap:13px;align-items:flex-start;margin-top:24px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);cursor:pointer}
.citizen-share-row input{width:18px;height:18px;margin:1px 0 0;accent-color:var(--navy);flex:none}
.citizen-share-row strong,.citizen-share-row small{display:block}
.citizen-share-row strong{font-size:12px}
.citizen-share-row small{margin-top:5px;color:var(--muted);font-size:10px;line-height:1.5}
.citizen-demo-note{display:grid;grid-template-columns:110px 1fr;gap:16px;margin-top:18px;padding:13px;background:#edf4f5;border-left:4px solid var(--cyan)}
.citizen-demo-note strong{font-size:8px;letter-spacing:.12em}
.citizen-demo-note span{font-size:10px;line-height:1.45;color:var(--muted)}
.citizen-form-status{min-height:20px;margin:12px 0 0;color:#177b89;font-size:10px;font-weight:800;line-height:1.4}
.citizen-form-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;margin-top:2px}
.citizen-form-actions .primary-button{margin-top:0}
.ghost-button{border:1px solid var(--line);border-radius:0;background:transparent;color:var(--muted);padding:15px 18px;font-size:9px;letter-spacing:.1em;font-weight:900;cursor:pointer}

@media(max-width:900px){
  .citizen-panel-section{padding:36px 28px}
}

@media(max-width:760px){
  .citizen-panel-section{padding:30px 18px}
  .secondary-button{min-height:50px}
  .citizen-data-dialog{width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0}
  .citizen-data-card{height:100dvh;max-height:none;padding:24px 18px calc(22px + env(safe-area-inset-bottom));overflow:auto;border-top:5px solid var(--cyan)}
  .citizen-data-card h2{font-size:34px;margin-bottom:7px;padding-right:35px}
  .citizen-intro{font-size:13px;margin-bottom:18px}
  .citizen-location-strip{align-items:flex-start;flex-direction:column;gap:4px;padding:11px 0;margin-bottom:12px}
  .citizen-location-strip strong{text-align:left;font-size:11px}
  .citizen-field input{font-size:16px;min-height:48px}
  .citizen-map{height:210px}
  .citizen-fields-grid{grid-template-columns:1fr;gap:0}
  .citizen-share-row{margin-top:20px}
  .citizen-demo-note{grid-template-columns:1fr;gap:4px}
  .citizen-form-actions{grid-template-columns:1fr;gap:8px}
  .citizen-form-actions .primary-button{order:-1}
  .ghost-button{min-height:48px}
}

/* --- v0.7 · mapa comunitario real + envío moderado --- */
.community-map-section{background:var(--paper);border:1px solid var(--line);border-top:0;padding:48px 5vw 54px}
.community-map-head{align-items:flex-end}.community-map-head>p{max-width:600px}
.community-map-toolbar{display:flex;justify-content:space-between;gap:18px;align-items:center;margin:28px 0 14px}
.map-filter-group{display:flex;border:1px solid var(--line)}
.map-filter{min-height:42px;padding:0 14px;border:0;border-right:1px solid var(--line);border-radius:0;background:transparent;color:var(--muted);font-size:9px;font-weight:900;letter-spacing:.1em;cursor:pointer}.map-filter:last-child{border-right:0}.map-filter.active{background:var(--navy);color:#fff}
.primary-button.compact{width:auto;margin:0;padding:13px 16px;min-height:42px}
.community-map-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;border:1px solid var(--line)}
.community-map{height:510px;background:#dde4e6}.community-map .leaflet-control-attribution{font-size:9px}
.community-map-info{padding:28px;background:#f3f6f5;border-left:1px solid var(--line)}
.map-stat{border-bottom:1px solid var(--line);padding-bottom:20px}.map-stat span,.map-stat strong{display:block}.map-stat span{font-size:8px;letter-spacing:.13em;font-weight:900;color:var(--muted)}.map-stat strong{font-size:52px;line-height:1;margin-top:7px;letter-spacing:-.06em}
.map-legend{padding:20px 0;border-bottom:1px solid var(--line);display:grid;gap:11px}.map-legend>div{display:flex;gap:10px;align-items:center;font-size:10px;color:var(--muted);line-height:1.3}.map-dot{width:11px;height:11px;border-radius:50%;display:block;flex:none;box-shadow:0 0 0 2px #fff}.map-dot.normal{background:var(--navy)}.map-dot.near{background:var(--amber)}.map-dot.affected{background:var(--red)}
#mapContextText{font-size:11px;line-height:1.55;color:var(--muted);margin:20px 0}
.map-privacy-note{border-left:4px solid var(--cyan);background:#e8f1f2;padding:12px}.map-privacy-note strong,.map-privacy-note span{display:block}.map-privacy-note strong{font-size:8px;letter-spacing:.13em}.map-privacy-note span{font-size:10px;line-height:1.5;color:var(--muted);margin-top:4px}
.citizen-field select,.citizen-field textarea{width:100%;border:1px solid var(--line);border-radius:0;background:#fff;padding:12px 13px;outline:none;color:var(--ink)}.citizen-field select{min-height:48px}.citizen-field textarea{resize:vertical;min-height:84px}.citizen-field select:focus,.citizen-field textarea:focus{border-color:var(--navy);box-shadow:inset 3px 0 0 var(--cyan)}
.citizen-fields-grid.top-fields{margin-top:8px}.report-map-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:20px}.report-map-toolbar strong{font-size:8px;letter-spacing:.13em;color:var(--muted)}.report-map-toolbar .ghost-button{padding:10px 13px}
.report-map{height:300px;margin-top:9px;border:1px solid var(--line);background:#dde4e6}.map-help{font-size:10px;color:var(--muted);margin:7px 0 0;line-height:1.4}.live-note{background:#edf7f1;border-left-color:var(--green)}.honeypot{position:absolute!important;left:-99999px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.leaflet-popup-content-wrapper,.leaflet-popup-tip{border-radius:0}.leaflet-popup-content{font:11px/1.5 system-ui,-apple-system,Segoe UI,sans-serif;color:var(--ink)}

@media(max-width:900px){
  .community-map-section{padding:36px 28px}.community-map-grid{grid-template-columns:1fr}.community-map-info{border-left:0;border-top:1px solid var(--line);display:grid;grid-template-columns:120px 1fr;gap:0 24px}.map-stat{grid-row:1 / span 2;border-bottom:0;border-right:1px solid var(--line);padding-right:20px}.map-legend{padding-top:0}.map-privacy-note{grid-column:2}.community-map{height:440px}
}
@media(max-width:620px){
  .community-map-section{padding:30px 18px}.community-map-head{display:block}.community-map-head>p{margin-top:12px}.community-map-toolbar{display:grid;grid-template-columns:1fr;gap:10px}.map-filter-group{width:100%}.map-filter{flex:1;padding:0 8px;font-size:7.5px}.primary-button.compact{width:100%}.community-map{height:390px}.community-map-info{display:block;padding:20px}.map-stat{border-right:0;border-bottom:1px solid var(--line);padding-right:0}.map-stat strong{font-size:40px}.map-legend{padding-top:16px}.map-privacy-note{margin-top:16px}.report-map-toolbar{align-items:flex-start;flex-direction:column}.report-map-toolbar .ghost-button{width:100%}.report-map{height:260px}.citizen-field select,.citizen-field textarea{font-size:16px}
}


/* --- v0.9 · clima, satélite, contexto y pie legal --- */
.weather-section{max-width:1480px;margin:0 auto;background:var(--paper);border:1px solid var(--line);border-top:0;display:grid;grid-template-columns:minmax(0,1fr) 320px}
.weather-main{padding:44px 4vw 48px}.weather-aside{padding:44px 30px;background:#eef3f3;border-left:1px solid var(--line)}
.weather-title-row{display:flex;justify-content:space-between;align-items:flex-start;gap:28px;margin-top:8px}.weather-title-row h2{margin:0;font-size:34px;letter-spacing:-.04em}.weather-title-row p{margin:7px 0 0;color:var(--muted);font-size:11px}
.weather-signal{min-width:190px;border-left:5px solid var(--line);padding:10px 13px;background:#f2f4f4}.weather-signal span,.weather-signal strong{display:block}.weather-signal span{font-size:7px;letter-spacing:.14em;color:var(--muted);font-weight:900}.weather-signal strong{font-size:12px;margin-top:4px;letter-spacing:.04em}.weather-signal.high{border-left-color:#d96b24;background:#fff0e6}.weather-signal.watch{border-left-color:var(--amber);background:#fff5df}.weather-signal.normal{border-left-color:var(--green);background:#eaf5ef}.weather-signal.unavailable{border-left-color:var(--red)}
.weather-headline{margin:20px 0;color:var(--muted);font-size:12px;line-height:1.55;max-width:900px}.weather-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border:1px solid var(--line)}.weather-loading{grid-column:1/-1;padding:48px;text-align:center;font-size:9px;letter-spacing:.12em;color:var(--muted);font-weight:900}
.weather-day{min-width:0;padding:14px 12px 16px;border-right:1px solid var(--line);position:relative}.weather-day:last-child{border-right:0}.weather-day.high{box-shadow:inset 0 4px 0 #d96b24}.weather-day.watch{box-shadow:inset 0 4px 0 var(--amber)}.weather-day.normal{box-shadow:inset 0 4px 0 #8cb8a2}
.weather-day-head{display:flex;justify-content:space-between;gap:6px}.weather-day-head strong{font-size:9px;letter-spacing:.11em}.weather-day-head span{font-size:8px;color:var(--muted)}.weather-icon{height:44px;display:flex;align-items:center;font:700 27px/1 ui-monospace,Consolas,monospace;color:var(--navy)}.weather-condition{display:block;font-size:10px;min-height:28px}.weather-temp{display:flex;align-items:baseline;gap:6px;margin:7px 0 10px}.weather-temp b{font-size:25px}.weather-temp span{font-size:12px;color:var(--muted)}.weather-day dl{margin:0;display:grid;gap:4px}.weather-day dl div{display:flex;justify-content:space-between;gap:8px}.weather-day dt{font-size:7px;letter-spacing:.09em;color:var(--muted);font-weight:900}.weather-day dd{font-size:8px;margin:0;font-weight:800}.weather-risk{display:block;margin-top:10px;padding-top:8px;border-top:1px solid var(--line);font-size:7px;letter-spacing:.08em;font-weight:900;color:var(--muted)}
.weather-aside h3{font-size:26px;letter-spacing:-.035em;margin:8px 0 10px}.weather-aside p{color:var(--muted);font-size:11px;line-height:1.55}.weather-aside .source-link{margin-top:22px}
.origin-section{max-width:1480px;margin:0 auto;background:var(--navy);color:white;padding:42px 4vw;display:grid;grid-template-columns:1fr 1fr;gap:50px;align-items:center;border-top:1px solid rgba(255,255,255,.15)}.origin-section .eyebrow{color:#92a7b3}.origin-section h2{font-size:38px;letter-spacing:-.045em;margin:8px 0 0}.origin-copy p{color:#c5d0d5;font-size:12px;line-height:1.6;max-width:650px}.origin-button{display:inline-block;width:auto;text-decoration:none;margin-top:12px;background:var(--cyan);color:#08202c}.origin-button:hover{background:white;color:var(--navy)}
.footer-copy{max-width:900px}.copyright-note{margin-top:9px!important;font-size:9px!important;color:#7a858d!important}.copyright-note strong{color:var(--ink)}
.leaflet-control-layers{border-radius:0!important;box-shadow:none!important;border:1px solid #aeb8bc!important}.leaflet-control-layers-expanded{padding:6px 8px!important;background:rgba(248,250,249,.94)!important}.leaflet-control-layers label{font-size:8px;font-weight:900;letter-spacing:.06em}.leaflet-control-layers-selector{accent-color:var(--navy)}
@media(max-width:1100px){.weather-days{overflow-x:auto;grid-template-columns:repeat(7,140px)}.weather-section{grid-template-columns:1fr}.weather-aside{border-left:0;border-top:1px solid var(--line)}}
@media(max-width:760px){.weather-main{padding:30px 18px 34px}.weather-aside{padding:28px 18px}.weather-title-row{display:block}.weather-title-row h2{font-size:30px}.weather-signal{margin-top:16px;min-width:0}.weather-days{margin-right:-18px;border-right:0}.weather-day{padding:14px 11px}.origin-section{grid-template-columns:1fr;padding:34px 18px;gap:16px}.origin-section h2{font-size:31px}.origin-button{width:100%;text-align:center;line-height:1.35}.mobile-nav{grid-template-columns:repeat(5,1fr)}.mobile-nav a{font-size:6.8px}.copyright-note{font-size:9px!important}}


/* --- CAUCE Web v1.0 · cierre visual --- */
.weather-section{margin-top:0;grid-template-columns:minmax(0,1fr) 330px}
.weather-main{padding:52px 4vw 56px}
.weather-section-header{display:flex;justify-content:space-between;align-items:flex-start;gap:36px}
.weather-section-header h2{margin:0;font-size:clamp(30px,3vw,42px);letter-spacing:-.045em}
.weather-location{margin:10px 0 0;color:var(--muted);font-size:12px;line-height:1.45}
.weather-signal{flex:none;min-width:210px;border-left:5px solid var(--line);padding:13px 16px;background:#f2f4f4}
.weather-signal span,.weather-signal strong{display:block}.weather-signal span{font-size:7px;letter-spacing:.14em;color:var(--muted);font-weight:900}.weather-signal strong{font-size:12px;line-height:1.35;margin-top:5px;letter-spacing:.035em}
.weather-headline{margin:26px 0 34px;padding:0 0 0 16px;border-left:1px solid var(--line);color:#3f4e57;font-size:13px;line-height:1.65;max-width:980px}
.weather-week-head{display:flex;justify-content:space-between;align-items:end;gap:20px;padding-bottom:12px;border-bottom:2px solid var(--ink)}
.weather-week-head span{font-size:9px;letter-spacing:.16em;font-weight:900}.weather-week-head small{font-size:9px;color:var(--muted)}
.weather-days{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-top:0;overflow:visible}
.weather-loading{grid-column:1/-1;padding:54px 22px;background:var(--paper);text-align:center;font-size:9px;letter-spacing:.12em;color:var(--muted);font-weight:900}
.weather-day{min-width:0;padding:0;background:var(--paper);border:0;box-shadow:none!important;position:relative}
.weather-day::before{content:"";display:block;height:4px;background:#8cb8a2}.weather-day.watch::before{background:var(--amber)}.weather-day.high::before{background:#d96b24}
.weather-day-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 18px 14px;border-bottom:1px solid var(--line)}
.weather-day-date strong,.weather-day-date span{display:block}.weather-day-date strong{font-size:11px;letter-spacing:.11em}.weather-day-date span{margin-top:4px;color:var(--muted);font-size:9px;letter-spacing:.06em}
.weather-condition-icon{width:42px;height:42px;color:var(--navy);flex:none}.weather-condition-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.weather-condition-icon .accent{stroke:#3aa9bb;fill:none}
.weather-day-summary{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;padding:16px 18px 18px;min-height:86px}
.weather-condition{font-size:13px;line-height:1.25;min-height:0;max-width:145px}.weather-temp{display:flex;align-items:baseline;gap:6px;margin:0;white-space:nowrap}.weather-temp b{font-size:30px;line-height:1}.weather-temp span{font-size:14px;color:var(--muted)}
.weather-data-table{border-top:1px solid var(--line)}
.weather-data-row{display:flex;justify-content:space-between;align-items:center;gap:14px;min-height:43px;padding:8px 18px;border-bottom:1px solid var(--line)}
.weather-data-row>span{display:flex;align-items:center;gap:8px;min-width:0}.weather-data-row svg{width:16px;height:16px;fill:none;stroke:#4e5c64;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}.weather-data-row em{font-style:normal;font-size:7px;letter-spacing:.1em;color:var(--muted);font-weight:900}.weather-data-row>strong{font-size:10px;white-space:nowrap}
.weather-risk{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0;padding:12px 18px;border-top:0;background:#edf5f0;color:var(--ink)}.weather-risk.watch{background:#fff5df}.weather-risk.high{background:#fff0e6}.weather-risk>span{font-size:7px;letter-spacing:.1em;color:var(--muted);font-weight:900}.weather-risk>strong{font-size:8px;letter-spacing:.06em;text-align:right}
.weather-aside{padding:52px 30px;background:#eef3f3}.weather-aside h3{font-size:27px;line-height:1.06;margin:10px 0 14px}.weather-aside>p{font-size:12px;line-height:1.65}.weather-meaning{margin-top:26px;border-top:1px solid var(--line)}.weather-meaning>div{display:flex;gap:11px;align-items:flex-start;padding:14px 0;border-bottom:1px solid var(--line)}.weather-meaning span{font-size:10px;line-height:1.45;color:#4f5d65}.weather-meaning strong{color:var(--ink)}.weather-key{width:10px;height:10px;margin-top:2px;background:#8cb8a2;flex:none}.weather-key.watch{background:var(--amber)}.weather-key.high{background:#d96b24}

.origin-section{margin:42px auto 0;padding:58px 5vw 60px;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:72px;align-items:start;border-top:0}
.origin-section h2{font-size:clamp(34px,3.2vw,48px);line-height:1.02;margin:12px 0 0}.origin-copy{padding-top:3px}.origin-copy p{font-size:13px;line-height:1.75;margin:0;max-width:720px}.origin-button{margin-top:28px;min-height:50px;padding:16px 20px}
.stations-section{padding-bottom:76px}

@media(max-width:1180px){
  .weather-section{grid-template-columns:1fr}.weather-aside{border-left:0;border-top:1px solid var(--line)}
  .weather-days{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .weather-main{padding:38px 18px 42px}.weather-aside{padding:34px 18px 38px}
  .weather-section-header{display:block}.weather-section-header h2{font-size:31px;line-height:1.05}.weather-location{font-size:12px;margin-top:9px}
  .weather-signal{margin-top:22px;min-width:0;width:100%;padding:12px 14px}.weather-headline{margin:22px 0 30px;font-size:12px;line-height:1.6}
  .weather-week-head{display:block;padding-bottom:11px}.weather-week-head small{display:block;margin-top:6px;line-height:1.4}
  .weather-days{display:grid;grid-template-columns:1fr;gap:1px;margin:0;border-right:1px solid var(--line);overflow:visible}
  .weather-day{width:100%}.weather-day-header{padding:16px 15px 13px}.weather-day-summary{padding:15px 15px 17px;min-height:78px}.weather-data-row{padding:8px 15px}.weather-risk{padding:12px 15px}
  .weather-condition{font-size:14px}.weather-temp b{font-size:31px}.weather-condition-icon{width:40px;height:40px}
  .weather-meaning>div{padding:13px 0}.weather-meaning span{font-size:11px}
  .origin-section{margin-top:30px;grid-template-columns:1fr;padding:44px 18px 46px;gap:24px}.origin-section h2{font-size:34px;line-height:1.04}.origin-copy p{font-size:13px;line-height:1.7}.origin-button{width:100%;margin-top:22px;white-space:normal}
}
@media(max-width:430px){
  .weather-day-header{gap:12px}.weather-day-summary{align-items:center}.weather-condition{max-width:56%}.weather-temp b{font-size:29px}
  .weather-data-row em{font-size:7px}.weather-data-row>strong{font-size:10px}
}

/* --- CAUCE v1.0.1 · carrusel meteorológico móvil --- */
.weather-carousel-shell{position:relative}
.weather-carousel-arrow,.weather-carousel-pager{display:none}

@media(max-width:760px){
  .weather-carousel-shell{margin:0;position:relative}
  .weather-days{
    display:flex;
    grid-template-columns:none;
    gap:0;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-snap-type:x mandatory;
    scroll-behavior:smooth;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    background:transparent;
    border:1px solid var(--line);
  }
  .weather-days::-webkit-scrollbar{display:none}
  .weather-day{
    flex:0 0 100%;
    width:100%;
    max-width:100%;
    scroll-snap-align:start;
    scroll-snap-stop:always;
    border-right:1px solid var(--line);
  }
  .weather-day:last-child{border-right:0}
  .weather-loading{flex:0 0 100%;width:100%}
  .weather-carousel-arrow{
    display:flex;
    position:absolute;
    z-index:4;
    top:50%;
    transform:translateY(-50%);
    width:38px;
    height:46px;
    align-items:center;
    justify-content:center;
    border:1px solid var(--line);
    background:rgba(255,255,255,.94);
    color:var(--navy);
    font:800 20px/1 system-ui,sans-serif;
    cursor:pointer;
    box-shadow:0 3px 14px rgba(5,35,49,.08);
  }
  .weather-carousel-arrow.prev{left:8px}
  .weather-carousel-arrow.next{right:8px}
  .weather-carousel-arrow:disabled{opacity:.25;cursor:default}
  .weather-carousel-pager{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:34px;
    padding:12px 0 0;
  }
  .weather-page-dot{
    width:7px;
    height:7px;
    padding:0;
    border:0;
    border-radius:50%;
    background:#aeb9be;
    cursor:pointer;
  }
  .weather-page-dot.active{width:18px;border-radius:10px;background:var(--navy)}
}


/* --- CAUCE v1.0.2 · altura adaptativa del carrusel meteorológico móvil --- */
@media(max-width:760px){
  .weather-days{
    align-items:flex-start;
    transition:height .24s ease;
  }
  .weather-day{
    align-self:flex-start;
    height:auto!important;
    min-height:0!important;
    box-sizing:border-box;
  }
  .weather-day-summary{
    min-height:0!important;
  }
}

/* --- CAUCE v1.0.3 · pronóstico: separadores sólidos + stack móvil real --- */
/* Escritorio/tablet: no dependemos del gap para dibujar divisores. */
.weather-days{
  gap:0;
  background:var(--paper);
  border:1px solid var(--line);
  border-top:0;
}
.weather-day{
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.weather-day:nth-child(4n){border-right:0}
.weather-day:nth-last-child(-n+4){border-bottom:0}

@media(max-width:1180px) and (min-width:761px){
  .weather-day{border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
  .weather-day:nth-child(4n){border-right:1px solid var(--line)}
  .weather-day:nth-child(2n){border-right:0}
  .weather-day:nth-last-child(-n+2){border-bottom:0}
}

@media(max-width:760px){
  .weather-carousel-shell{
    width:100%;
    max-width:100%;
    overflow:hidden;
  }
  .weather-days{
    display:block;
    width:100%;
    max-width:100%;
    height:auto!important;
    overflow:visible;
    scroll-snap-type:none;
    scroll-behavior:auto;
    border:1px solid var(--line);
    background:var(--paper);
    transition:none;
  }
  .weather-day{
    display:none;
    width:100%;
    max-width:100%;
    height:auto!important;
    min-height:0!important;
    margin:0;
    border:0;
    box-sizing:border-box;
  }
  .weather-day.weather-active{
    display:block;
  }
  .weather-day.weather-active::after{
    content:"";
    display:block;
    clear:both;
  }
  .weather-loading{width:100%;max-width:100%}
  .weather-carousel-arrow{
    top:50%;
  }
}

/* Ajuste final de bordes por fila para el pronóstico de 7 días. */
@media(min-width:1181px){
  .weather-day{border-bottom:1px solid var(--line)}
  .weather-day:nth-child(n+5){border-bottom:0}
}
@media(max-width:1180px) and (min-width:761px){
  .weather-day{border-bottom:1px solid var(--line)}
  .weather-day:last-child{border-bottom:0}
}

/* --- CAUCE v1.0.4 · responsive weather hardening + branding assets --- */
.brand-logo{
  display:block;
  width:auto;
  height:auto;
  max-width:220px;
  max-height:48px;
  object-fit:contain;
  object-position:left center;
}
.brand-fallback{display:flex;gap:12px;align-items:center}
.brand-fallback[hidden]{display:none!important}

/* El grid meteorologico nunca debe imponer un ancho minimo al viewport. */
.weather-section,
.weather-main,
.weather-aside,
.weather-section-header,
.weather-section-header>div,
.weather-headline,
.weather-week-head,
.weather-carousel-shell,
.weather-days,
.weather-day,
.weather-day-header,
.weather-day-summary,
.weather-data-table,
.weather-data-row,
.weather-risk,
.weather-meaning,
.weather-meaning>div{
  min-width:0;
}
.weather-location,
.weather-headline,
.weather-signal strong,
.weather-condition,
.weather-risk strong,
.weather-aside p,
.weather-meaning span,
.weather-aside .fineprint{
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
}
.weather-mobile-controls{display:none}

@media(max-width:760px){
  html,body{max-width:100%;overflow-x:hidden}
  main{max-width:100%;overflow-x:clip}
  .site-header{width:100%;max-width:100%}
  .brand{min-width:0;max-width:58vw;overflow:hidden}
  .brand-logo{max-width:min(46vw,170px);max-height:36px}
  .brand-fallback{gap:8px;min-width:0}

  .weather-section{
    display:block;
    width:100%;
    max-width:100%;
    overflow:hidden;
    border-left:0;
    border-right:0;
  }
  .weather-main,
  .weather-aside{
    width:100%;
    max-width:100%;
    overflow:hidden;
  }
  .weather-main{padding:34px 18px 30px}
  .weather-aside{padding:30px 18px 34px}

  .weather-section-header{
    display:block;
    width:100%;
  }
  .weather-section-header h2{
    max-width:100%;
    font-size:clamp(27px,8.6vw,34px);
    line-height:1.06;
    overflow-wrap:anywhere;
  }
  .weather-location{
    margin-top:8px;
    font-size:11px;
    line-height:1.45;
  }
  .weather-signal{
    width:100%;
    max-width:100%;
    min-width:0;
    margin-top:20px;
    padding:12px 14px;
  }
  .weather-signal strong{font-size:12px}
  .weather-headline{
    width:100%;
    margin:20px 0 28px;
    padding-left:13px;
    font-size:11px;
    line-height:1.62;
  }
  .weather-week-head{
    display:block;
    width:100%;
    padding-bottom:10px;
  }
  .weather-week-head small{
    display:block;
    margin-top:6px;
    font-size:8px;
    line-height:1.45;
  }

  .weather-carousel-shell{
    width:100%;
    max-width:100%;
    margin:0;
    overflow:hidden;
  }
  .weather-days{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    overflow:hidden!important;
    border:1px solid var(--line)!important;
    background:var(--paper)!important;
  }
  .weather-day{
    display:none!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    overflow:hidden!important;
    border:0!important;
  }
  .weather-day.weather-active{display:block!important}
  .weather-day-header{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    width:100%;
    padding:15px 14px 13px;
  }
  .weather-day-date{min-width:0}
  .weather-condition-icon{width:38px;height:38px}
  .weather-day-summary{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    width:100%;
    min-height:0!important;
    padding:15px 14px 16px;
  }
  .weather-condition{
    max-width:none!important;
    min-width:0;
    font-size:14px;
  }
  .weather-temp{justify-self:end;min-width:max-content}
  .weather-temp b{font-size:30px}
  .weather-data-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    width:100%;
    min-height:42px;
    padding:8px 14px;
  }
  .weather-data-row>span{min-width:0;overflow:hidden}
  .weather-data-row em{min-width:0;overflow-wrap:anywhere}
  .weather-data-row>strong{justify-self:end}
  .weather-risk{
    display:grid;
    grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);
    align-items:center;
    gap:10px;
    width:100%;
    padding:11px 14px;
  }
  .weather-risk>strong{text-align:right;line-height:1.35}

  .weather-mobile-controls{
    display:grid;
    grid-template-columns:44px minmax(0,1fr) 44px;
    align-items:center;
    gap:10px;
    width:100%;
    margin-top:10px;
  }
  .weather-carousel-arrow{
    display:grid!important;
    position:static!important;
    inset:auto!important;
    transform:none!important;
    width:44px!important;
    height:40px!important;
    place-items:center;
    border:1px solid var(--line);
    background:var(--paper);
    color:var(--navy);
    box-shadow:none!important;
    font:800 18px/1 system-ui,sans-serif;
  }
  .weather-carousel-arrow:disabled{opacity:.28}
  .weather-carousel-pager{
    display:flex!important;
    align-items:center;
    justify-content:center;
    gap:7px;
    width:100%;
    min-width:0;
    min-height:40px;
    padding:0;
  }
  .weather-page-dot{flex:0 0 auto}

  .weather-aside h3{
    max-width:100%;
    font-size:clamp(24px,7vw,30px);
    line-height:1.08;
  }
  .weather-aside>p{font-size:11px;line-height:1.65}
  .weather-meaning>div{
    display:grid;
    grid-template-columns:10px minmax(0,1fr);
    gap:11px;
    align-items:start;
  }
  .weather-meaning span{min-width:0;font-size:10.5px;line-height:1.5}
  .weather-aside .source-link{
    max-width:100%;
    white-space:normal;
    line-height:1.5;
  }
  .weather-aside .fineprint{font-size:9px;line-height:1.55}
}

@media(max-width:390px){
  .brand{max-width:55vw}
  .brand-logo{max-width:145px;max-height:32px}
  .weather-main{padding-left:15px;padding-right:15px}
  .weather-aside{padding-left:15px;padding-right:15px}
  .weather-day-header,.weather-day-summary,.weather-data-row,.weather-risk{padding-left:12px;padding-right:12px}
  .weather-temp b{font-size:28px}
  .weather-risk{grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr)}
}
@media(max-width:760px){.weather-aside .source-link{display:inline-block}}


/* --- CAUCE v1.0.5 · grilla de 8 días + marca textual junto al isotipo --- */
/* El logo es sólo el isotipo. La denominación siempre vive como texto HTML. */
.brand{
  display:flex;
  align-items:center;
  gap:11px;
  min-width:0;
  overflow:visible;
}
.brand-symbol{
  width:44px;
  height:44px;
  flex:0 0 44px;
  display:grid;
  place-items:center;
  overflow:hidden;
}
.brand-logo{
  display:block;
  width:100%;
  height:100%;
  max-width:44px;
  max-height:44px;
  object-fit:contain;
  object-position:center;
}
.brand-mark-fallback{
  width:38px;
  height:38px;
  place-items:center;
}
.brand-mark-fallback:not([hidden]){display:grid}
.brand-copy{
  display:block;
  min-width:0;
  line-height:1;
}
.brand-copy strong{
  display:block;
  font-size:16px;
  line-height:1.05;
  letter-spacing:.16em;
  white-space:nowrap;
}
.brand-copy small{
  display:block!important;
  margin-top:4px;
  font-size:8px;
  line-height:1.2;
  letter-spacing:.11em;
  color:var(--muted);
  white-space:nowrap;
}

/* 8 días = 4 x 2 exactos en escritorio, sin celda vacía ni huecos de fondo. */
@media(min-width:1181px){
  .weather-days{
    grid-template-columns:repeat(4,minmax(0,1fr));
    width:100%;
    max-width:100%;
    overflow:hidden;
  }
  .weather-day{
    width:auto;
    min-width:0;
    border-right:1px solid var(--line);
    border-bottom:1px solid var(--line);
  }
  .weather-day:nth-child(4n){border-right:0}
  .weather-day:nth-child(n+5){border-bottom:0}
}

@media(max-width:760px){
  .brand{
    max-width:calc(100vw - 128px);
    gap:8px;
  }
  .brand-symbol{
    width:34px;
    height:34px;
    flex-basis:34px;
  }
  .brand-logo{
    width:34px;
    height:34px;
    max-width:34px;
    max-height:34px;
  }
  .brand-mark-fallback{width:34px;height:34px}
  .brand-copy strong{font-size:13px;letter-spacing:.14em}
  .brand-copy small{
    display:block!important;
    max-width:150px;
    margin-top:3px;
    font-size:6.4px;
    line-height:1.15;
    letter-spacing:.08em;
    white-space:normal;
  }
}
@media(max-width:390px){
  .brand{max-width:calc(100vw - 116px)}
  .brand-symbol{width:31px;height:31px;flex-basis:31px}
  .brand-logo{width:31px;height:31px;max-width:31px;max-height:31px}
  .brand-mark-fallback{width:31px;height:31px}
  .brand-copy strong{font-size:12px}
  .brand-copy small{max-width:126px;font-size:5.9px;letter-spacing:.065em}
}
