/* ConOps wall display.
   Built for a screen standing on its end (portrait), fixed to the viewport,
   readable across a room. Colours, type and backdrop come from theme.css.

   Sizes are in vmin -- a share of the screen's shorter side -- so the same
   board works on a 1080x1920 panel, a tablet on a stand, or a TV on its side. */

:root {
  --good: #40ad3e;
  /* Brighter than the Excellent bars it runs under, so it stays visible. */
  --good-line: #8dff6a;
  --bad: #f13ca3; /* the index's own Bad band */
  --gap: 1.6vmin;
  --tile-pad: 2.2vmin 2.6vmin;
  --mascot-size: 22vmin;
}

* { box-sizing: border-box; }

/* `hidden` must beat any author `display:` rule on the same element. */
[hidden] { display: none !important; }

html, body { height: 100%; margin: 0; }

body {
  background: transparent; /* the backdrop is the background */
  color: var(--text);
  font: 16px/1.35 var(--font-body);
  overflow: hidden; /* a wall display must never show a scrollbar */
}

.screen {
  /* Every digit the same width: a clock or a score that changes must not
     move what stands beside it. */
  font-variant-numeric: tabular-nums;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2.4vmin 2.6vmin;
  gap: var(--gap);
}

.boot { padding: 2rem; color: var(--muted); font-size: 1.4rem; }

/* ---------- top: title and clock ---------- */

/* Title, code and clock on one row. */
.top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: 'title qr clock';
  align-items: center;
  gap: 1.2vmin 2.4vmin;
}
.title-block { grid-area: title; }
.qr { grid-area: qr; }
.clock-block { grid-area: clock; }
/* The mascot flies above the score tile: keep it clear of the clock. */
@media (orientation: portrait) {
  /* Two lines rather than an ellipsis: an event's name is the board's name. */
  .top .title {
    font-size: 3.6vmin;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .top { margin-bottom: 3vmin; }
}

.title {
  margin: 0;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 4.2vmin;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Beside the clock: dark modules on a white tile, as scanners expect, with a
   quiet zone round it. Small, but big enough for a phone at arm's length. */
.title-block { min-width: 0; }
/* The code with a phone beside it and an arrow nudging towards it: no words
   needed to say what it is for. */
.qr { flex: none; display: flex; align-items: center; gap: 1vmin; text-decoration: none; }
.scan-cue {
  display: flex;
  align-items: center;
  gap: 0.2vmin;
  color: var(--muted);
  animation: scan-nudge 1.8s ease-in-out infinite;
}
.scan-cue svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.scan-phone { width: 3.2vmin; height: 4.4vmin; stroke-width: 2; }
.scan-arrow { width: 3.4vmin; height: 3.4vmin; stroke-width: 2.6; color: var(--accent); }
@keyframes scan-nudge {
  0%, 100% { transform: translateX(-0.5vmin); }
  50% { transform: translateX(0.7vmin); }
}
@media (prefers-reduced-motion: reduce) {
  .scan-cue { animation: none; }
}
/* A white card with rounded corners, the code inside it drawn in rounded dots
   with the site's icon in the middle (display.js, qrSvg). */
.qr-code {
  position: relative;
  display: block;
  width: 12.5vmin;
  height: 12.5vmin;
  padding: 0.5vmin;
  background: #fff;
  border-radius: 1.8vmin;
  box-shadow: 0 0 0 0.35vmin color-mix(in srgb, var(--accent) 45%, transparent);
}
.qr-code svg { display: block; width: 100%; height: 100%; }
.qr-code .qr-dots { fill: #10141a; }
/* A finder eye: a ring one module wide, a module of white, a 3x3 pupil. */
.qr-code .qr-ring { fill: none; stroke: #1d4c9c; stroke-width: 1; }
.qr-code .qr-pupil { fill: #1d4c9c; }
.qr-code .qr-logo-bg { fill: var(--n-900, #13171d); }
/* The brand mark on the dark tile in the middle. */
.qr-code .qr-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--qr-logo, 20%) * 0.78);
  height: calc(var(--qr-logo, 20%) * 0.78);
  transform: translate(-50%, -50%);
}

.clock-block { text-align: right; flex: none; }
.clock, .date { white-space: nowrap; }
.clock {
  font-family: var(--font-display);
  font-size: 5.8vmin;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
}
.date { font-size: 2vmin; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- warnings & advisories ---------- */

/* One row per warning, stacked; rows that do not fit are left out by
   display.js (fitAlerts) and counted in the heading. */
.alerts {
  display: flex;
  flex-direction: column;
  gap: 1.1vmin;
  min-height: 0;
}

/* A stripe in the warning's own colour down the left -- DWD's severity
   palette for theirs, which staff already read; the furcaster's light for
   theirs -- on a faint wash of it. */
.alert {
  --tone: var(--notice);
  --tone-ink: #101010;
  display: grid;
  gap: 0.3vmin;
  padding: 0.8vmin 1.6vmin 0.8vmin 1.8vmin;
  border-radius: 1.3vmin;
  border-left: 0.9vmin solid var(--tone);
  background: color-mix(in srgb, var(--tone) 14%, transparent);
  color: var(--text-strong, #fff);
}
.alert[hidden] { display: none; }

.alert-head {
  display: flex;
  align-items: baseline;
  gap: 1.2vmin;
  min-width: 0;
}
/* What it is: filled in the warning's colour, ink chosen against it. */
.alert-badge {
  flex: none;
  padding: 0.2vmin 1vmin;
  border-radius: 0.7vmin;
  background: var(--tone);
  color: var(--tone-ink);
  font-size: 1.55vmin;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateY(-0.2vmin);
}
.alert-title {
  min-width: 0;
  font-family: var(--font-display);
  font-size: 2.5vmin;
  font-weight: 600;
  line-height: 1.2;
  /* Two lines of a long name, then an ellipsis. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* When, where, who: side by side with space between them. */
.alert-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2vmin 2.4vmin;
  font-size: 1.85vmin;
  font-weight: 700;
  color: var(--muted);
}
.alert-detail span:first-child { color: var(--text); }

/* The furcaster's own words: two lines at most. */
.alert-text {
  margin: 0;
  font-size: 1.95vmin;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* A Vorabinformation is not a warning in force: the stripe is hatched, as it
   is on the bars, so it does not read as the real thing. */
.alert.is-advance {
  border-left-color: transparent;
  background:
    repeating-linear-gradient(-45deg, var(--tone) 0 0.6vmin, transparent 0.6vmin 1.2vmin) left / 0.9vmin 100% no-repeat,
    color-mix(in srgb, var(--tone) 10%, transparent);
}
/* A furcaster's warning: theirs, not DWD's. A dashed stripe. */
.alert.is-furcaster { border-left-style: dashed; }
/* A little short of room: the furcaster's words on one line. */
.alerts.is-brief .alert-text { -webkit-line-clamp: 1; }

/* More than fit: one line each -- what it is, and when -- the place, the
   furcaster's name and words left for the site. */
.alerts.is-compact { gap: 0.8vmin; }
.alerts.is-compact .alert {
  display: flex;
  align-items: center;
  gap: 1.6vmin;
  padding-block: 0.8vmin;
}
.alerts.is-compact .alert-head { flex: 1; align-items: center; }
.alerts.is-compact .alert-badge { transform: none; }
.alerts.is-compact .alert-title { display: block; white-space: nowrap; text-overflow: ellipsis; font-size: 2.2vmin; }
.alerts.is-compact .alert-text,
.alerts.is-compact .alert-detail span + span { display: none; }
.alerts.is-compact .alert-detail { flex: none; font-size: 1.85vmin; }

/* Advisories (fog, pollen) quieter than warnings. */
.alert.is-advisory { background: color-mix(in srgb, var(--tone) 8%, transparent); }
.alert.is-advisory .alert-title { font-size: 2.2vmin; }

/* ---------- tiles ---------- */

/* Portrait: one column, the chart taking whatever height is left. */
.grid {
  flex: 1;
  min-height: 0;
  display: grid;
  /* minmax(0, ...): a long word in a tile must never widen the board past
     the screen. */
  grid-template-columns: minmax(0, 1fr);
  /* The days take what they need and the chart takes the rest, never less
     than its own least height (display.js drops days that do not fit). */
  grid-template-rows: auto auto auto minmax(min-content, 1fr) auto;
  grid-template-areas:
    'score'
    'conditions'
    'alerts'
    'chart'
    'days';
  gap: var(--gap);
}
.score-tile { grid-area: score; }
.conditions-tile { grid-area: conditions; }
.chart-tile { grid-area: chart; }
.days-tile { grid-area: days; }
.alerts-tile { grid-area: alerts; }
/* .tile sets the padding further down: this has to outrank it. */
.tile.alerts-tile { padding-bottom: 1.2vmin; }
.alerts-tile .tile-head { margin-bottom: 0.8vmin; }
/* Portrait: no height to spare, so only when there is something in it. */
.alerts-tile.is-empty { display: none; }
/* The easter egg replaces the conditions while it is on: there is no spare
   row on a board that fills the screen exactly. */
.egg { grid-area: conditions; }
.grid:has(.egg:not([hidden])) .conditions-tile { display: none; }

.tile {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: var(--tile-pad);
  border-radius: 2.4vmin;
  background: var(--card);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
}
/* Nothing may spill out of a tile onto the next: a wall board has no scroll
   to recover it. The score tile is left out so the mascot can leave it. */
.tile:not(.score-tile) { overflow: hidden; }

.tile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6vmin 1.6vmin;
  margin-bottom: 1.2vmin;
}

.tile h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.8vmin;
  font-weight: 600;
  color: var(--text);
}
.tile-note { font-size: 2vmin; color: var(--muted); }
/* "Fursuiting Index" and "Outdoor Index" in one cell, one of them hidden:
   the cell is always as wide as the longer, so the badge beside it stays. */
.index-name { display: inline-grid; }
.index-name > span { grid-area: 1 / 1; }
.index-name > span:last-child,
.index-name.is-outdoor > span:first-child { visibility: hidden; }
.index-name.is-outdoor > span:last-child { visibility: visible; }
.tile-note:empty { display: none; }

/* ---------- the score ---------- */

/* Solid, not glass: the colour is the answer. The biggest thing on the
   board, with room round the number. */
.score-tile {
  padding-top: 2.8vmin;
  padding-bottom: 3.2vmin;
  z-index: 2;
  background: var(--fsi, var(--card-solid));
  border-color: color-mix(in srgb, var(--fsi, #fff) 70%, #000);
  color: var(--ink, var(--text));
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background-color 400ms ease;
}
/* Room on the right for the mascot, which only covers the tile's top: the
   heading and the band keep clear of it, the advice below may run under it. */
.score-tile .tile-head,
.score-tile .band { margin-right: calc(var(--mascot-size) * 1.05 + 0.4vmin); }
.score-tile h2 { color: var(--ink, var(--text)); opacity: 0.85; }

/* Measured or forecast, in two different shapes -- same as the public page. */
.source {
  display: inline-flex;
  align-items: center;
  gap: 0.9vmin;
  padding: 0.4vmin 1.6vmin 0.4vmin 1.2vmin;
  border-radius: 999px;
  font-size: 2.1vmin;
  font-weight: 800;
  white-space: nowrap;
}
.source:empty { display: none; }
.source::before { content: ''; width: 1.3vmin; height: 1.3vmin; border-radius: 50%; flex: none; }
.source.is-measured { background: color-mix(in srgb, var(--ink, #000) 15%, transparent); }
.source.is-measured::before { background: currentColor; }
.source.is-forecast { border: 2px dashed currentColor; }
.source.is-forecast::before { border: 0.35vmin solid currentColor; }

.score-row { display: flex; align-items: center; gap: 1vmin 3vmin; min-height: 0; }
.score-text { flex: 1; min-width: 0; }

.score { display: flex; align-items: baseline; line-height: 0.95; font-family: var(--font-display); }
.score #score { font-size: 19vmin; font-weight: 600; letter-spacing: -0.03em; }
.score .of { font-size: 4.6vmin; opacity: 0.7; margin-left: 0.6vmin; }

/* The band name is the headline for staff glancing across the room. */
/* Sized down by display.js (fitBand) until the longest band name fits. */
.band { font-family: var(--font-display); font-size: 7.8vmin; font-weight: 600; line-height: 1.02; white-space: nowrap; }
.advice { margin: 1.2vmin 0 0; font-size: 2.9vmin; font-weight: 700; opacity: 0.92; }

/* ---------- conditions ---------- */

/* The weather and the temperature large on the left, the rest as small
   labels over values in a grid; every unit set smaller than its number. */
.conditions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr);
  align-items: center;
  gap: 1.6vmin 3vmin;
}
.cond-lead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    'icon temp'
    'icon text';
  align-items: center;
  gap: 0 1.6vmin;
  min-width: 0;
}
.cond-icon { grid-area: icon; font-size: 8vmin; line-height: 1; }
.cond-temp {
  grid-area: temp;
  font-family: var(--font-display);
  font-size: 6.4vmin;
  font-weight: 600;
  line-height: 1;
  color: var(--text-strong);
  white-space: nowrap;
}
.cond-temp .unit { font-size: 0.45em; font-weight: 600; margin-left: 0.3vmin; color: var(--muted); vertical-align: 0.9em; }
.cond-text {
  grid-area: text;
  margin-top: 0.6vmin;
  font-size: 2.4vmin;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  /* Two lines rather than an ellipsis: "Light rain shower" is the point. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cond-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6vmin 2vmin;
  padding-left: 3vmin;
  border-left: 1px solid var(--glass-edge);
}
.cond-grid .item { min-width: 0; }
.cond-grid dt {
  font-size: 1.75vmin;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cond-grid dd {
  margin: 0.3vmin 0 0;
  font-family: var(--font-display);
  line-height: 1.1;
  white-space: nowrap;
  color: var(--text-strong);
}
.cond-grid .num { font-size: 3.6vmin; font-weight: 600; }
.cond-grid .unit { font-size: 1.9vmin; font-weight: 600; color: var(--muted); margin-left: 0.5vmin; }
.cond-grid small { display: block; font-family: var(--font-body); font-size: 1.7vmin; font-weight: 700; color: var(--muted); }

/* Showing a picked hour rather than the observation: say so, and outline the
   tile so nobody walking past reads a forecast as the current weather. */
.conditions-tile.is-picked { border: 2px dashed var(--link); }
.conditions-tile.is-picked h2 { color: var(--link); }

/* ---------- hourly bars ---------- */

.timeline {
  /* Row metrics for the warning track, shared with the padding calc below so
     the tile always reserves exactly as much room as the chart drew. */
  --warn-row-h: 3.4vmin;
  --warn-gap: 0.5vmin;
  --warn-top: 1vmin;
  --warn-space: calc(
    var(--warn-top) + var(--warn-rows, 1) * var(--warn-row-h) +
      (var(--warn-rows, 1) - 1) * var(--warn-gap) + 0.8vmin
  );
  /* Fills its tile; the tile gets what the days leave, and never less than
     this, so the bars stay readable with a long list of days. */
  flex: 1;
  /* display.js lowers --chart-min (down to a floor) until three days fit. */
  min-height: var(--chart-min, 12vh);
  display: flex;
  gap: 0.5vmin;
  align-items: flex-end;
  padding: 4.6vmin 1vmin 5.6vmin;
  position: relative;
  background: var(--inset);
  border-radius: 1.6vmin;
}

.timeline .hour { flex: 1; position: relative; height: 100%; display: flex; align-items: flex-end; }
.timeline .hour > .fsi-bar { position: relative; width: 100%; background: var(--c); border-radius: 0.8vmin 0.8vmin 0 0; min-height: 4px; }
.timeline .wx {
  position: absolute;
  top: -3.6vmin;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.4vmin;
  line-height: 1;
}
/* Hours that have gone by stay for context, drained of colour so staff read
   the shift ahead, not the one behind. */
.timeline .hour.is-past > .fsi-bar { filter: grayscale(1); opacity: 0.4; }
.timeline .hour.is-past .wx { filter: grayscale(1); opacity: 0.35; }
.timeline .hour.is-past::after { opacity: 0.45; }

/* Where we are right now, at the current minute rather than the hour edge. */
.timeline .now-line {
  position: absolute;
  top: -0.8vmin;
  bottom: -0.8vmin;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--now);
  pointer-events: none;
  z-index: 4;
}
.timeline .now-line::before {
  content: '';
  position: absolute;
  top: -0.6vmin;
  left: 50%;
  width: 1.4vmin;
  height: 1.4vmin;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--now);
}

.timeline.is-pickable .hour { cursor: pointer; border-radius: 0.8vmin; }
.timeline.is-pickable .hour:hover { background: color-mix(in srgb, var(--text) 12%, transparent); }
.timeline .hour:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.timeline .hour.is-selected {
  background: color-mix(in srgb, var(--text) 18%, transparent);
  outline: 2px solid var(--text);
  outline-offset: 1px;
  border-radius: 0.8vmin;
}

/* Read from across the room: heavier and larger than a caption usually is. */
.timeline .hour::after {
  content: attr(data-label);
  position: absolute;
  bottom: -4.8vmin;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.1vmin;
  font-weight: 800;
  color: var(--muted);
}
.timeline .empty { color: var(--muted); align-self: center; }

/* The score in each bar, at its foot: the top of the bar is where the
   temperature line runs. */
.fsi-value {
  position: absolute;
  bottom: 0.6vmin;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.55vmin;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}
/* Too short a bar to sit inside: float the number just above it. */
.fsi-value.outside { top: auto; bottom: calc(100% + 0.4vmin); color: var(--text); }

/* The temperature over the bars (chart.js, drawTempLine), as on the event
   page but sized for the room: a coloured line with a dark halo, labelled at
   its warmest and coldest hour. */
.timeline .temp-line { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 3; overflow: visible; }
.timeline .temp-line path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.timeline .temp-line .halo { stroke: rgb(6 8 12 / 62%); stroke-width: 0.9vmin; }
.timeline .temp-line .stroke { stroke-width: 0.4vmin; }
.timeline .temp-tag {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, calc(-100% - 0.8vmin));
  padding: 0 0.6vmin;
  border-radius: 0.8vmin;
  background: rgb(6 8 12 / 72%);
  color: #fff;
  font-size: 1.9vmin;
  font-weight: 800;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.timeline .temp-tag.is-low { transform: translate(-50%, 0.8vmin); }

.legend { margin: 1.2vmin 0 0; font-size: 1.9vmin; font-weight: 700; color: var(--muted); display: flex; gap: 0.6vmin 2.4vmin; align-items: center; flex-wrap: wrap; }
.legend-item { display: inline-flex; align-items: center; gap: 0.7vmin; }
.chip { width: 1.7vmin; height: 1.7vmin; border-radius: 0.4vmin; background: var(--c); display: inline-block; }

/* ---------- good and avoid stretches, under the bars ---------- */

/* A line just under the bars it covers: green for good for suiting, pink for
   avoid. It reaches across the gaps so a stretch reads as one line, and is
   rounded only at its two ends. */
.timeline .hour.is-good::before,
.timeline .hour.is-avoid::before {
  content: '';
  position: absolute;
  left: -0.25vmin;
  right: -0.25vmin;
  bottom: -1.5vmin;
  height: 0.8vmin;
  background: var(--good-line);
}
.timeline .hour.is-avoid::before { background: var(--bad); }
.timeline .hour.run-start::before { left: 0; border-top-left-radius: 0.4vmin; border-bottom-left-radius: 0.4vmin; }
.timeline .hour.run-end::before { right: 0; border-top-right-radius: 0.4vmin; border-bottom-right-radius: 0.4vmin; }

.legend .line { width: 2.6vmin; height: 0.8vmin; border-radius: 0.4vmin; background: var(--good-line); }
.legend .line.is-avoid { background: var(--bad); }

/* ---------- warnings marked on the bars ---------- */

.timeline.has-warnings {
  padding-top: calc(var(--warn-space) + 4.6vmin);
  /* The warnings sit above the bars: they add to the least height rather
     than take it from the bars. */
  min-height: calc(var(--chart-min, 12vh) + var(--warn-space));
}

.warn-track {
  position: absolute;
  top: var(--warn-top);
  left: 1vmin;
  right: 1vmin;
  display: flex;
  flex-direction: column;
  gap: var(--warn-gap);
}

.warn-track .row { position: relative; height: var(--warn-row-h); }

.warn-track .range {
  position: absolute;
  top: 0;
  height: 100%;
  display: block;
  line-height: var(--warn-row-h);
  text-align: center;
  text-overflow: ellipsis;
  border-radius: 1vmin;
  font-size: 1.9vmin;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  padding: 0 0.8vmin;
  color: #10161d;
  background: var(--c, #fb8c00);
}
.warn-track .range.is-tight { padding: 0; }

.warn-track .range-label {
  position: absolute;
  top: 0;
  height: 100%;
  line-height: var(--warn-row-h);
  font-size: 1.9vmin;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--c, var(--text));
}

/* More overlapping warnings than the chart will stack. The board has no list
   to fall back on, so the count has to be visible. */
.warn-track .range.more {
  left: auto;
  right: 0;
  width: auto;
  min-width: 4vmin;
  background: var(--card-solid);
  color: var(--text);
  border: 1px solid var(--glass-edge);
  z-index: 1;
}

/* A Vorabinformation is not a warning in force -- red diagonal hatching so the
   two are never read as the same thing. */
.warn-track .range.hatched {
  color: #fff;
  background-color: color-mix(in srgb, var(--c, #e53935) 28%, transparent);
  background-image: repeating-linear-gradient(
    45deg,
    var(--c, #e53935) 0 0.7vmin,
    transparent 0.7vmin 1.5vmin
  );
  border: 1px solid var(--c, #e53935);
  text-shadow: 0 1px 2px rgb(0 0 0 / 75%);
}

/* ---------- next days ---------- */

/* Each day as tall as its content; whatever is left goes to the chart. */
.days-tile { min-height: 0; }
.days {
  display: grid;
  gap: 1vmin;
}

/* Two lines a day: the summary on top, the hours and the plan underneath. */
.days .day {
  display: grid;
  /* Fixed columns and a fixed second row: whatever a suit says about the
     day, the strip and the rows keep their size. */
  grid-template-columns: 17vmin minmax(0, 1fr) 11vmin 21vmin;
  grid-template-rows: auto 5.4vmin;
  grid-template-areas:
    'when cond temps avg'
    'when mini mini plan';
  align-items: center;
  gap: 0.5vmin 2vmin;
  padding: 0.6vmin 1.4vmin;
  border-radius: 1.4vmin;
  background: color-mix(in srgb, #fff 4%, transparent);
  font-size: 2.1vmin;
  font-weight: 700;
}
.days .day.is-today { background: color-mix(in srgb, var(--link) 9%, transparent); }
.days .when { grid-area: when; display: grid; }
.days .name { font-family: var(--font-display); font-weight: 600; font-size: 2.6vmin; line-height: 1.1; }
.days .date { font-size: 1.6vmin; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.days .cond { grid-area: cond; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.days .temps { grid-area: temps; text-align: right; color: var(--muted); }
.days .temps b { color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 2.5vmin; }
.days .avg {
  grid-area: avg;
  justify-self: end;
  padding: 0.1vmin 1.2vmin;
  border-radius: 999px;
  background: var(--c, transparent);
  color: var(--c-ink, var(--text));
  font-size: 1.9vmin;
  white-space: nowrap;
}
.days .avg { font-weight: 900; min-width: 6vmin; text-align: center; }

/* The day's hours as thin bars on their own dark strip, so every band colour
   stays distinguishable. */
.days .mini {
  grid-area: mini;
  height: 4.6vmin;
  display: flex;
  align-items: flex-end;
  gap: 0.25vmin;
  padding: 0.4vmin;
  border-radius: 0.8vmin;
  background: var(--inset);
}
.days .mini i { flex: 1; background: var(--c); border-radius: 0.3vmin 0.3vmin 0 0; }
.days .mini i.is-past { filter: grayscale(1); opacity: 0.4; }

.days .plan { grid-area: plan; min-width: 0; display: grid; justify-items: end; font-size: 1.9vmin; white-space: nowrap; }
.days .plan span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.days .plan .good { color: var(--good-text); }
.days .plan .avoid { color: var(--avoid-text); }
.days .plan .none { color: var(--muted); }

/* ---------- a one-day event: one card for its hours ---------- */

.event-day { display: grid; gap: 1.4vmin; }
.ev-facts {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1vmin 3.2vmin;
  font-size: 2.6vmin;
  font-weight: 700;
}
.ev-facts .cond { margin-right: auto; min-width: 0; font-size: 2.8vmin; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-facts > * { flex: none; }
.ev-facts > .cond { flex: 0 1 auto; }
.ev-facts .temps { color: var(--muted); }
.ev-facts .temps b { color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 3.2vmin; }
.ev-facts .fact { font-family: var(--font-display); font-weight: 600; font-size: 3vmin; color: var(--text-strong); }
.ev-facts .fact small { font-family: var(--font-body); font-size: 1.7vmin; font-weight: 800; color: var(--muted); }
.ev-facts .fact small:first-child { text-transform: uppercase; letter-spacing: 0.06em; margin-right: 0.8vmin; }
.ev-facts .fact small:last-child { margin-left: 0.4vmin; }
.ev-facts .avg { font-size: 2.6vmin; padding: 0.4vmin 1.8vmin; min-width: 19vmin; text-align: center; white-space: nowrap; }

/* The event's hours as bars with their numbers, the hour under each. */
.ev-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.6vmin;
  height: 20vmin;
  padding: 1vmin 1vmin 4vmin;
  border-radius: 1.4vmin;
  background: var(--inset);
}
.ev-hour { flex: 1; position: relative; height: 100%; display: flex; align-items: flex-end; }
.ev-hour i {
  position: relative;
  font-style: normal;
  display: block;
  width: 100%;
  background: var(--c);
  border-radius: 0.8vmin 0.8vmin 0 0;
}
.ev-hour i b {
  position: absolute;
  top: 0.6vmin;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.9vmin;
  font-weight: 900;
}
.ev-hour span {
  position: absolute;
  bottom: -3.2vmin;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2vmin;
  font-weight: 800;
  color: var(--muted);
}
.ev-hour.is-past i { filter: grayscale(1); opacity: 0.4; }
.ev-best { margin: 0; font-size: 2.1vmin; font-weight: 700; color: var(--good-text); }

/* ---------- the suits, in turn ---------- */

/* Under the title: the three suits on a tilted ring, seen from a little above
   (display.js places them: placeSuits). The one at the front is full size and
   lit in its own band colour, with a line filling up over its turn; the two
   behind are smaller and dimmer. The stage has a fixed size, so the turning
   moves nothing around it. */
.suits {
  position: relative;
  width: 48vmin;
  max-width: 100%;
  height: 8.2vmin;
  margin-top: 0.4vmin;
}
.suit-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30vmin; /* twice RING_RX_VMIN */
  height: 4vmin; /* twice RING_RY_VMIN */
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 0.25vmin solid color-mix(in srgb, var(--muted) 40%, transparent);
  background: color-mix(in srgb, var(--text) 4%, transparent);
}
.suit {
  position: absolute;
  left: 50%;
  top: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.8vmin;
  padding: 0.6vmin 1.5vmin 0.6vmin 1.1vmin;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 1.9vmin;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 0.4vmin 1.2vmin rgb(0 0 0 / 35%);
  transition: background-color 400ms ease, color 400ms ease;
  will-change: transform, opacity;
}
.suit i {
  flex: none;
  width: 1.5vmin;
  height: 1.5vmin;
  border-radius: 50%;
  background: var(--c, transparent);
}
.suit b { font-family: var(--font-display); font-size: 2.3vmin; font-weight: 600; }
.suit.is-on { background: var(--c, var(--accent)); border-color: transparent; color: var(--c-ink, #10141a); }
.suit.is-on i { box-shadow: 0 0 0 0.25vmin var(--c-ink, #10141a); }
/* How long until the next suit, as a line filling under the front chip. */
.suit.is-on::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 0.4vmin;
  width: 100%;
  transform-origin: left;
  background: var(--c-ink, #10141a);
  opacity: 0.45;
  animation: suit-turn var(--turn, 10s) linear both;
}
.suits.is-held .suit.is-on::after { display: none; }
button.suit { cursor: pointer; }
@keyframes suit-turn { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* The suit's own numbers fade out and back in as the board turns. */
.score-row, .score-tile .source, .timeline, .legend, .days { transition: opacity 240ms ease; }
.is-turning .score-row,
.is-turning .score-tile .source,
.is-turning .timeline,
.is-turning .days { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .suit.is-on::after { animation: none; transform: none; }
  .score-row, .score-tile .source, .timeline, .legend, .days { transition: none; }
}

/* ---------- the mascot ---------- */

/* A still picture (or GIF) in the score tile's top right corner, a third of
   it above the edge. Anchored right, growing leftwards. */
.mascot {
  position: absolute;
  top: calc(var(--mascot-size) * -0.3);
  right: 1.5vmin;
  width: calc(var(--mascot-size) * 1.25);
  height: var(--mascot-size);
  z-index: 5;
  pointer-events: none;
}
.mascot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
  transition: opacity 220ms ease;
}
.mascot img.is-fading { opacity: 0; }

/* ---------- easter egg ---------- */

.egg { align-items: center; }
.egg video { max-height: 26vh; max-width: 100%; border-radius: 1.6vmin; }

/* ---------- footer ---------- */

/* Each fact its own piece, with space between, never strung together with dots. */
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1vmin 3vmin;
  font-size: 1.8vmin;
  font-weight: 700;
  color: var(--muted);
}
.foot-left { display: flex; flex-wrap: wrap; gap: 0 2.4vmin; }
.foot .stale { color: var(--notice); }

/* ---------- a screen lying on its side ---------- */

/* The same tiles in two columns: score and conditions on the left, the chart
   down the whole right-hand side. */
@media (orientation: landscape) {
  :root { --mascot-size: 22vmin; }
  .grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
    /* Right now takes what it needs; the warnings get the rest of the left
       column, and keep it when there are none. */
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      'score chart'
      'conditions chart'
      'alerts chart';
  }
  .alerts-tile.is-empty { display: flex; }
  /* No height to spare for the days on a screen lying down: the chart takes
     the whole right-hand column instead. */
  .days-tile { display: none; }
  .timeline { flex: 1; height: auto; }
  /* The left column is narrower: the same two halves, a little smaller. */
  .conditions { flex: 1; align-content: center; gap: 1.4vmin 2.2vmin; }
  .cond-icon { font-size: 6.4vmin; }
  .cond-temp { font-size: 5.2vmin; }
  .cond-text { font-size: 2.1vmin; }
  .cond-grid { padding-left: 2.2vmin; gap: 1.4vmin 1.6vmin; }
  .cond-grid .num { font-size: 3vmin; }
  .cond-grid .unit { font-size: 1.6vmin; }
  .cond-grid dt { font-size: 1.5vmin; }
  .score #score { font-size: 15vmin; }
  .band { font-size: 6.2vmin; }
  .advice { font-size: 2.4vmin; }
  /* The column is too narrow for the number and "Excellent" side by side
     beside the mascot: the words go underneath the number instead. */
  /* Number and band side by side: below the tile's heading the band is
     clear of the mascot, so it may use the full width. */
  .score-tile .band { margin-right: 0; }
}
