:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #172033; background: #dce7ee; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body, main, #map { width: 100%; height: 100%; margin: 0; }
main { position: relative; }
.panel { position: absolute; z-index: 1000; top: 16px; left: 16px; width: min(320px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; padding: 20px; border: 1px solid #d8e0e7; border-radius: 12px; background: rgba(255,255,255,.96); box-shadow: 0 10px 35px rgba(23,32,51,.18); }
header { border-bottom: 1px solid #e4e9ee; padding-bottom: 14px; }
h1 { margin: 2px 0 4px; font-size: 1.55rem; letter-spacing: -.03em; }
header p { margin: 0; color: #5e6b7b; font-size: .82rem; line-height: 1.45; }
.eyebrow { color: #126a78; font-size: .67rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
fieldset { min-width: 0; margin: 16px 0 0; padding: 0; border: 0; }
legend, .opacity, .legend strong { margin-bottom: 8px; color: #475668; font-size: .7rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.periods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
button { min-height: 36px; padding: 0; border: 1px solid #ccd6df; border-radius: 6px; color: #334155; background: #f7f9fb; font: inherit; font-size: .72rem; cursor: pointer; }
button:hover, button:focus-visible { border-color: #126a78; outline: none; }
button.active { border-color: #126a78; color: white; background: #126a78; }
button:disabled { opacity: .5; cursor: not-allowed; }
.study-area { display: grid; gap: 7px; }
.study-area legend { grid-column: 1 / -1; }
.study-area button { width: 100%; }
#selectedArea { display: block; padding: 8px 9px; border: 1px solid #e1e8ed; border-radius: 6px; color: #5e6b7b; background: #f8fafb; font-size: .72rem; line-height: 1.35; }
.layers { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; }
.layers legend { grid-column: 1 / -1; }
.layers label { font-size: .78rem; }
.layers input { accent-color: #126a78; }
.opacity { display: grid; grid-template-columns: 1fr; gap: 3px; margin-top: 15px; }
.opacity input { width: 100%; accent-color: #126a78; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 15px 0; }
.metrics div { min-width: 0; padding: 9px 7px; border-radius: 7px; background: #eef4f6; }
.metrics dt { color: #657485; font-size: .58rem; line-height: 1.2; text-transform: uppercase; }
.metrics dd { overflow: hidden; margin: 4px 0 0; color: #0f4f5a; font-size: .92rem; font-weight: 750; text-overflow: ellipsis; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 11px; border: 1px solid #e1e8ed; border-radius: 7px; }
.legend strong { grid-column: 1 / -1; margin: 0; }
.legend span { display: flex; align-items: center; gap: 6px; font-size: .72rem; }
.legend b { font-weight: 500; }
.legend i { width: 13px; height: 13px; border-radius: 3px; }
.low { background: #31a354; } .moderate { background: #fee08b; } .high { background: #f46d43; } .extreme { background: #a50026; }
footer { margin-top: 14px; color: #6a7786; font-size: .66rem; line-height: 1.45; }
footer p { margin: 5px 0; }
#status { color: #126a78; font-weight: 700; }
.sources { border-top: 1px solid #e4e9ee; padding-top: 7px; }
#error { position: absolute; z-index: 1200; top: 18px; right: 18px; max-width: 310px; padding: 12px 15px; border-radius: 7px; color: #7f1d1d; background: #fee2e2; box-shadow: 0 6px 20px rgba(0,0,0,.15); font-size: .82rem; }
.leaflet-control-attribution { font-size: 10px; }
@media (max-width: 620px) { .panel { top: 8px; left: 8px; max-height: 52%; width: calc(100% - 16px); padding: 14px; } .metrics { margin-bottom: 8px; } }
