/* status card proportions: coloured block -10%, outlook band +20%, other rows +10% (on top of the height scale --dds) */
html.dd-fit:not(.dd-calm){--zc:.9;--zo:1.1;--zb:1.2;--zbt:1.1;--st3-bh:calc(64px*var(--dds)*var(--zb))}
/* Beach conditions: the first screen follows the visible height (Asaf 24.11). Surf mode only; swim mode (.dd-calm) is not touched.
   dashboard.js sets, on <html>:  --ddk  0..1 (how far the screen is from the smallest to the tallest first screen),
                                  --dds  text and duck scale (about 0.96 at the smallest, 1.17 at the tallest),
                                  --ddg  gap between the cards,
   and adds the class dd-fit. Without the class (script not run, or swim mode) none of these rules apply and the layout is the one from before.
   Phone (up to 900px): status card, metrics tile and weekly strip grow together until the ceiling; the strip always ends above the bottom bar.
   Every size below is "the old size x --dds", so the old layout is simply the case --dds = 1. */

/* ================= phone ================= */
@media(max-width:900px){
 html.dd-fit:not(.dd-calm) body #mapView[data-mode=dashboard]{row-gap:var(--ddg,6px)!important}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt{row-gap:var(--ddg,8px)!important}

 /* ---- status card ---- */
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-in{grid-template-rows:calc(17px*var(--dds)*var(--zo)) 1px minmax(calc(84px*var(--dds)*var(--zc)),max-content) 1px calc(17px*var(--dds)*var(--zo)) 1px calc(17px*var(--dds)*var(--zo)) 1px calc(38px*var(--dds)*var(--zo));row-gap:calc(5px*var(--dds));padding:calc(8px*var(--dds)) 14px;--st3-gy:calc(5px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-b{grid-template-columns:calc(118px*var(--dds)) 1px minmax(0,1fr)!important}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-h{font-size:calc(12px*var(--dds)*var(--zo));line-height:calc(17px*var(--dds)*var(--zo))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-h .tl{font-size:calc(13px*var(--dds)*var(--zo))!important;line-height:calc(17px*var(--dds)*var(--zo))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-word{font-size:calc(34px*var(--dds)*var(--zc));line-height:calc(38px*var(--dds)*var(--zc))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-r .fl-ducks .bath-slot{width:calc(20px*var(--dds)*var(--zc))!important;height:calc(20px*var(--dds)*var(--zc))!important}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-l .st3-say{font-size:calc(14px*var(--dds)*var(--zc));line-height:calc(17px*var(--dds)*var(--zc))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-lbl{font-size:calc(12px*var(--dds)*var(--zc));line-height:calc(14px*var(--dds)*var(--zc))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-hgt{font-size:calc(26px*var(--dds)*var(--zc));line-height:calc(30px*var(--dds)*var(--zc))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt :is(.st3-w,.st3-s){font-size:calc(13px*var(--dds)*var(--zo));line-height:calc(17px*var(--dds)*var(--zo))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-wear{font-size:calc(14px*var(--dds)*var(--zo));line-height:calc(18px*var(--dds)*var(--zo))}
 html.dd-fit:not(.dd-calm) body #mapView #forecast .st3-band{height:calc(52px*var(--dds)*var(--zb))}
 html.dd-fit:not(.dd-calm) body #mapView #forecast .st3-band-k{font-size:calc(12px*var(--dds)*var(--zbt));line-height:calc(14px*var(--dds)*var(--zbt))}
 html.dd-fit:not(.dd-calm) body #mapView #forecast .st3-band-slot{font-size:calc(14px*min(var(--dds),1));line-height:calc(17px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #mapView #forecast .st3-band #bestWeek :is(.bw-text,.bw-body,.bw-today,.bw-dot,.bw-best,.bw-facts){font-size:calc(14px*min(var(--dds),1))!important}
 html.dd-fit:not(.dd-calm) body #mapView #forecast .st3-band #bestWeek :is(.bw-text,.bw-body){line-height:calc(17px*var(--dds))!important}
 html.dd-fit:not(.dd-calm) body #mapView #forecast .st3-band #bestWeek>.bw-go{width:calc(24px*var(--dds)*var(--zbt));height:calc(24px*var(--dds)*var(--zbt));font-size:calc(17px*var(--dds)*var(--zbt))}

 /* ---- metrics tile (five narrow columns: the text grows at most x1.06, so a number such as 21.4°C never touches its neighbour) ---- */
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-i{padding:calc(6px*var(--dds)) 2px calc(4px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-l{height:calc(20px*var(--dds));font-size:calc(13px*min(var(--dds),1.06))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-ic svg{width:calc(18px*var(--dds));height:calc(18px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-v{height:calc(24px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-v b{font-size:calc(18px*min(var(--dds),1.06));line-height:calc(24px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-v small{font-size:calc(13px*min(var(--dds),1.06))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-s{font-size:calc(13px*min(var(--dds),1.06));line-height:calc(16px*var(--dds));min-height:calc(32px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-map{min-height:calc(44px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-pill{height:calc(28px*var(--dds));font-size:calc(13px*min(var(--dds),1.04))}
 /* English: the button label is longer than two columns; it sits under the first three, from the start edge */
 html.dd-fit[lang=en]:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-map{grid-column:1/span 3;justify-self:start;margin-inline-start:6px}

 /* ---- weekly strip (day name and date are as wide as their column allows: they grow at most x1.02) (the strip's columns also get the extra height, up to +24px; compressed on scroll it still folds to the same 22px) ---- */
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini):not(.wk-weekmode) .wk-v2 .wk-day .wk-bars{height:calc((63px + 24px*var(--ddk))*(1 - var(--p,0)) + 22px*var(--p,0))!important}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini).wk-weekmode .wk-v2 .wk-day .wk-bars{height:calc((49px + 24px*var(--ddk))*(1 - var(--p,0)) + 22px*var(--p,0))!important}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini) .wk-v2 .wk-day .wk-nd b{font-size:calc(13px*min(var(--dds),1.02))!important}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini) .wk-v2 .wk-day .wk-nd small{font-size:calc(12px*min(var(--dds),1.02))!important}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini) .wk-v2 .wk-day .wk-wx svg{width:calc(15px*var(--dds));height:calc(15px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini) .wk-v2 .wk-day .wk-h{font-size:calc(12.5px*var(--dds))!important;height:calc(16px*var(--dds));line-height:calc(16px*var(--dds))!important}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini) .wk-v2 .wk-day .wk-h .wk-rng{font-size:calc(11px*var(--dds))!important}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini) .wk-v2 .wk-day .wk-kn3{font-size:calc(12px*var(--dds));height:calc(12px*var(--dds));line-height:calc(12px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini) .wk-v2 .wk-war{height:calc(28px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini).wk-sticky .wk-v2 .wk-war{height:calc((1 - var(--p,0))*28px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini) .wk-v2 .wk-war .ar-svg{width:calc(12px*var(--dds));height:calc(12px*var(--dds))}
}

/* ================= wide screens (901px and up) =================
   Status card and metrics tile are one height (--st3-h, set by dashboard.js, was a fixed 469px) and the weekly strip's columns get up to +36px;
   the whole first screen is at most about 780px under the header. The card's body row takes whatever is left (it is the 1fr row). */
@media(min-width:901px){
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-in{grid-template-rows:calc(20px*var(--dds)*var(--zo)) 1px minmax(0,1fr) 1px calc(22px*var(--dds)*var(--zo)) 1px calc(20px*var(--dds)*var(--zo)) 1px calc(50px*var(--dds)*var(--zo)) 1px calc(30px*var(--dds)*var(--zo));row-gap:calc(9px*var(--dds));padding:calc(12px*var(--dds)) 18px;--st3-gy:calc(9px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-h{font-size:calc(14px*var(--dds)*var(--zo));line-height:calc(20px*var(--dds)*var(--zo))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-h .tl{font-size:calc(13px*var(--dds)*var(--zo))!important;line-height:calc(20px*var(--dds)*var(--zo))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-word{font-size:calc(58px*var(--dds)*var(--zc));line-height:calc(62px*var(--dds)*var(--zc))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-r .fl-ducks .bath-slot{width:calc(40px*var(--dds)*var(--zc))!important;height:calc(40px*var(--dds)*var(--zc))!important}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-l .st3-say{font-size:calc(21px*var(--dds)*var(--zc));line-height:calc(26px*var(--dds)*var(--zc))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-lbl{font-size:calc(15px*var(--dds)*var(--zc));line-height:calc(18px*var(--dds)*var(--zc))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-hgt{font-size:calc(50px*var(--dds)*var(--zc));line-height:calc(56px*var(--dds)*var(--zc))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt :is(.st3-w,.st3-s){font-size:calc(14px*var(--dds)*var(--zo));line-height:calc(20px*var(--dds)*var(--zo))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-rep{font-size:calc(14px*var(--dds)*var(--zo))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles.has-mt .st3-wear{font-size:calc(15px*var(--dds)*var(--zo));line-height:calc(20px*var(--dds)*var(--zo))}
 html.dd-fit:not(.dd-calm) body #mapView #forecast .st3-band{height:calc(64px*var(--dds)*var(--zb))}
 html.dd-fit:not(.dd-calm) body #mapView #forecast .st3-band-k{font-size:calc(13px*var(--dds)*var(--zbt));line-height:calc(17px*var(--dds)*var(--zbt))}
 html.dd-fit:not(.dd-calm) body #mapView #forecast .st3-band-slot{font-size:calc(17px*var(--dds)*var(--zbt))}
 html.dd-fit:not(.dd-calm) body #mapView #forecast .st3-band #bestWeek :is(.bw-text,.bw-body,.bw-today,.bw-dot,.bw-best,.bw-facts){font-size:calc(17px*var(--dds)*var(--zbt))!important}

 /* metrics tile (rows share the card's height) */
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-l{font-size:calc(13px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-ic svg{width:calc(18px*var(--dds));height:calc(18px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-v b{font-size:calc(20px*var(--dds));line-height:calc(25px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-v small{font-size:calc(13px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-s{font-size:calc(13px*var(--dds))}

 /* weekly strip: the columns take the extra height (up to +36px); compressed on scroll the strip folds as before */
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini) .wk-v2 .wk-day .wk-bars{height:calc((92px + 36px*var(--ddk))*(1 - var(--p,0)) + 40px*var(--p,0))!important}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini) .wk-v2 .wk-day .wk-nd b{font-size:calc(13px*min(var(--dds),1.04))!important}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini) .wk-v2 .wk-day .wk-nd small{font-size:calc(13px*min(var(--dds),1.04))!important}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini) .wk-v2 .wk-day .wk-kn3{font-size:calc(13px*var(--dds))}
 html.dd-fit:not(.dd-calm) body #forecast .weekly-forecast:not(.wk-mini) .wk-v2 .wk-unit{font-size:calc(13px*var(--dds))}
}

/* narrow wide layout (901-1199): the metrics tile is only ~180px wide, so its texts are not scaled up and the label column is narrower */
@media(min-width:901px) and (max-width:1199px){
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-l{width:74px;font-size:12.5px}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-v b{font-size:calc(18px*min(var(--dds),1));line-height:calc(23px*min(var(--dds),1))}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 :is(.mt-v small,.mt-s){font-size:12.5px}
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-i{padding:6px 8px}
}
@media(min-width:901px) and (max-width:1050px){
 html.dd-fit:not(.dd-calm) body #mapView #dashTiles .mt2 .mt-v b{font-size:17px}
}
