/* Plain CSS, so chart sizing never waits on the Tailwind CDN having injected
   its stylesheet before Chart.js measures the box. */
html, body { max-width: 100%; overflow-x: hidden; }

.chart-box       { position: relative; height: 230px; width: 100%; min-width: 0; }
.chart-box.tall  { height: 320px; }
.chart-box.xtall { height: 420px; }
.chart-box.short { height: 180px; }
.chart-box > canvas { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; }

.scroll-x { overflow-x: auto; }
.scroll-y { overflow-y: auto; }

#map { height: 520px; background: #eaf2f8; border-radius: 10px; }
#map.tall { height: 620px; }
/* the home page leads with the map, so it gets the tallest frame that still
   leaves the headline figures visible on a laptop screen */
#map.home { height: 68vh; min-height: 520px; max-height: 820px; }
/* the standalone map page is nothing but the map, so it takes the viewport.
   Offsets follow the header: logo and title, then the navigation bar,
   plus the page padding around the map. */
#map.page { height: calc(100vh - 278px); min-height: 560px; }
@media (max-width: 1023px) {
  #map.page { height: calc(100vh - 267px); }
}
@media (max-width: 639px) {
  #map.page { height: calc(100vh - 233px); }
}

/* Full-width brand band. Centering is on this box, so the logo and title
   sit in the middle of the viewport rather than in a left-aligned column. */
header .fr-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  background: #fff;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #e2e8f0;
}
header .fr-brand .fr-brand-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  text-decoration: none;
}
header .fr-brand .fr-logo {
  display: block;
  align-self: center;
  width: auto;
  height: auto;
  max-width: min(860px, 100%);
  max-height: 56px;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}
header .fr-brand .fr-brand-title {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 12px auto 0;
  text-align: center;
  color: #14304a;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
@media (min-width: 768px) {
  header .fr-brand .fr-logo { max-height: 80px; }
  header .fr-brand .fr-brand-title { font-size: 22px; }
}
@media (min-width: 1024px) {
  header .fr-brand .fr-logo { max-height: 100px; }
  header .fr-brand .fr-brand-title { font-size: 24px; }
}
@media (min-width: 1440px) {
  header .fr-brand .fr-brand-title { font-size: 26px; }
}
.st-label { background: none; border: none; box-shadow: none; font-size: 10.5px; font-weight: 600;
            color: #1e293b; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.st-label::before { display: none; }
/* the hovered label also shows the value, so give it a plate to sit on and
   lift it above its neighbours */
.st-label.st-label-hot { background: #fff; border: 1px solid #cbd5e1; border-radius: 6px;
  padding: 3px 7px; box-shadow: 0 2px 8px rgba(15,23,42,.18); text-shadow: none;
  line-height: 1.35; text-align: center; z-index: 650 !important; }
.st-label.st-label-hot b { color: #14304a; }
.legbox { background: #fff; padding: 8px 10px; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.2); font-size: 12px; line-height: 18px; }
.legbox i { display: inline-block; width: 16px; height: 12px; margin-right: 6px; border-radius: 2px; opacity: .9; }

/* horizontal share meters used inside the summary cards */
.meter { height: 8px; border-radius: 999px; background: #eef2f6; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; }

/* the thin left rule that colour-codes a section heading */
.rule { display: inline-block; width: 12px; height: 24px; border-radius: 4px; flex: none; }
