/* Styles for the air quality screen. Same frame as the other info screens. */
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 100 900; font-stretch: 100%; font-display: swap; src: url("/weather/screen/assets/fonts/roboto-latin.woff2") format("woff2"); }
html { font-size: 20px; }
/* The European Air Quality Index's own colours, one a band: good, fair, moderate, poor, very poor, extremely poor. */
:root { --bg: #eeece6; --panel: #ffffff; --panel-2: #f5f4f0; --ink: #14161b; --muted: #555c68; --rule: #dcd9d1; --warn: #a85800; --logo: #001489;
  --b0: #50f0e6; --b1: #50ccaa; --b2: #f0e641; --b3: #ff5050; --b4: #960032; --b5: #7d2181; }
html.dark { --bg: #0d0f13; --panel: #161a22; --panel-2: #1d222b; --ink: #f4f5f7; --muted: #a3abb9; --rule: #2a303b; --warn: #ffb020; --logo: #ffffff; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { overflow: hidden; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden;
  font-family: Roboto, system-ui, sans-serif; font-variant-numeric: tabular-nums; display: grid; grid-template-columns: 1920px; grid-template-rows: 92px 1fr 43.2px; }
header { display: flex; align-items: center; justify-content: space-between; padding: 0 38px; border-bottom: 1px solid var(--rule); }
.title { display: flex; align-items: center; gap: 23px; }
.logo { height: 2.9rem; aspect-ratio: 441 / 120; flex: none; background: var(--logo);
  -webkit-mask: url("/weather/screen/ecolint-logo.png") center / contain no-repeat; mask: url("/weather/screen/ecolint-logo.png") center / contain no-repeat; }
.hdr-sep { width: 2px; height: 2.6rem; background: var(--rule); flex: none; }
.title h1 { margin: 0; line-height: 1; font-size: 2.5rem; font-weight: 900; letter-spacing: -0.02em; }
.title .date { font-size: 1.5rem; color: var(--muted); font-weight: 500; }
.badge { font-size: 1.3rem; font-weight: 900; letter-spacing: 0.08em; color: var(--bg); background: var(--warn); border-radius: 0.5rem; padding: 0.3rem 0.8rem; align-self: center; }
.clock { font-size: 3.4rem; font-weight: 800; letter-spacing: -0.02em; }
.clock .secs { font-size: 1.5rem; color: var(--muted); margin-left: 0.3rem; font-weight: 600; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 0 38px; font-size: 1.05rem; color: var(--muted); border-top: 1px solid var(--rule); white-space: nowrap; overflow: hidden; }
footer.stale #status { color: var(--warn); font-weight: 800; }

main { display: grid; grid-template-columns: 1040px 1fr; gap: 26px; padding: 26px 38px; min-height: 0; }
.box { background: var(--panel); border: 1px solid var(--rule); border-radius: 1.3rem; overflow: hidden; }
.label { font-size: 1.3rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.holding { grid-column: 1 / -1; display: grid; place-items: center; font-size: 2.3rem; font-weight: 700; color: var(--muted); }

/* The map: the model's cells coloured by band over the grey map, with the campus marked. */
.mapbox { height: 892px; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; }
.mapwrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--panel-2); }
html.dark #map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9); }
.maptitle { display: grid; gap: 0.1rem; padding: 0.6rem 1.2rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.maptitle b { font-size: 1.45rem; font-weight: 900; letter-spacing: -0.01em; }
.maptitle span { font-size: 1.02rem; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.legend { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--rule); }
.legend span { padding: 0.45rem 0.2rem; text-align: center; font-size: 0.95rem; font-weight: 800; color: #14161b; white-space: nowrap; }
.legend .k3, .legend .k4, .legend .k5 { color: #fff; }
.k0 { background: var(--b0); } .k1 { background: var(--b1); } .k2 { background: var(--b2); } .k3 { background: var(--b3); } .k4 { background: var(--b4); } .k5 { background: var(--b5); }
.pin { width: 26px; height: 26px; border-radius: 50%; background: #14161b; border: 5px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.pinlabel { font: 900 1.1rem Roboto, system-ui, sans-serif; color: #14161b; background: rgba(255,255,255,0.94); border-radius: 0.5rem; padding: 0.2rem 0.6rem; white-space: nowrap; box-shadow: 0 1px 5px rgba(0,0,0,0.3); width: max-content; transform: translate(20px, -50%); }
/* Each square's number on a small white disc, so it reads whatever the map prints underneath. */
.cellnum { font: 800 1.05rem/2.1rem Roboto, system-ui, sans-serif; color: #14161b; text-align: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: rgba(255,255,255,0.88); box-shadow: 0 1px 4px rgba(0,0,0,0.25); transform: translate(-50%, -50%); }

/* Beside the map: the index now, what is behind it, each pollutant, and the week. */
.side { display: grid; grid-template-rows: auto auto 1fr; gap: 18px; height: 892px; min-height: 0; }
.now { padding: 1rem 1.3rem 1.1rem; border-left: 16px solid var(--c); }
.now .big { display: flex; align-items: baseline; gap: 1rem; margin-top: 0.3rem; white-space: nowrap; }
.now .word { font-size: 4.2rem; font-weight: 900; letter-spacing: -0.035em; line-height: 1; }
.now .num { font-size: 1.5rem; font-weight: 700; color: var(--muted); }
.now .trend { font-size: 1.3rem; font-weight: 700; margin-top: 0.5rem; }
.now .trend span { color: var(--muted); font-weight: 600; }
.now .why { font-size: 1.16rem; line-height: 1.36; font-weight: 500; color: var(--muted); margin: 0.6rem 0 0; }
.parts { padding: 0.9rem 1.3rem 1rem; }
.part { display: grid; grid-template-columns: 15.2rem 1fr 8.2rem; gap: 0.8rem; align-items: center; margin-top: 0.5rem; font-size: 1.15rem; font-weight: 700; }
.part .n { white-space: nowrap; } .part .n small { color: var(--muted); font-weight: 600; margin-left: 0.3rem; }
.part .t { position: relative; height: 1.1rem; background: var(--panel-2); border-radius: 0.3rem; overflow: hidden; }
.part .t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0.3rem; min-width: 5px; }
.part .x { text-align: right; white-space: nowrap; color: var(--muted); font-weight: 600; } .part .x b { color: var(--ink); font-weight: 800; }
.part.main .n::after { content: " · main"; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.week { padding: 0.9rem 1.3rem 0.7rem; display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.week svg { display: block; width: 100%; height: 100%; }
.week text { font: 600 15px Roboto, system-ui, sans-serif; fill: var(--muted); }
.week .bandname { font-weight: 800; }
.week .line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.week .ahead { stroke-dasharray: 1 6; }
.week .nowline { stroke: var(--ink); stroke-width: 2; } .week .dot { fill: var(--ink); stroke: var(--panel); stroke-width: 3; }
