:root{color-scheme:dark;--bg:#061827;--panel:#0a2134;--panel2:#0c273b;--edge:#234054;--muted:#9db2c5;--text:#eff6ff;--blue:#0c99ff;--blue2:#4db9ff;--tint:#122e43;--dark:#061521;font-family:Inter,"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,sans-serif;scroll-behavior:smooth}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-size:14px}button,select,input{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid #67c5ff;outline-offset:3px}.topbar{display:flex;align-items:center;height:75px;padding:0 30px;border-bottom:1px solid #263b52;gap:42px;background:#041524;position:relative;z-index:2}.brand{display:flex;flex-direction:column;flex-shrink:0;gap:0;line-height:1}.brand-name{font-size:36px;font-weight:650;letter-spacing:-1.7px}.brand-name span:last-child{color:#329fff}.brand-sub{font-size:10px;letter-spacing:-.08px;color:#e3edf6;margin-top:2px}.nav{display:flex;align-items:stretch;height:100%;gap:4px}.nav a{display:flex;align-items:center;padding:0 18px;color:#d5e4f2;font-size:14px;border-bottom:2px solid transparent}.nav a:hover,.nav a.active{background:#10283d;border-color:#37aaf9;color:white}.header-right{margin-left:auto;display:flex;align-items:center;gap:20px}.status-pill{font-size:11px;font-weight:650;color:#a6d7ff;border:1px solid #2a5874;background:#0b2a44;border-radius:20px;padding:7px 12px;white-space:nowrap}.status-pill i{display:inline-block;width:6px;height:6px;background:#6bbbff;border-radius:50%;margin-right:6px}.location-trigger{border:1px solid #40566c;color:#aebfd1;background:#12283c;border-radius:20px;min-width:230px;padding:8px 12px;display:flex;align-items:center;gap:8px;text-align:left}.location-trigger svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.7}.hero{min-height:247px;padding:31px 5.2%;display:flex;justify-content:space-between;gap:25px;position:relative;isolation:isolate;overflow:hidden;background:#092035}.hero::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(3,21,35,.96) 0%,rgba(3,24,42,.75) 35%,rgba(5,26,43,.36) 68%,rgba(5,19,35,.68) 100%),url('assets/atmosphere.jpg') center 49%/cover no-repeat;z-index:-1}.hero-copy{max-width:730px}.eyebrow{font-size:11px;font-weight:700;letter-spacing:2.5px;color:#95caef;margin:2px 0 9px}.dot{padding:0 7px;color:#59bcff}.hero h1{font-weight:500;font-size:clamp(28px,3vw,42px);letter-spacing:-1.2px;margin:0 0 2px}.powered{font-size:23px;margin:0;color:#bcd2e6}.powered strong{color:#3faeff;font-weight:600}.hero-description{font-size:15px;margin:10px 0 20px;color:#e1eaf3;line-height:1.5}.hero-actions{display:flex;gap:10px;flex-wrap:wrap}.btn{min-height:38px;padding:9px 18px;display:inline-flex;align-items:center;justify-content:center;gap:12px;border-radius:8px;border:1px solid #84a3b9;background:transparent;color:white;font-weight:600;font-size:13px}.btn.primary{border-color:#159bfb;background:linear-gradient(180deg,#1da2ff,#007de9);box-shadow:0 2px 9px #00162455}.btn:hover{filter:brightness(1.15)}.hero-highlights{min-width:245px;display:flex;flex-direction:column;justify-content:center;gap:21px}.hero-highlights>div{display:flex;align-items:center;gap:12px}.round-icon{font-size:23px;width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#d5eaff16;color:#c3e6ff}.hero-highlights strong{display:block;font-size:13px;font-weight:650}.hero-highlights small{display:block;color:#c6d8e8;font-size:11px;margin-top:4px}.forecast-shell{display:grid;grid-template-columns:265px minmax(0,1fr);gap:0;margin:0 14px;background:#081b2a;border:1px solid #234055;border-radius:9px;overflow:hidden;box-shadow:0 8px 35px #0003;scroll-margin-top:10px}.sidebar{padding:17px 15px 16px;display:flex;flex-direction:column;background:linear-gradient(145deg,#092133 0%,#081a2b 100%);border-right:1px solid #1f3c53}.sidebar-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.sidebar h2{font-size:16px;font-weight:650;margin:0}.live-off{font-size:9px;color:#82bfe9;border:1px solid #2a5d7c;padding:3px 6px;border-radius:5px;letter-spacing:.7px}.control-group{margin-top:19px}.control-label{display:block;color:#e7f1fa;font-size:12px;font-weight:590;margin-bottom:8px}.segmented{display:grid;grid-template-columns:1fr 1fr;gap:7px}.segmented button{padding:9px 3px;border:1px solid #37536a;background:#081b2b;color:#e9f4ff;border-radius:7px;font-weight:600;font-size:12px;white-space:nowrap}.segmented button.active{border-color:#159fff;background:#0f8dec;color:#fff;box-shadow:0 1px 8px #0f8dec30}.control-group select{appearance:none;width:100%;border:1px solid #37546a;padding:10px 27px 10px 9px;color:white;border-radius:6px;background:#132e42 url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%23c0d5e7" stroke-width="2"%3E%3Cpath d="m6 9 6 6 6-6"/%3E%3C/svg%3E') no-repeat right 8px center;font-size:12px}.control-group select option{background:#102b41}.control-hint{display:block;margin-top:6px;color:#79a9c8;font-size:10px}.label-row{display:flex;align-items:center;justify-content:space-between}.label-row output{font-size:13px;color:#4ab7ff;font-weight:700}.time-control input[type=range]{width:100%;accent-color:#079aff;cursor:pointer}.range-labels{display:flex;justify-content:space-between;color:#aec5d8;font-size:10px}.playback{display:flex;gap:6px;justify-content:space-between;margin-top:15px}.playback button,.zoom-controls button{background:#0d293f;border:1px solid #35566d;color:#e2f1ff;border-radius:8px;min-width:35px;min-height:36px;font-size:15px}.playback button:hover,.zoom-controls button:hover{background:#165174}.playback .play{background:#0c90ee;border-color:#159fff}.side-note{font-size:11px;color:#a0b9cc;line-height:1.55;margin:14px 0 0}.sidebar-bottom{margin-top:auto;padding-top:19px}.model-note{display:flex;gap:8px;line-height:1.4;color:#98b3c7;font-size:10px;border-top:1px solid #294357;padding-top:13px}.model-note-icon{flex:0 0 16px;display:grid;place-items:center;border:1px solid #60839c;border-radius:50%;width:16px;height:16px;font-size:10px}.map-column{min-width:0}.map-titlebar{height:42px;padding:0 11px 0 14px;display:flex;align-items:center;justify-content:space-between;gap:8px;background:#061c2e}.map-title{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.map-title strong{font-weight:650}.map-unit{color:#8cb8d6;margin-left:7px}.map-status{display:flex;align-items:center;gap:12px;white-space:nowrap;color:#a8c7dc;font-size:11px}.fullscreen{border:1px solid #3a5872;background:#112d43;border-radius:6px;padding:5px 9px;color:#e7f3ff}.map-stage{position:relative;background:#101f30}.map-view{aspect-ratio:var(--map-aspect, 2);overflow:hidden;touch-action:none;position:relative;cursor:grab;user-select:none}.map-view:active{cursor:grabbing}.map-scene{position:absolute;inset:0;transform-origin:center center;will-change:transform}.map-layer{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none;user-select:none}.map-label{position:absolute;top:12px;left:12px;z-index:1;font-size:10px;font-weight:700;letter-spacing:.5px;color:#fff;background:#071b28db;border:1px solid #87b7cb70;border-radius:5px;padding:6px 8px;pointer-events:none}.zoom-controls{position:absolute;right:12px;top:12px;display:flex;flex-direction:column;gap:5px}.zoom-controls button{font-size:21px;min-height:33px;min-width:34px;background:#092035e8}.geo-readout{position:absolute;bottom:10px;left:10px;background:#071a2bc9;color:#d9f1ff;font-size:11px;padding:6px 9px;border-radius:5px;pointer-events:none}.legend{background:#071c2b;padding:8px 13px 10px;border-top:1px solid #2d4556}.legend-header{display:flex;justify-content:space-between;color:#8cb0c7;font-size:9px;letter-spacing:1.2px;font-weight:700;margin-bottom:6px}.legend-gradient{height:12px;border-radius:3px;background:linear-gradient(to right,#2864c5 0%,#20a9d2 12%,#2dd181 25%,#8be042 36%,#f4df3f 48%,#fc9e33 60%,#f04d3a 70%,#d13999 80%,#a357dc 91%,#f0dfff 100%)}.legend-ticks{display:flex;justify-content:space-between;font-size:10px;color:#bad0df;margin-top:5px}.links-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:11px 14px 16px}.feature{position:relative;display:block;text-align:left;border:1px solid #29455a;background:linear-gradient(155deg,#122c41,#0b2335);border-radius:8px;min-height:132px;padding:16px 14px 15px 57px;color:#f1f8ff}.feature:hover{border-color:#3a83b5;background:#153851}.feature-icon{font-size:30px;position:absolute;top:13px;left:15px;color:#dcefff;font-weight:350}.feature strong{font-size:12px;font-weight:650;display:block}.feature em{font-style:normal;font-weight:500;color:#98b7ce;font-size:9px;margin-left:4px}.feature p{font-size:11px;color:#abc0d0;line-height:1.5;margin:8px 0 10px}.feature small{color:#4cb7ff;font-size:11px;font-weight:600}.about{margin:0 14px 16px;border-top:1px solid #264353;padding:25px 12px 17px;display:grid;grid-template-columns:1fr 1.6fr;gap:30px;scroll-margin-top:18px}.section-overline{font-size:10px;font-weight:700;letter-spacing:2px;color:#56b8f1}.about h2{font-size:20px;font-weight:600;margin:7px 0}.about p{max-width:850px;color:#b7cad9;line-height:1.65;margin:0;font-size:13px}footer{border-top:1px solid #223f53;min-height:50px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding:12px 20px;background:#041523;color:#8fa9bb;font-size:10px}footer strong{font-size:13px;color:white}.footer-line{margin:0 8px;color:#63819a}dialog{border:1px solid #416481;border-radius:12px;padding:22px;max-width:min(92vw,440px);background:#102d43;color:white;box-shadow:0 22px 90px #0009}dialog::backdrop{background:#020b17bc}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:20px}.dialog-head h3{font-size:21px;margin:0}.dialog-head button{background:none;color:#b9d3e4;border:none;font-size:25px}dialog p{line-height:1.6;color:#bed0df;margin:13px 0 24px}.map-stage:fullscreen{background:#071521;display:grid;place-items:center}.map-stage:fullscreen .map-view{width:100%;max-height:100%;aspect-ratio:var(--map-aspect, 2)}.map-stage:fullscreen .map-label{top:20px;left:20px}
@media(max-width:1100px){.topbar{gap:18px;padding:0 15px}.brand-name{font-size:30px}.nav a{padding:0 10px}.header-right{gap:6px}.location-trigger{min-width:135px}.hero-highlights{min-width:210px}.forecast-shell{grid-template-columns:232px minmax(0,1fr)}.map-titlebar{height:auto;min-height:43px}.map-status{gap:6px}.fullscreen span{display:none}.links-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:740px){.topbar{height:auto;min-height:78px;padding:12px 14px;flex-wrap:wrap;gap:9px}.brand{margin-right:auto}.brand-name{font-size:28px}.brand-sub{font-size:9px}.header-right{margin-left:0}.status-pill{display:none}.location-trigger{min-width:0;border-radius:50%;width:36px;height:36px;justify-content:center;padding:5px}.location-trigger span{display:none}.nav{width:100%;height:34px;order:3;justify-content:space-between}.nav a{padding:0 10px;font-size:12px}.hero{padding:25px 18px 27px;min-height:270px;display:block}.hero-highlights{display:none}.hero h1{font-size:29px}.powered{font-size:19px}.hero-description{max-width:330px}.forecast-shell{grid-template-columns:1fr;margin:0 8px}.sidebar{order:2;border-right:0;border-top:1px solid #26465d;display:grid;grid-template-columns:1fr 1fr;column-gap:10px}.sidebar-heading{grid-column:1/-1}.control-group{margin-top:13px}.time-control{grid-column:1/-1}.sidebar-bottom{display:none}.map-column{order:1}.map-titlebar{flex-wrap:wrap;align-content:center;gap:5px;padding:8px 10px}.map-title{font-size:12px}.map-status{font-size:10px;width:100%;justify-content:space-between}.map-view{aspect-ratio:1.55/1}.map-label{font-size:8px;top:8px;left:8px}.zoom-controls{right:7px;top:7px}.zoom-controls button{min-width:30px;min-height:29px;font-size:17px}.links-grid{padding:8px;gap:8px}.feature{min-height:144px;padding:12px 9px 12px 12px}.feature-icon{position:static;font-size:24px;display:block;height:30px}.about{grid-template-columns:1fr;gap:8px;margin:0 8px;padding:20px 8px}.about h2{font-size:18px}footer{justify-content:flex-start}.side-note{display:none}}
@media(prefers-reduced-motion:reduce){:root{scroll-behavior:auto}}

/* v0.2: browser wind-particle overlay and field-dependent legend */
.wind-canvas{position:absolute;inset:0;z-index:2;pointer-events:none;width:100%;height:100%}
.wind-control[hidden]{display:none!important}
.wind-toggle{display:flex;align-items:center;gap:8px;cursor:pointer;color:#d6efff;font-size:12px;font-weight:560}
.wind-toggle input{width:17px;height:17px;accent-color:#139ef2;margin:0;cursor:pointer}
.legend-gradient.wind-legend{background:linear-gradient(to right,#0f355f 0%,#186893 13%,#1ea3b4 22%,#3acba7 32%,#a3dc6f 43%,#f2d850 54%,#ff923f 68%,#e54b4a 80%,#b3489c 92%,#875fcb 100%)}

/* Independent GFS/IFS feed: unavailable driver is disabled rather than showing a demo. */
button[data-model]:disabled {opacity:.34;cursor:not-allowed;}

/* v0.3: legends now match the exact numeric stops in the native NetCDF exporter. */
.legend-gradient{background:linear-gradient(to right,#0050be 0%,#00b9f5 14.29%,#19d24b 28.57%,#f5e128 42.86%,#f28212 57.14%,#e11923 71.43%,#c32daa 85.71%,#ffe1f5 100%)}
.legend-gradient.wind-legend{background:linear-gradient(to right,#1c4b8b 0%,#349bbe 14.29%,#40c38b 28.57%,#f2df5f 42.86%,#f79635 57.14%,#db4d55 71.43%,#b33ba5 85.71%,#e0c3ef 100%)}

/* v0.3.1: fixed-size wind status prevents forecast controls and lower page
   from jumping when each frame finishes fetching U10m/V10m vectors. */
.wind-control #windStatus{height:42px;line-height:14px;overflow:hidden}

/* v0.4.1: Option A temperature palette, exact Celsius-positioned color stops.
   Matches TEMP_STOPS_C / TEMP_STOPS_RGB in the Derecho exporter. */
.legend-gradient.temperature-legend{background:linear-gradient(to right,
  #482779 0.000000%,
  #3A4CAA 14.285714%,
  #307CC5 28.571429%,
  #24A5D5 42.857143%,
  #1EB69F 57.142857%,
  #51C67F 64.285714%,
  #A1D363 71.428571%,
  #E9DC54 78.571429%,
  #F4A04D 85.714286%,
  #DE5B45 92.857143%,
  #9D2546 100.000000%)}
.temperature-control[hidden]{display:none!important}
/* Temperature labels follow their true positions rather than equal spacing. */
.legend-ticks.temperature-ticks{position:relative;display:block;height:16px}
.legend-ticks.temperature-ticks span{position:absolute;top:0;white-space:nowrap}


/* v0.5 - additional field controls, fixed palettes matching the Derecho exporter. */
.precipitation-control[hidden]{display:none!important}
.legend-gradient.pressure-legend{background:linear-gradient(to right,
  #1f3568 0%,#376ca3 14.286%,#659dbf 28.571%,#a5c5cd 42.857%,
  #d6d6c3 57.143%,#e6b191 71.429%,#cf7d84 85.714%,#9d5370 100%)}
.legend-gradient.precipitation-legend{background:linear-gradient(to right,
  #81bfda 0%,#8ad5ed 11.111%,#48aae9 22.222%,#3678d1 33.333%,
  #3ec089 44.444%,#b3db55 55.556%,#fbd641 66.667%,
  #f88038 77.778%,#de3f54 88.889%,#943592 100%)}
.legend-ticks.scaled-ticks{position:relative;display:block;height:19px}
.legend-ticks.scaled-ticks span{position:absolute;top:0;white-space:nowrap;font-size:10px}

/* Avoid colliding labels on narrow mobile screens without altering color values. */
@media (max-width:700px){.legend-ticks.scaled-ticks span:nth-child(even):not(:last-child){display:none}}

/* v0.6: gSAM scientific identity. The longer subtitle remains legible on mobile. */
.brand-sub{font-size:10px;letter-spacing:0.01px;white-space:nowrap}
.brand-name{letter-spacing:-1.4px}
@media(max-width:740px){.brand-sub{font-size:9px;white-space:normal;max-width:240px;line-height:1.25}}


/* v0.8: keep all map controls and the experimental marker OUTSIDE the
   geographic image. Map can be clicked anywhere without UI obstruction. */
.map-utilitybar {
  display:flex; align-items:center; justify-content:flex-end; gap:11px;
  min-height:46px; padding:5px 11px; box-sizing:border-box;
  background:#081e30; border-top:1px solid #315069;
}
.map-stage .geo-readout {
  position:static; margin-right:auto; border:0; background:transparent;
  padding:3px 0; color:#abc6d9; font-size:11px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.map-stage .map-label {
  position:static; flex:0 1 auto; max-width:50%; border:1px solid #51768b;
  padding:5px 8px; background:#0c2b42; color:#dfedfa;
  font-size:10px; line-height:1.2; text-align:center;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.map-stage .zoom-controls {
  position:static; flex:0 0 auto; flex-direction:row; gap:5px;
}
.map-stage .zoom-controls button {
  font-size:18px; min-width:34px; min-height:32px;
  display:grid; place-items:center; border-radius:6px;
}
@media(max-width:740px){
  .map-utilitybar{padding:5px 7px;gap:6px}
  .map-stage .geo-readout{display:none}
  .map-stage .map-label{margin-left:auto; max-width:calc(100% - 115px);font-size:9px;padding:5px}
  .map-stage .zoom-controls button{min-width:29px;min-height:30px;font-size:16px}
}
/* Keep controls beneath the image in full-screen mode too. */
.map-stage:fullscreen{
  display:flex; flex-direction:column; justify-content:center; align-items:stretch;
}
.map-stage:fullscreen .map-view{
  flex:0 1 auto; width:min(100%, calc((100vh - 48px) * var(--map-aspect, 2)));
  max-height:calc(100vh - 48px); margin:auto; aspect-ratio:var(--map-aspect, 2);
}
.map-stage:fullscreen .map-utilitybar{flex:0 0 auto; width:100%;}

/* Five model selector: keep original placement, wrap compactly. */
.segmented{display:flex;flex-wrap:wrap;gap:3px}
.segmented button{white-space:nowrap;flex:1 1 72px;min-width:70px}
.segmented button:disabled{opacity:.48;cursor:not-allowed}
.gm-model-key{flex-wrap:wrap}

/* Missing-field models remain visible but cannot be selected. */
.segmented button:disabled {opacity:.34;filter:grayscale(1);cursor:not-allowed;background:#132536;color:#8b9ead;border-color:#2b3d4b;box-shadow:none}
.segmented button:disabled:hover {background:#132536;border-color:#2b3d4b}

/* Separately editable About section; paragraph spacing is preserved. */
.about-copy p + p{margin-top:12px}

/* Transparent geographic outlines are drawn ABOVE forecast shading. */
.boundary-overlay{z-index:2;opacity:.92}#radar{z-index:1}#basemap{z-index:0}

/* Major cities: separate geographic vector overlay, not scaled with raster.
   Pointer events pass through to the existing map/meteogram interaction. */
.city-control{margin-top:14px}
.city-overlay{position:absolute;inset:0;z-index:4;pointer-events:none;overflow:hidden;user-select:none}
.city-overlay[hidden]{display:none!important}
.city-marker{position:absolute;pointer-events:none;white-space:nowrap}
.city-marker-dot{position:absolute;left:-3px;top:-3px;width:6px;height:6px;box-sizing:border-box;
  background:#ffe5a4;border:1px solid #142939;border-radius:50%;box-shadow:0 0 2px 1px #000a}
.city-marker-name{position:absolute;left:9px;top:0;transform:translateY(-50%);
  color:#fff5d9;font-size:11px;font-weight:650;letter-spacing:.05px;line-height:1.1;
  text-shadow:0 1px 2px #000,1px 0 2px #000,-1px 0 2px #000,0 -1px 2px #000,0 2px 3px #000}
.city-rank-2 .city-marker-dot{background:#e5edf0;width:5px;height:5px;left:-2.5px;top:-2.5px}
.city-rank-2 .city-marker-name{font-weight:580;font-size:10.5px;color:#e1ecf5}
.city-rank-3 .city-marker-dot{background:#d6dfe6;width:4px;height:4px;left:-2px;top:-2px}
.city-rank-3 .city-marker-name{font-size:10px;font-weight:540;color:#e0e8eb}
.city-label-left .city-marker-name{left:auto;right:9px}
@media(max-width:740px){.city-marker-name{font-size:10px}.city-rank-2 .city-marker-name{font-size:9.5px}.city-rank-3 .city-marker-name{font-size:9px}}
