/* Clean Heat Partners - shared stylesheet for the data maps in /maps/
   (decisions/0014). Loaded after tokens.css, which Hugo publishes next to
   this file from site/assets/css/tokens.css (the design system copy).
   Colours, radii, shadows and type use design system tokens by name.

   The maps are small data apps, so they follow the app scale: 14 px
   (type-small) for running text and tables, 12 px (type-tiny) for labels,
   badges and legends. Boxes use the leaf shape. Sentence case everywhere,
   no text-transform. */

@font-face{font-family:"Poppins";src:url("../assets/fonts/poppins-400.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Poppins";src:url("../assets/fonts/poppins-500.woff2") format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"Poppins";src:url("../assets/fonts/poppins-600.woff2") format("woff2");font-weight:600;font-display:swap}

/* Light and dark theme (decisions/0027): theme.js sets <html data-theme>, and
   tokens.css switches every semantic token with it. This file uses semantic
   tokens (surface-*, text-*, border-*, interactive-*, state-*, viz-*) so both
   themes follow; the few rules that need a different choice in dark sit in
   [data-theme="dark"] blocks next to their light rule. In light every value
   is the same as before the dark theme was added.

   --on-band: small text on the deep header band (surface-brand-deep).
     chp-teal-100 on chp-teal-dark 7.4:1 (light), on chp-night-900 14.0:1 (dark).
   --map-neutral-1..4: the grey data colours (coal, catch-all groups), from
     strongest to weakest against the ground. In dark the neutral ramp is
     mirrored so the order of emphasis stays the same on a dark ground. The
     page scripts read these by name, like the viz- tokens. */
:root{--leaf:var(--radius-lg) 0;--on-band:var(--chp-teal-100);--band-rule:var(--chp-teal-600);
  --map-neutral-1:var(--chp-neutral-700);--map-neutral-2:var(--chp-neutral-500);
  --map-neutral-3:var(--chp-neutral-400);--map-neutral-4:var(--chp-neutral-300)}
[data-theme="dark"]{
  --map-neutral-1:var(--chp-neutral-200);--map-neutral-2:var(--chp-neutral-400);
  --map-neutral-3:var(--chp-neutral-500);--map-neutral-4:var(--chp-neutral-600)}
/* Native controls (select lists, checkbox, scroll bars) in their dark form.
   Set on the root, like site.css on the article page: when the root
   color-scheme of the iframe differs from the page around it, the browser
   paints the iframe background opaque (a white edge around the map). */
[data-theme="dark"]{color-scheme:dark}

html,body{margin:0;padding:0;background:transparent}
html{-webkit-text-size-adjust:100%}
/* Opened on its own (not inside the article iframe): cream page with a gutter. */
html.standalone body{background:var(--surface-page);padding:var(--space-5)}
html.standalone .pm{max-width:1440px;margin:0 auto}

/* ---- Top bar on its own page (standalone.js): logo, language switch,
   theme switch, as in the site header. Not in the article iframe, where
   the site header carries them. Switch styles follow site.css (.langs,
   .theme-switch): a sunken track, the current choice a raised card. ---- */
.pm-bar{max-width:1440px;margin:0 auto var(--space-4);display:flex;align-items:center;justify-content:space-between;
  gap:var(--space-3);flex-wrap:wrap;font-family:var(--font-sans)}
.pm-bar *{box-sizing:border-box}
.pm-bar-logo{display:block;border-radius:var(--radius-sm)}
.pm-bar-logo img{display:block;height:42px;width:auto}
.pm-bar .chp-logo-dark{display:none}
[data-theme="dark"] .pm-bar .chp-logo-light{display:none}
[data-theme="dark"] .pm-bar .chp-logo-dark{display:block}
.pm-bar-tools{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap}
.pm-langs,.pm-theme{display:inline-flex;align-items:center;gap:2px;padding:3px;background:var(--surface-sunken);
  border-radius:var(--radius-pill);color:var(--text-muted)}
.pm-langs{padding-left:8px}
.pm-langs > svg{width:15px;height:15px;margin-right:2px;flex:none}
.pm-lang{display:inline-grid;place-items:center;height:30px;min-width:29px;padding:0 5px;border-radius:var(--radius-pill);
  font-size:13.6px;line-height:1;color:var(--text-muted);text-decoration:none;transition:background .15s,color .15s,box-shadow .15s}
a.pm-lang:hover{color:var(--text-strong)}
.pm-lang[aria-current]{background:var(--surface-card);color:var(--text-label);font-weight:var(--fw-medium);box-shadow:var(--shadow-sm)}
.pm-theme button{display:inline-grid;place-items:center;width:34px;height:30px;padding:0;border:0;border-radius:var(--radius-pill);
  background:none;color:var(--text-muted);cursor:pointer;transition:background .15s,color .15s,box-shadow .15s}
.pm-theme button:hover{color:var(--text-strong)}
.pm-theme button[aria-pressed="true"]{background:var(--surface-card);color:var(--text-label);box-shadow:var(--shadow-sm)}
.pm-theme svg{width:17px;height:17px}
.pm-bar a:focus-visible,.pm-bar button:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}
/* the full language name, read out by screen readers only */
.pm-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media print{.pm-bar{display:none}}

.pm{font-family:var(--font-sans);font-size:var(--fs-small);line-height:var(--lh-small);color:var(--text-body);
  font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased;
  border-radius:var(--leaf);overflow:hidden;border:1px solid var(--border-subtle)}
.pm *{box-sizing:border-box}
.pm p,.pm h2,.pm h3,.pm h4{margin:0}
.pm a{color:var(--text-link);text-decoration:none}
.pm a:hover{text-decoration:underline}
.pm table{border-collapse:collapse;width:100%;margin:0}
.pm img{max-width:none}
.pm :focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}

/* ---- header band: surface-brand-deep (chp-teal-dark, chp-night-900 in dark)
   with white text; chp-teal-200 highlights 5.9:1 (light) and 11.1:1 (dark) ---- */
.pm-head{background:var(--surface-brand-deep);color:var(--text-on-brand);padding:var(--space-5) var(--space-5) 0}
.pm-head .eyebrow{font-size:var(--fs-tiny);line-height:var(--lh-tiny);font-weight:var(--fw-medium);letter-spacing:var(--tracking-label);color:var(--on-band);margin-bottom:var(--space-2)}
.pm-head h2{font-size:var(--fs-title);line-height:var(--lh-title);font-weight:var(--fw-semibold);letter-spacing:var(--tracking-display);color:var(--text-on-brand);margin-bottom:var(--space-4)}
.pm-head p{color:var(--on-band);max-width:68ch;margin-bottom:var(--space-5)}
.pm-head p b{color:var(--text-on-brand);font-weight:var(--fw-medium)}

/* national fuel spectrum, the headline finding */
/* the track only shows in hairline gaps between segments, in both themes */
.pm-spec .bar{display:flex;height:24px;border-radius:var(--radius-xs);overflow:hidden;background:var(--chp-teal-800)}
.pm-spec .leg{display:flex;flex-wrap:wrap;gap:var(--space-1) var(--space-4);margin-top:var(--space-3);padding-bottom:var(--space-5)}
.pm-spec .leg .i{display:flex;align-items:center;gap:6px;font-size:var(--fs-tiny);color:var(--on-band)}
.pm-spec .leg .sw{width:10px;height:10px;border-radius:2px;flex-shrink:0}
.pm-spec .leg b{color:var(--text-on-brand);font-weight:var(--fw-medium)}

/* key figures: label, value with unit, one line of context */
/* The 1 px grid gap shows the band-rule background as hairlines between cells. */
.pm-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--band-rule);border-top:1px solid var(--band-rule);margin:0 calc(-1 * var(--space-5))}
.pm-kpis--5{grid-template-columns:repeat(5,1fr)}
.pm-kpi{padding:var(--space-4) var(--space-5);background:var(--surface-brand-deep)}
.pm-kpi .l{font-size:var(--fs-tiny);line-height:var(--lh-tiny);font-weight:var(--fw-medium);color:var(--on-band);margin-bottom:var(--space-2)}
.pm-kpi .v{font-size:var(--fs-title);line-height:1;font-weight:var(--fw-semibold);color:var(--text-on-brand)}
.pm-kpi .v small{font-size:var(--fs-tiny);font-weight:var(--fw-regular);color:var(--on-band);margin-left:4px}
.pm-kpi .s{font-size:var(--fs-tiny);line-height:var(--lh-tiny);color:var(--on-band);margin-top:var(--space-2)}

/* ---- body on cream ---- */
.pm-body{background:var(--surface-page);padding:var(--space-5)}

/* level switch: design system Tabs, pill variant */
.pm-lvlbar{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);flex-wrap:wrap;margin-bottom:var(--space-3)}
.pm-toggle{display:inline-flex;background:var(--surface-card);border:1px solid var(--border-subtle);border-radius:var(--radius-pill);padding:3px;gap:2px}
.pm-toggle button{border:0;background:transparent;padding:8px 18px;border-radius:var(--radius-pill);cursor:pointer;font:var(--fw-medium) var(--fs-small)/1 var(--font-sans);color:var(--text-body)}
.pm-toggle button.on{background:var(--interactive-primary);color:var(--text-on-interactive)}
.pm-toggle button:not(.on):hover{background:var(--surface-sunken)}
.pm-lvlbar .hint{color:var(--text-muted)}

/* filters: inputs and selects on cream, no extra box */
.pm-ctrl{display:flex;gap:var(--space-2);flex-wrap:wrap;align-items:center;margin-bottom:var(--space-4)}
.pm-ctrl input[type=text],.pm-ctrl select{font:var(--fw-regular) var(--fs-small)/1.4 var(--font-sans);color:var(--text-strong);background:var(--surface-field);
  border:1px solid var(--border-control);border-radius:var(--radius-md);padding:9px 12px;min-height:40px;outline:none}
.pm-ctrl input[type=text]{flex:1 1 220px;min-width:0}
.pm-ctrl input[type=text]::placeholder{color:var(--text-subtle)}
.pm-ctrl select{cursor:pointer;max-width:100%}
.pm-ctrl input[type=text]:focus,.pm-ctrl select:focus{border-color:var(--focus-ring);box-shadow:var(--shadow-focus)}
.pm-ctrl label{display:flex;align-items:center;gap:6px;cursor:pointer;color:var(--text-body)}
.pm-ctrl input[type=checkbox]{width:16px;height:16px;margin:0;accent-color:var(--interactive-primary)}
/* outline button */
.pm-ctrl button{font:var(--fw-medium) var(--fs-small)/1 var(--font-sans);color:var(--text-link);background:transparent;
  border:1px solid var(--interactive-primary);border-radius:var(--radius-xs);padding:0 16px;min-height:40px;cursor:pointer}
.pm-ctrl button:hover{background:var(--state-positive-bg);color:var(--text-label)}

/* map plus side column */
.pm-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:var(--space-4);margin-bottom:var(--space-5)}
.pm-map{height:620px;border:1px solid var(--border-subtle);border-radius:var(--leaf);background:var(--surface-sunken);z-index:1}
.pm-side{display:flex;flex-direction:column;gap:var(--space-3);max-height:620px;overflow:auto}

/* Card role: white, 1 px border-subtle, leaf shape */
.pm-card,.pm-tbl{background:var(--surface-card);border:1px solid var(--border-subtle);border-radius:var(--leaf)}
.pm-card h3,.pm-tbl .hd h3{font-size:var(--fs-subhead);line-height:var(--lh-subhead);font-weight:var(--fw-semibold);color:var(--text-strong)}
.pm-card h3{padding:var(--space-4) var(--space-4) 0}
.pm-card .in{padding:var(--space-3) var(--space-4) var(--space-4)}

/* clickable legend */
.pm-leg{display:flex;flex-direction:column;gap:2px}
.pm-leg .i{display:flex;align-items:center;gap:var(--space-2);cursor:pointer;padding:4px 6px;margin:0 -6px;border-radius:var(--radius-xs)}
.pm-leg .i:hover{background:var(--surface-sunken)}
.pm-leg .i.off{opacity:.35}
.pm-leg .dot{width:12px;height:12px;border-radius:50%;flex-shrink:0;border:2px solid var(--surface-card);box-shadow:0 0 0 1px var(--border-strong)}
.pm-leg .gw,.pm-leg .mw{margin-left:auto;font-size:var(--fs-tiny);color:var(--text-muted)}
.pm-leg .n{font-size:var(--fs-tiny);color:var(--text-muted);min-width:28px;text-align:right}

/* selected plant or unit */
.pm-empty{color:var(--text-muted);padding:var(--space-3) var(--space-4) var(--space-4)}
.pm-det h4{font-size:var(--fs-subhead);line-height:var(--lh-subhead);font-weight:var(--fw-semibold);color:var(--text-strong);margin-bottom:4px}
.pm-det .sub{font-size:var(--fs-tiny);line-height:var(--lh-tiny);color:var(--text-muted);margin-bottom:var(--space-3)}
.pm-det .row{display:flex;justify-content:space-between;gap:var(--space-3);padding:6px 0;border-bottom:1px solid var(--border-subtle)}
.pm-det .row:last-child{border-bottom:0}
.pm-det .row .k{color:var(--text-muted)}
.pm-det .row .v{font-weight:var(--fw-medium);color:var(--text-strong);text-align:right}
.pm-det .note{font-size:var(--fs-tiny);line-height:1.6;color:var(--text-body);margin-top:var(--space-3);padding-top:var(--space-3);border-top:1px solid var(--border-subtle)}
.pm-lbl{font-size:var(--fs-tiny);line-height:var(--lh-tiny);font-weight:var(--fw-medium);color:var(--text-label);margin:var(--space-4) 0 var(--space-2)}
.pm-mix{display:flex;flex-direction:column;gap:6px}
.pm-mix .r{display:grid;grid-template-columns:minmax(0,1fr) 72px 40px;align-items:center;gap:var(--space-2);font-size:var(--fs-tiny)}
.pm-mix .r .nm{display:flex;align-items:center;gap:6px;min-width:0}
.pm-mix .r .nm span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-mix .r .sw{width:10px;height:10px;border-radius:2px;flex-shrink:0}
.pm-mix .r .g{text-align:right;color:var(--text-muted)}
.pm-mix .r .p{text-align:right;font-weight:var(--fw-medium)}
.pm-mixbar{display:flex;height:10px;border-radius:2px;overflow:hidden;background:var(--surface-sunken);margin-bottom:var(--space-3)}
/* yearly output, a small bar chart in viz-cat-1 */
.pm-bars{display:flex;gap:var(--space-3);align-items:flex-end;height:72px;margin:var(--space-3) 0 4px}
.pm-bars .yb{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px}
.pm-bars .b{width:100%;max-width:42px;background:var(--viz-cat-1);border-radius:2px 2px 0 0}
.pm-bars .t{font-size:var(--fs-tiny);color:var(--viz-axis-text)}
.pm-bars .a{font-size:var(--fs-tiny);font-weight:var(--fw-medium)}
.pm-bars-cap{text-align:center;font-size:var(--fs-tiny);color:var(--text-muted);margin-bottom:var(--space-3)}
.pm-sites{display:flex;flex-direction:column;border-top:1px solid var(--border-subtle)}
.pm-sites .s{display:flex;justify-content:space-between;gap:var(--space-3);padding:var(--space-2) 0;border-bottom:1px solid var(--border-subtle);font-size:var(--fs-tiny);line-height:var(--lh-tiny)}
.pm-sites .s .a b{display:block;font-size:var(--fs-small);font-weight:var(--fw-medium);color:var(--text-strong)}
.pm-sites .s .a span,.pm-sites .s .b span{color:var(--text-muted)}
.pm-sites .s .b{text-align:right;font-weight:var(--fw-medium);white-space:nowrap}
.pm-sites .s .b span{display:block;font-weight:var(--fw-regular)}
/* large readout, teal text under 36 px uses text-link */
.pm-cop{font-size:var(--fs-title);line-height:1;font-weight:var(--fw-semibold);color:var(--text-link);margin:var(--space-3) 0 2px}
.pm-cop small{font-size:var(--fs-tiny);font-weight:var(--fw-regular);color:var(--text-muted);margin-left:6px}

/* Badge: neutral and brand tones */
.pm-pill{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:var(--radius-pill);font-size:var(--fs-tiny);line-height:var(--lh-tiny);font-weight:var(--fw-medium);background:var(--surface-sunken);color:var(--text-body);white-space:nowrap}
.pm-pill.k{background:var(--state-positive-bg);color:var(--text-label)}
.pm-sdot{display:inline-block;width:10px;height:10px;border-radius:50%;flex-shrink:0;vertical-align:-1px;margin-right:6px}
.pm-pill .pm-sdot{margin-right:0}

/* warnings: design system warning tint */
.pm-warn{background:var(--state-warning-bg);color:var(--state-warning-text);border-radius:var(--leaf);padding:var(--space-3) var(--space-4);font-size:var(--fs-tiny);line-height:1.6;margin-top:var(--space-3)}
.pm-suspect{color:var(--state-warning-text)}
.pm-disc{margin-bottom:var(--space-4);background:var(--state-warning-bg);color:var(--state-warning-text);border-radius:var(--leaf)}
.pm-disc summary{list-style:none;cursor:pointer;display:flex;align-items:baseline;gap:var(--space-2);padding:var(--space-3) var(--space-4)}
.pm-disc summary::-webkit-details-marker{display:none}
.pm-disc summary b{font-weight:var(--fw-medium);white-space:nowrap}
.pm-disc summary .more{margin-left:auto;font-weight:var(--fw-medium);white-space:nowrap;text-decoration:underline;text-underline-offset:.18em}
.pm-disc .in{padding:0 var(--space-4) var(--space-3)}
.pm-disc ul{margin:0;padding-left:18px;line-height:1.6}
.pm-disc li{margin-bottom:4px}
.pm-disc b{font-weight:var(--fw-medium)}

/* ---- table: design system rule ---- */
.pm-tbl{overflow:hidden;margin-bottom:4px}
.pm-tbl .hd{padding:var(--space-4) var(--space-4) 0;display:flex;justify-content:space-between;align-items:baseline;gap:var(--space-3);flex-wrap:wrap}
.pm-tbl .hd .note{font-size:var(--fs-tiny);color:var(--text-muted)}
.pm-scroll{max-height:460px;overflow:auto;margin-top:var(--space-3);-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
/* No header fill; the white background only hides rows scrolling under the sticky header. */
.pm-scroll thead th{background:var(--surface-card);text-align:left;padding:10px 12px;font-weight:var(--fw-medium);color:var(--text-label);
  box-shadow:inset 0 -2px 0 var(--text-label);cursor:pointer;white-space:nowrap;position:sticky;top:0;z-index:2;user-select:none}
.pm-scroll thead th:hover{color:var(--text-link)}
.pm-scroll thead th.r{text-align:right}
.pm-scroll thead th.active{color:var(--text-link)}
.pm-scroll tbody tr{border-bottom:1px solid var(--border-subtle);cursor:pointer}
.pm-scroll tbody tr:hover{background:var(--surface-sunken)}
.pm-scroll tbody tr.sel,.pm-scroll tbody tr.sel:hover{background:var(--state-positive-bg)}
.pm-scroll tbody td{padding:10px 12px;white-space:nowrap;vertical-align:top}
.pm-scroll td.r{text-align:right}
.pm-scroll td.nm{white-space:normal;min-width:180px;max-width:260px}
.pm-scroll td.nm b{display:block;font-weight:var(--fw-medium);color:var(--text-strong)}
.pm-scroll td.nm span,.pm-scroll td .sm{display:block;font-size:var(--fs-tiny);line-height:var(--lh-tiny);color:var(--text-muted);margin-top:2px}
/* empty cells: text-muted, as text-subtle is under 4.5:1 on the card in
   both themes (3.9:1 light, 4.2:1 dark) */
.pm-scroll .none{color:var(--text-muted)}
.pm .muted{color:var(--text-muted);font-weight:var(--fw-regular)}
.pm-scroll td.msg{padding:var(--space-5);text-align:center;color:var(--text-muted);white-space:normal;cursor:default}
.pm-minibar{display:flex;width:88px;height:8px;margin-top:6px;border-radius:2px;overflow:hidden;background:var(--surface-sunken)}
.pm-minibar span{height:100%}

.pm-foot{font-size:var(--fs-tiny);line-height:1.65;color:var(--text-muted);margin-top:var(--space-4)}
.pm-foot a{font-weight:var(--fw-medium)}
.pm-foot code{font-family:var(--font-sans);background:var(--surface-sunken);padding:1px 5px;border-radius:var(--radius-xs)}

/* ---- Leaflet inside the map ---- */
.pm .leaflet-container{font-family:var(--font-sans);font-size:var(--fs-tiny);border-radius:var(--leaf)}
.pm .leaflet-popup-content-wrapper{border-radius:var(--leaf);box-shadow:var(--shadow-md)}
.pm .leaflet-popup-content{margin:12px 14px;font-size:var(--fs-small);line-height:1.5;color:var(--text-body)}
.pm .leaflet-popup-content b{font-weight:var(--fw-medium);color:var(--text-strong)}
.pm .leaflet-popup-content .pop-t{font-size:var(--fs-small)}
.pm .leaflet-popup-content .pop-s{font-size:var(--fs-tiny);color:var(--text-muted)}
.pm .leaflet-popup-content .pop-b{margin-top:var(--space-2);font-size:var(--fs-tiny);line-height:1.7}
.pm .leaflet-bar a{color:var(--text-strong)}
/* keep the attribution clear of the rounded bottom-right corner */
.pm .leaflet-container .leaflet-control-attribution{margin-right:var(--space-3)}
/* Leaflet's own stylesheet paints popups, zoom buttons and the attribution
   white with grey text. Light keeps those; dark uses the card tokens. */
[data-theme="dark"] .pm .leaflet-popup-content-wrapper,
[data-theme="dark"] .pm .leaflet-popup-tip{background:var(--surface-card);color:var(--text-body);box-shadow:var(--shadow-md)}
[data-theme="dark"] .pm .leaflet-container a.leaflet-popup-close-button{color:var(--text-muted)}
[data-theme="dark"] .pm .leaflet-container a.leaflet-popup-close-button:hover,
[data-theme="dark"] .pm .leaflet-container a.leaflet-popup-close-button:focus{color:var(--text-strong)}
[data-theme="dark"] .pm .leaflet-bar a{background-color:var(--surface-card);color:var(--text-strong);border-bottom-color:var(--border-default)}
[data-theme="dark"] .pm .leaflet-bar a:hover,
[data-theme="dark"] .pm .leaflet-bar a:focus{background-color:var(--surface-sunken)}
[data-theme="dark"] .pm .leaflet-bar a.leaflet-disabled{background-color:var(--surface-card);color:var(--text-subtle)}
[data-theme="dark"] .pm .leaflet-touch .leaflet-bar{border-color:var(--border-default)}
[data-theme="dark"] .pm .leaflet-container .leaflet-control-attribution{background:var(--surface-card);color:var(--text-muted)}

/* Click-to-load notice for the background tiles: a floating card. */
.tile-gate{position:absolute;z-index:1000;left:12px;right:12px;top:12px;max-width:420px;background:var(--surface-card);
  border:1px solid var(--border-subtle);border-radius:var(--leaf);box-shadow:var(--shadow-md);padding:var(--space-3) var(--space-4);
  font:var(--fw-regular) var(--fs-small)/1.5 var(--font-sans);color:var(--text-body)}
.tile-gate button{display:block;margin-top:var(--space-2);font:var(--fw-medium) var(--fs-small)/1 var(--font-sans);color:var(--text-on-interactive);
  background:var(--interactive-primary);border:0;border-radius:var(--radius-xs);padding:10px 16px;cursor:pointer}
.tile-gate button:hover{background:var(--interactive-primary-hover)}
.tile-gate button:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}

/* ---- narrower screens ---- */
@media (max-width:1000px){
  .pm-grid{grid-template-columns:1fr}
  .pm-side{max-height:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));align-items:start}
  /* details of a tapped marker show right under the map, above the legend */
  .pm-side .pm-card:last-child{order:-1}
  .pm-map{height:460px}
  .pm-kpis,.pm-kpis--5{grid-template-columns:repeat(2,1fr)}
  .pm-kpis--5 .pm-kpi:last-child{grid-column:1 / -1}
}
@media (max-width:600px){
  html.standalone body{padding:0}
  html.standalone .pm{border-radius:0;border:0}
  .pm-bar{margin:0;padding:var(--space-3) var(--space-4)}
  /* the switches next to the logo when they fit, else on one row under it;
     the theme switch always at the right edge */
  .pm-bar-tools{flex:1 1 auto;justify-content:space-between}
  .pm-theme{margin-left:auto}
  .pm-lang{height:44px;min-width:36px;font-size:16px}
  .pm-theme button{width:44px;height:44px}
  .pm-head{padding:var(--space-4) var(--space-4) 0}
  .pm-head h2{font-size:20px;line-height:28px}
  .pm-kpis,.pm-kpis--5{margin:0 calc(-1 * var(--space-4))}
  .pm-kpi{padding:var(--space-3) var(--space-4)}
  .pm-kpi .v{font-size:20px}
  .pm-body{padding:var(--space-4)}
  /* 16 px stops iOS Safari zooming the page when a field gets focus */
  .pm-ctrl input[type=text],.pm-ctrl select{font-size:16px}
  .pm-ctrl input[type=text],.pm-ctrl select,.pm-ctrl button,.pm-toggle button{min-height:44px}
  .pm-ctrl input[type=text]{flex-basis:100%}
  .pm-ctrl select{flex:1 1 140px;min-width:0}
  .pm-toggle{width:100%}
  .pm-toggle button{flex:1}
  .pm-map{height:min(70vh,420px)}
  .pm-disc summary{flex-wrap:wrap}
  .pm-disc summary .more{margin-left:0}
  .pm-scroll{max-height:400px}
}
@media (prefers-reduced-motion:reduce){.pm *{transition:none!important}}
