/* Styles for the On this day screen. Same frame as the weather, news and Headlines 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; }
:root { --bg: #eeece6; --panel: #ffffff; --panel-2: #f5f4f0; --ink: #14161b; --muted: #555c68; --rule: #dcd9d1; --warn: #a85800; --logo: #001489; --year: #0033a0; }
html.dark { --bg: #0d0f13; --panel: #161a22; --panel-2: #1d222b; --ink: #f4f5f7; --muted: #a3abb9; --rule: #2a303b; --warn: #ffb020; --logo: #ffffff; --year: #6f9bff; }
* { 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-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; padding: 0 38px; font-size: 1.05rem; color: var(--muted); border-top: 1px solid var(--rule); }
footer.stale #status { color: var(--warn); font-weight: 800; }

main { display: grid; grid-template-columns: 1250px 1fr; gap: 26px; padding: 26px 38px; min-height: 0; }
.box { background: var(--panel); border: 1px solid var(--rule); border-radius: 1.3rem; overflow: hidden; }

/* The event on show: the picture, then the year and the sentence, with the code to scan beside them. */
.lead { display: grid; grid-template-rows: 430px 1fr auto; height: 888px; animation: fade 0.8s ease; }
html.still .lead { animation: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
/* The whole picture always shows (a portrait is not cropped to a forehead): it sits on a blurred copy of itself. */
.lead .pic { position: relative; background: var(--panel-2); overflow: hidden; }
.lead .pic .blur { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) saturate(0.9); opacity: 0.55; }
.lead .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.lead .words { display: grid; grid-template-columns: 1fr 210px; gap: 1.6rem; padding: 1.1rem 1.7rem 0.9rem; min-height: 0; align-items: center; }
.when { display: flex; align-items: baseline; gap: 1.1rem; }
.year { font-size: 5.6rem; font-weight: 900; letter-spacing: -0.04em; line-height: 0.95; color: var(--year); }
.ago { font-size: 1.7rem; font-weight: 600; color: var(--muted); }
.lead .text { margin: 0.6rem 0 0; font-size: 2.15rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.lead .source { margin-top: 0.7rem; font-size: 1.3rem; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead .source b { color: var(--ink); font-weight: 800; }
/* An event with no picture (or one that will not load): the words take the whole card. */
.lead.plain { grid-template-rows: 1fr auto; }
.lead.plain .pic { display: none; }
.lead.plain .words { padding-top: 2rem; }
.lead.plain .year { font-size: 11rem; }
.lead.plain .ago { font-size: 2.3rem; }
.lead.plain .text { font-size: 3.5rem; -webkit-line-clamp: 7; margin-top: 1.6rem; }
.qr { text-align: center; }
.qr .code { width: 190px; height: 190px; padding: 12px; background: #fff; border-radius: 0.8rem; border: 1px solid var(--rule); margin: 0 auto; }
.qr .code svg { display: block; width: 100%; height: 100%; }
.qr .say { font-size: 1.2rem; font-weight: 800; margin-top: 0.5rem; line-height: 1.2; }
.progress { height: 8px; background: var(--rule); }
.progress i { display: block; height: 100%; width: 0; background: var(--ink); }
.holding { display: grid; place-items: center; text-align: center; padding: 3rem; font-size: 2.3rem; font-weight: 700; color: var(--muted); line-height: 1.4; height: 888px; }

/* The day's other events. */
.side { display: grid; grid-template-rows: auto 1fr; height: 888px; padding: 1.2rem 1.4rem; }
.label { font-size: 1.3rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.next { display: grid; grid-auto-rows: 1fr; min-height: 0; }
.item { display: grid; grid-template-columns: 6.2rem 1fr; gap: 1rem; align-items: center; border-top: 1px solid var(--rule); padding: 0.6rem 0; min-height: 0; }
.item:first-child { border-top: 0; }
.item .y { font-size: 2.2rem; font-weight: 900; letter-spacing: -0.03em; color: var(--year); }
.item p { margin: 0; font-size: 1.32rem; line-height: 1.22; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
