/* Styles for the weather screen. Settings live in ../config.js; the layout is built by weather.js. */
@font-face {
  font-family: "Roboto"; font-style: normal; font-weight: 100 900; font-stretch: 100%; font-display: swap;
  src: url("fonts/roboto-latin.woff2") format("woff2");
}
/* Laid out at 1920x1080 and scaled to fit any screen (HD, 4K or a browser window), keeping 16:9.
   Nothing is smaller than 1.3rem (26px at 1080p): the screen is read from across a corridor. */
html { font-size: 20px; }
:root {
  --bg: #0d0f13; --panel: #161a22; --panel-2: #1d222b;
  --ink: #f4f5f7; --muted: #a3abb9; --rule: #2a303b;
  --warn: #ffb020; --ok: #3ddc84;
  --temp: #ff9d2e;        /* temperature marks */
  --pressure: #56b9ee;    /* pressure marks */
  --wind: #56b9ee;
  --grid: #2f3643;
  /* Wind speed, one hue, slow to fast. On a dark screen the fastest class is the brightest. */
  --rose-1: #1d4f7a; --rose-2: #2a78b0; --rose-3: #4aa3dc; --rose-4: #8cc9f0; --rose-5: #dff1ff;
  --logo: #ffffff;
}
html.light {
  --bg: #eeece6; --panel: #ffffff; --panel-2: #f5f4f0;
  --ink: #14161b; --muted: #555c68; --rule: #dcd9d1;
  --warn: #a85800; --ok: #0f7a43;
  --temp: #c96a00; --pressure: #0033a0; --wind: #0033a0;
  --grid: #e3e0d8;
  --rose-1: #cfe6f6; --rose-2: #8fc3e6; --rose-3: #4a98d0; --rose-4: #1f6bb0; --rose-5: #0b3d73;
  --logo: #001489;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { overflow: hidden; }
body.idle { cursor: none; }
#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-rows: 92px 1fr 43.2px;
}

/* ---------- Header and footer (same shape as the bus screens) ---------- */
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("../ecolint-logo.png") center / contain no-repeat; mask: url("../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 .where { font-size: 1.45rem; color: var(--muted); font-weight: 500; }
.demo { 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; }
.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; padding: 0 38px; font-size: 1.05rem; color: var(--muted); border-top: 1px solid var(--rule); }
footer .dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--ok); margin-right: 0.5rem; vertical-align: middle; }
footer.stale #status { color: var(--warn); font-weight: 800; }
footer.stale .dot { background: var(--warn); }

/* ---------- Main: the readings on the left, a rotating panel on the right ---------- */
main { display: grid; grid-template-columns: 1090px 1fr; gap: 26px; padding: 26px 38px; min-height: 0; }
.left { display: grid; grid-template-rows: 396px 1fr; gap: 26px; min-height: 0; }
.box { background: var(--panel); border: 1px solid var(--rule); border-radius: 1.3rem; }
.label { font-size: 1.3rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }

.hero { display: grid; grid-template-columns: 1fr 17.5rem; align-items: center; padding: 0 2.2rem 0 2.6rem; overflow: hidden; }
.now .temp { font-size: 12.6rem; font-weight: 900; letter-spacing: -0.045em; line-height: 0.95; margin: 0.4rem 0 0 -0.4rem; white-space: nowrap; }
.now .temp .unit { font-size: 4.8rem; font-weight: 700; color: var(--muted); letter-spacing: 0; vertical-align: 4.3rem; margin-left: 0.3rem; }
.now .feels { font-size: 2.5rem; font-weight: 500; color: var(--muted); margin-top: 0.7rem; }
.now .feels b { color: var(--ink); font-weight: 800; }
.range { display: grid; gap: 1.3rem; padding-left: 2rem; border-left: 2px solid var(--rule); }
.range .v { font-size: 4.2rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; margin-top: 0.3rem; white-space: nowrap; }
.range .at { font-size: 1.6rem; color: var(--muted); font-weight: 500; margin-left: 0.5rem; letter-spacing: 0; }
.range .note { font-size: 1.3rem; color: var(--warn); font-weight: 700; margin-top: 0.35rem; line-height: 1.25; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 26px; min-height: 0; }
.tile { padding: 1.2rem 1.7rem; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.tile .big { font-size: 4.7rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; margin-top: 0.2rem; white-space: nowrap; }
.tile .big small { font-size: 2.1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 0.35rem; }
.tile .sub { font-size: 1.65rem; color: var(--muted); font-weight: 500; margin-top: 0.15rem; white-space: nowrap; }
.tile .sub b { color: var(--ink); font-weight: 800; }
.tile.wind { padding-right: 10.4rem; }
.tile .big.mid { font-size: 3.6rem; line-height: 1.35; }
.compass { position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); width: 8.8rem; height: 8.8rem; }
.trend { display: inline-block; font-size: 3rem; margin-left: 0.6rem; vertical-align: 0.2rem; font-weight: 900; }
.trend.up { color: var(--ok); } .trend.down { color: var(--warn); } .trend.flat { color: var(--muted); }

/* ---------- Rotating panel ---------- */
.panel { padding: 1.5rem 1.8rem 1.1rem; display: grid; grid-template-rows: auto 1fr auto; min-height: 0; overflow: hidden; }
.panel h2 { margin: 0; font-size: 2.3rem; font-weight: 900; letter-spacing: -0.02em; }
.panel h2 span { display: block; font-size: 1.5rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 0.25rem; }
.panel-body { min-height: 0; display: flex; flex-direction: column; justify-content: center; animation: fade 0.7s ease; }
html.still .panel-body { animation: none; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dots { display: flex; gap: 0.6rem; justify-content: center; padding-top: 0.6rem; }
.dots i { width: 2.4rem; height: 0.4rem; border-radius: 0.2rem; background: var(--rule); }
.dots i.on { background: var(--ink); }

svg text { font-family: Roboto, system-ui, sans-serif; fill: var(--muted); font-weight: 600; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0.9rem 0 0.1rem; }
.chart-head .name { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 0.6rem; }
.chart-head .name i { width: 1.6rem; height: 0.3rem; border-radius: 0.15rem; }
.chart-head .val { font-size: 1.5rem; color: var(--muted); font-weight: 600; }
.chart-head .val b { color: var(--ink); font-weight: 900; font-size: 1.8rem; }

.rose-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; }
.rose-wrap svg { width: 27rem; height: 27rem; }
.rose-note { font-size: 1.5rem; color: var(--muted); font-weight: 500; margin-top: 0.7rem; text-align: center; }
.rose-note b { color: var(--ink); font-weight: 800; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.3rem; font-size: 1.35rem; font-weight: 600; color: var(--muted); white-space: nowrap; margin-top: 0.4rem; }
.legend div { display: flex; align-items: center; gap: 0.6rem; }
.legend i { width: 1.5rem; height: 1.5rem; border-radius: 0.3rem; flex: none; }
.legend .cap { font-weight: 800; color: var(--ink); }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1rem; }
.fact { background: var(--panel-2); border-radius: 1rem; padding: 1.5rem 1.6rem; min-height: 13.5rem; }
.fact .v { font-size: 3.9rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; margin-top: 0.3rem; white-space: nowrap; }
.fact .v small { font-size: 1.8rem; color: var(--muted); font-weight: 600; margin-left: 0.3rem; letter-spacing: 0; }
.fact .s { font-size: 1.45rem; color: var(--muted); font-weight: 500; margin-top: 0.2rem; }

.moment .q { font-size: 3.5rem; font-weight: 900; letter-spacing: -0.025em; line-height: 1.12; }
.moment .a { font-size: 2.1rem; line-height: 1.38; color: var(--muted); font-weight: 500; margin-top: 1.4rem; }
.moment .a b { color: var(--ink); font-weight: 800; }

.waiting { font-size: 2.4rem; color: var(--muted); font-weight: 600; line-height: 1.4; }
