:root {
  --bg: #ffffff;
  --ink: #15171c;
  --soft: rgba(21, 23, 28, 0.56);
  --line: rgba(21, 23, 28, 0.09);
  --accent: #2f5bff;
  --good: #159a5c;
  --warn: #d98312;
  --late: #d8452e;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

/* --tone is the colour of the forecast: green on track, amber a little late, red late */
.bd { --tone: var(--good); width: min(344px, 100%); height: min(340px, calc(100vh - 20px)); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(90px, 1fr); gap: 8px; padding: 16px 16px 10px; border-radius: 24px; background: #ffffff; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(21, 23, 28, 0.04), 0 22px 40px -28px rgba(21, 23, 28, 0.3); }
.bd__roll { display: block; overflow: hidden; }
.bd__roll > * { display: block; white-space: nowrap; }

.bd__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 24px; }
.bd__name { font-size: 14px; font-weight: 700; font-stretch: 104%; }
.bd__status { height: 24px; line-height: 24px; padding: 0 10px; border-radius: 12px; background: color-mix(in srgb, var(--tone) 12%, transparent); color: var(--tone); font-size: 12px; font-weight: 720; }

.bd__read { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.bd__left { display: flex; align-items: baseline; gap: 6px; }
.bd__num { height: 42px; }
.bd__num b { font-size: 42px; line-height: 42px; font-weight: 760; font-stretch: 106%; letter-spacing: -0.03em; }
.bd__left i { font-style: normal; font-size: 13px; font-weight: 620; color: var(--soft); }
.bd__side { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; padding-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--soft); text-align: right; }
.bd__side .bd__roll { height: 17px; line-height: 17px; }
.bd__done { color: var(--tone); font-weight: 700; }

.bd__chart { position: relative; min-height: 0; border-radius: 12px; outline: none; cursor: crosshair; touch-action: pan-y; }
.bd__chart:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.bd__chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bd__grid line { stroke: var(--line); stroke-width: 1; }
.bd__grid text { fill: var(--soft); font-size: 10.500px; font-weight: 620; text-anchor: middle; }
.bd__grid text.is-on { fill: var(--ink); font-weight: 760; }
.bd__end { stroke: rgba(21, 23, 28, 0.34); stroke-width: 1; stroke-dasharray: 2 3; }
.bd__endtext { fill: var(--soft); font-size: 10px; font-weight: 640; text-anchor: end; }
.bd__ideal { fill: none; stroke: rgba(21, 23, 28, 0.26); stroke-width: 1.300; stroke-dasharray: 3 4; }
.bd__faint { fill: none; stroke: color-mix(in srgb, var(--accent) 24%, transparent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.bd__area { fill: color-mix(in srgb, var(--accent) 9%, transparent); }
.bd__line { fill: none; stroke: var(--accent); stroke-width: 2.300; stroke-linejoin: round; stroke-linecap: round; }
.bd__dots circle { fill: #ffffff; stroke: var(--accent); stroke-width: 1.600; }
.bd__scope { fill: var(--soft); font-size: 10px; font-weight: 660; text-anchor: middle; }
.bd__proj { stroke: var(--tone); stroke-width: 1.800; stroke-dasharray: 5 4; stroke-linecap: round; }
.bd__flag { fill: var(--tone); }
.bd__scrub { stroke: rgba(21, 23, 28, 0.22); stroke-width: 1; }
.bd__sel { fill: var(--accent); stroke: #ffffff; stroke-width: 2.400; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; pointer-events: none; opacity: 0; fill: var(--ink); stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 3px rgba(21, 23, 28, 0.3)); z-index: 5; }
