/* Research view: usable phone and tablet layouts without page-wide sideways scrolling. */
@media (max-width: 1100px) {
  body:not(.atlas-compact) .layout { grid-template-columns: minmax(0, 1fr) !important; }
  body:not(.atlas-compact) .atlas-station-map-grid { grid-template-columns: minmax(0, 1fr) !important; }
  body:not(.atlas-compact) .atlas-station-map-grid .maparea { order: -1; }
  body:not(.atlas-compact) .atlas-station-sidebar .stationlist { max-height: 320px; }
  body:not(.atlas-compact) .wrap > *,
  body:not(.atlas-compact) .layout > *,
  body:not(.atlas-compact) .atlas-station-map-grid > * { min-width: 0; max-width: 100%; }
}
@media (max-width: 720px) {
  html, body { max-width: 100%; }
  body:not(.atlas-compact) .wrap { width: 100%; padding: 12px 14px 40px !important; }
  body:not(.atlas-compact) header.top { display:flex !important; flex-wrap:wrap !important; gap:14px !important; padding:10px 0 16px !important; }
  body:not(.atlas-compact) header.top .brand { font-size:clamp(31px,9vw,42px) !important; letter-spacing:-2px !important; }
  body:not(.atlas-compact) header.top .wa-header-actions { width:100%; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; }
  body:not(.atlas-compact) header.top .appearance-control { grid-column:1/-1; justify-content:space-between; min-width:0; }
  body:not(.atlas-compact) header.top .wa-shared-nav { grid-column:1; display:flex; flex-wrap:wrap; min-width:0; }
  body:not(.atlas-compact) header.top .atlas-view-switch { grid-column:2; margin:0; width:auto; }
  body:not(.atlas-compact) header.top .wa-shared-nav a { font-size:12px; padding:9px 11px; }
  body:not(.atlas-compact) header.top .atlas-view-switch button { font-size:12px; padding:9px 10px; }
  body:not(.atlas-compact) main.wrap > .intro { padding:20px 0 14px; }
  body:not(.atlas-compact) main.wrap > .intro h1 { font-size:clamp(28px,8vw,40px) !important; line-height:1.12; letter-spacing:-1.3px !important; overflow-wrap:break-word; }
  body:not(.atlas-compact) .atlas-dashboard { padding:9px !important; max-width:100%; min-width:0; }
  body:not(.atlas-compact) .dashboard-caption { display:none; }
  body:not(.atlas-compact) .dashboard-actions { flex-wrap:nowrap; width:100%; min-width:0; overflow-x:auto; overscroll-behavior-x:contain; }
  body:not(.atlas-compact) .dashboard-actions button,
  body:not(.atlas-compact) .dashboard-actions a { flex:0 0 auto; font-size:11px; padding:9px 10px; }
  body:not(.atlas-compact) .panel,
  body:not(.atlas-compact) .atlas-alerts,
  body:not(.atlas-compact) .atlas-current,
  body:not(.atlas-compact) .atlas-forecast,
  body:not(.atlas-compact) .atlas-ten-day,
  body:not(.atlas-compact) .atlas-fortnight,
  body:not(.atlas-compact) .atlas-bridge { min-width:0; max-width:100%; }
  body:not(.atlas-compact) .panel { padding:16px; }
  body:not(.atlas-compact) .atlas-current,
  body:not(.atlas-compact) .atlas-fortnight { padding:16px !important; }
  body:not(.atlas-compact) .atlas-current-main { flex-direction:column; align-items:stretch; }
  body:not(.atlas-compact) .atlas-current-primary { flex-direction:column; align-items:flex-start; gap:8px; }
  body:not(.atlas-compact) .atlas-current-metrics { min-width:0; width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); }
  body:not(.atlas-compact) .atlas-current-records { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body:not(.atlas-compact) .atlas-current-records > div:first-child { grid-column:1/-1; }
  body:not(.atlas-compact) .atlas-fortnight-head,
  body:not(.atlas-compact) .atlas-current-heading { align-items:flex-start; flex-wrap:wrap; }
  body:not(.atlas-compact) .atlas-fortnight-head h2 { font-size:22px; }
  body:not(.atlas-compact) .atlas-fortnight-plot,
  body:not(.atlas-compact) #atlas-fortnight-plot,
  body:not(.atlas-compact) .atlas-bridge-chart,
  body:not(.atlas-compact) .atlas-forecast-chart { display:block; width:100%; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
  body:not(.atlas-compact) .atlas-ten-cards,
  body:not(.atlas-compact) .atlas-ten-grid { max-width:100%; overflow-x:auto; }
  body:not(.atlas-compact) .atlas-map-toolbar,
  body:not(.atlas-compact) .atlas-map-tools { max-width:100%; min-width:0; }
  body:not(.atlas-compact) .atlas-map-tools .atlas-radar-switch { flex-wrap:wrap; min-width:0; }
  body:not(.atlas-compact) .atlas-map-tools .atlas-radar-colours { max-width:100%; }
  body:not(.atlas-compact) #map { height:340px !important; }
  body:not(.atlas-compact) .station-detail { max-width:calc(100% - 20px); }
  body:not(.atlas-compact) .compare-grid,
  body:not(.atlas-compact) .below { grid-template-columns:minmax(0,1fr) !important; }
  body:not(.atlas-compact) .wa-footer-row { align-items:flex-start; flex-direction:column; }
}
@media (max-width: 380px) {
  body:not(.atlas-compact) .wrap { padding-inline:10px !important; }
  body:not(.atlas-compact) header.top .wa-header-actions { grid-template-columns:1fr; }
  body:not(.atlas-compact) header.top .wa-shared-nav,
  body:not(.atlas-compact) header.top .atlas-view-switch { grid-column:1; }
  body:not(.atlas-compact) .atlas-current-metrics strong { font-size:13px; }
}
