/* The HUD's style sheet: the approved design's own (HUD_CSS and the frame's places in
   docs/designs/story-18g-the-scene-neutral-look/artboards.mjs, the values of tokens.json),
   with the design's unit set to one point of the 1920x1080 frame. hud.ts makes the markup.
   Every rule holds only inside the race picture's own box (race-picture.ts gives it the
   class), since the race screen has boxes of the same names (.tower, .track, .tile). */
@font-face {
  font-family: "Noto Sans Display";
  font-weight: 400;
  src: url("./fonts/NotoSansDisplay-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Noto Sans Display";
  font-weight: 700;
  src: url("./fonts/NotoSansDisplay-Bold.ttf") format("truetype");
}
.race-picture .hud,
.race-picture .youtag,
.race-picture .stamp,
.race-picture .looktag {
  --u: 1px;
}
.race-picture .hud {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  font-family:
    "Noto Sans Display",
    "Noto Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: #e9edf2;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.race-picture .hud * {
  box-sizing: border-box;
}
.race-picture .hud section {
  background: #161b22db;
  border: 1px solid #ffffff1f;
  border-radius: calc(12 * var(--u));
  box-shadow: 0 calc(8 * var(--u)) calc(30 * var(--u)) #0006;
}
.race-picture .hud small {
  font-size: 0.55em;
  font-weight: 600;
  margin-left: 0.08em;
}
.race-picture .hud em {
  font-style: normal;
}
.race-picture .tower {
  width: calc(372 * var(--u));
  padding: calc(10 * var(--u)) calc(12 * var(--u)) calc(8 * var(--u));
}
.race-picture .tw-head {
  display: flex;
  align-items: baseline;
  gap: calc(8 * var(--u));
  padding: 0 calc(4 * var(--u)) calc(7 * var(--u));
  border-bottom: 1px solid #ffffff24;
  font-size: calc(19 * var(--u));
}
.race-picture .tw-head b {
  font-size: calc(25 * var(--u));
  font-weight: 700;
  letter-spacing: 0.02em;
}
.race-picture .tw-head span {
  color: #98a2b0;
}
.race-picture .tw-head i {
  margin-left: auto;
  font-style: normal;
  color: #98a2b0;
}
.race-picture .tower ol {
  list-style: none;
  margin: calc(4 * var(--u)) 0 0;
  padding: 0;
}
.race-picture .tower li {
  display: grid;
  grid-template-columns:
    calc(26 * var(--u)) calc(10 * var(--u)) 1fr calc(28 * var(--u))
    calc(96 * var(--u));
  align-items: center;
  column-gap: calc(8 * var(--u));
  height: calc(41 * var(--u));
  padding: 0 calc(4 * var(--u));
  font-size: calc(21 * var(--u));
  border-radius: calc(6 * var(--u));
}
.race-picture .tower li.you {
  background: #36c5f026;
  box-shadow: inset calc(4 * var(--u)) 0 0 #36c5f0;
}
.race-picture .pos {
  font-weight: 700;
  text-align: center;
}
.race-picture .dot {
  width: calc(10 * var(--u));
  height: calc(25 * var(--u));
  border-radius: calc(3 * var(--u));
}
.race-picture .nm {
  font-weight: 600;
  white-space: nowrap;
}
.race-picture .tag {
  margin-left: calc(10 * var(--u));
  padding: calc(2 * var(--u)) calc(7 * var(--u));
  border-radius: calc(4 * var(--u));
  background: #36c5f0;
  color: #06202b;
  font-size: calc(13 * var(--u));
  font-weight: 700;
  letter-spacing: 0.06em;
  vertical-align: calc(3 * var(--u));
}
.race-picture .ty {
  width: calc(26 * var(--u));
  height: calc(26 * var(--u));
  border-radius: 50%;
  border: calc(4 * var(--u)) solid var(--c);
  font-size: calc(13 * var(--u));
  font-weight: 700;
  display: grid;
  place-items: center;
  color: #e9edf2;
}
.race-picture .gap {
  text-align: right;
  color: #e9edf2;
}
.race-picture .gap i {
  font-style: normal;
  font-size: 0.7em;
}
.race-picture .gap .cl {
  color: #3ddc84;
}
.race-picture .gap .op {
  color: #ff5a5f;
}
.race-picture .weather {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: calc(20 * var(--u));
  width: calc(720 * var(--u));
  padding: calc(10 * var(--u)) calc(20 * var(--u));
}
.race-picture .w-label {
  display: block;
  font-size: calc(14 * var(--u));
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #98a2b0;
}
.race-picture .w-now {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: calc(12 * var(--u));
  align-items: end;
}
.race-picture .w-now .w-label {
  grid-column: 1 / -1;
}
.race-picture .w-num {
  font-size: calc(72 * var(--u));
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.02em;
}
.race-picture .w-word {
  font-size: calc(25 * var(--u));
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.05;
  padding-bottom: calc(4 * var(--u));
}
.race-picture .w-word em {
  display: block;
  font-size: calc(16 * var(--u));
  font-weight: 600;
  color: #98a2b0;
  text-transform: none;
}
.race-picture .z-slicks .w-num {
  color: #e9edf2;
}
.race-picture .z-inter .w-num,
.race-picture .z-inter .w-word {
  color: #3ddc84;
}
.race-picture .z-wet .w-num,
.race-picture .z-wet .w-word {
  color: #4da3ff;
}
.race-picture .w-gauge {
  position: relative;
  display: flex;
  height: calc(34 * var(--u));
  border-radius: calc(8 * var(--u));
  overflow: visible;
  gap: calc(3 * var(--u));
}
.race-picture .w-gauge span {
  display: grid;
  place-items: center;
  font-size: calc(15 * var(--u));
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0b0f14;
  opacity: 0.34;
  border-radius: calc(6 * var(--u));
}
.race-picture .w-gauge span.in {
  opacity: 1;
}
.race-picture .zs {
  background: #e9edf2;
}
.race-picture .zi {
  background: #3ddc84;
}
.race-picture .zw {
  background: #4da3ff;
}
.race-picture .w-ptr {
  position: absolute;
  top: calc(-9 * var(--u));
  bottom: calc(-9 * var(--u));
  width: calc(6 * var(--u));
  margin-left: calc(-3 * var(--u));
  border-radius: calc(3 * var(--u));
  background: #fff;
  box-shadow:
    0 0 0 calc(2 * var(--u)) #0d1117,
    0 0 calc(12 * var(--u)) #fff9;
}
.race-picture .w-fore {
  margin-top: calc(10 * var(--u));
  font-size: calc(17 * var(--u));
  color: #e9edf2;
}
.race-picture .bars {
  display: flex;
  align-items: flex-end;
  gap: calc(5 * var(--u));
  height: calc(50 * var(--u));
  margin-top: calc(5 * var(--u));
}
.race-picture .bars i {
  width: calc(11 * var(--u));
  border-radius: calc(3 * var(--u));
  background: #ffffff26;
}
.race-picture .bars i.on {
  background: #4da3ff;
}
.race-picture .map {
  width: calc(372 * var(--u));
  padding: calc(10 * var(--u)) calc(12 * var(--u)) calc(8 * var(--u));
}
.race-picture .m-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: calc(8 * var(--u));
  padding: 0 calc(2 * var(--u)) calc(4 * var(--u));
}
.race-picture .m-head em {
  font-size: calc(14 * var(--u));
  color: #98a2b0;
  white-space: nowrap;
}
.race-picture .map svg {
  display: block;
  width: 100%;
  height: auto;
}
.race-picture .panel {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: calc(10 * var(--u));
  padding: calc(10 * var(--u));
}
.race-picture .tiles {
  display: grid;
  grid-template-columns: 0.8fr 1.25fr 1fr 1fr;
  gap: calc(8 * var(--u));
}
.race-picture .tile {
  display: flex;
  flex-direction: column;
  gap: calc(3 * var(--u));
  padding: calc(8 * var(--u)) calc(12 * var(--u));
  border-radius: calc(8 * var(--u));
  background: #1f2630;
}
.race-picture .t-label {
  font-size: calc(13 * var(--u));
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #98a2b0;
}
.race-picture .t-label em {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  margin-left: calc(6 * var(--u));
}
.race-picture .t-num {
  font-size: calc(34 * var(--u));
  font-weight: 700;
  line-height: 1;
}
.race-picture .t-sub {
  font-size: calc(14 * var(--u));
  color: #98a2b0;
}
.race-picture .t-pair {
  white-space: nowrap;
  font-size: calc(15 * var(--u));
  color: #98a2b0;
}
.race-picture .t-pair b {
  font-size: calc(26 * var(--u));
  font-weight: 700;
  color: #e9edf2;
  margin-right: calc(4 * var(--u));
}
.race-picture .t-pair b.warn,
.race-picture .t-pair b.warn + em {
  color: #ff5a5f;
}
.race-picture .t-pair em {
  display: inline;
  font-size: calc(13 * var(--u));
  margin-left: calc(4 * var(--u));
}
.race-picture .meter,
.race-picture .life {
  position: relative;
  height: calc(14 * var(--u));
  border-radius: calc(7 * var(--u));
  background: #2d3643;
  overflow: hidden;
}
.race-picture .meter span {
  display: block;
  height: 100%;
  background: #36c5f0;
}
.race-picture .life {
  height: calc(18 * var(--u));
  overflow: visible;
  margin: calc(2 * var(--u)) 0 calc(3 * var(--u));
}
.race-picture .life .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: calc(7 * var(--u));
  background: #3ddc84;
}
.race-picture .life .cliffzone {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: calc(7 * var(--u)) 0 0 calc(7 * var(--u));
  background: repeating-linear-gradient(
    135deg,
    #ff5a5f 0 calc(5 * var(--u)),
    #7d2a2e calc(5 * var(--u)) calc(10 * var(--u))
  );
  z-index: 1;
  mix-blend-mode: normal;
  opacity: 0.95;
}
.race-picture .life .cliffmark {
  position: absolute;
  top: calc(-6 * var(--u));
  bottom: calc(-6 * var(--u));
  width: calc(4 * var(--u));
  margin-left: calc(-2 * var(--u));
  background: #fff;
  border-radius: calc(2 * var(--u));
  z-index: 2;
}
.race-picture .s-near .fill {
  background: #ffb020;
}
.race-picture .s-near .t-num {
  color: #ffb020;
}
.race-picture .s-past .fill {
  background: #ff5a5f;
}
.race-picture .s-past .t-num,
.race-picture .s-past .t-sub {
  color: #ff5a5f;
}
.race-picture .dials {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.5fr;
  gap: calc(8 * var(--u));
}
.race-picture .dial {
  display: flex;
  flex-direction: column;
  gap: calc(5 * var(--u));
  padding: calc(8 * var(--u)) calc(12 * var(--u));
  border-radius: calc(8 * var(--u));
  background: #1f2630;
}
.race-picture .d-name {
  display: flex;
  justify-content: space-between;
  gap: calc(8 * var(--u));
  white-space: nowrap;
  font-size: calc(19 * var(--u));
  font-weight: 700;
}
.race-picture .d-name em {
  color: #36c5f0;
}
.race-picture .trade {
  margin-top: auto;
  font-size: calc(13 * var(--u));
  color: #98a2b0;
}
.race-picture .seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(4 * var(--u));
}
.race-picture .seg span,
.race-picture .call,
.race-picture .fit span {
  display: grid;
  place-items: center;
  height: calc(36 * var(--u));
  border-radius: calc(6 * var(--u));
  background: #2d3643;
  font-size: calc(16 * var(--u));
  font-weight: 600;
  white-space: nowrap;
}
.race-picture .seg span.on {
  background: #36c5f0;
  color: #06202b;
  font-weight: 700;
}
.race-picture .track {
  position: relative;
  height: calc(8 * var(--u));
  margin: calc(12 * var(--u)) calc(8 * var(--u)) calc(8 * var(--u));
  border-radius: calc(5 * var(--u));
  background: #2d3643;
}
.race-picture .track i {
  position: absolute;
  top: calc(14 * var(--u));
  width: 1px;
  height: calc(6 * var(--u));
  background: #ffffff40;
}
.race-picture .track b {
  position: absolute;
  top: 50%;
  width: calc(22 * var(--u));
  height: calc(22 * var(--u));
  margin: calc(-11 * var(--u)) 0 0 calc(-11 * var(--u));
  border-radius: 50%;
  background: #36c5f0;
  box-shadow: 0 0 0 calc(4 * var(--u)) #1f2630;
}
.race-picture .ends {
  display: flex;
  justify-content: space-between;
  font-size: calc(13 * var(--u));
  color: #98a2b0;
}
.race-picture .pitrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: calc(8 * var(--u));
}
.race-picture .call {
  background: #ffb020;
  color: #2a1b00;
  font-weight: 700;
  padding: 0 calc(10 * var(--u));
}
.race-picture .fit {
  display: flex;
  gap: calc(4 * var(--u));
}
.race-picture .fit span {
  width: calc(34 * var(--u));
  background: #2d3643;
  border-bottom: calc(4 * var(--u)) solid var(--c);
}
.race-picture .fit span.on {
  background: var(--c);
  color: #0b0f14;
  font-weight: 700;
}
/* Where the four panels stand on the frame, and the two labels over the picture. */
.race-picture .hud .tower {
  position: absolute;
  left: calc(32 * var(--u));
  top: calc(28 * var(--u));
}
.race-picture .hud .map {
  position: absolute;
  right: calc(32 * var(--u));
  top: calc(28 * var(--u));
}
.race-picture .hud .weather {
  position: absolute;
  left: 50%;
  top: calc(28 * var(--u));
  transform: translateX(-50%);
}
.race-picture .hud .panel {
  position: absolute;
  left: calc(32 * var(--u));
  right: calc(32 * var(--u));
  bottom: calc(24 * var(--u));
}
.race-picture .youtag {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Noto Sans Display", "Noto Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: calc(17 * var(--u));
  letter-spacing: 0.08em;
  color: #06202b;
}
.race-picture .youtag b {
  padding: calc(3 * var(--u)) calc(9 * var(--u));
  border-radius: calc(4 * var(--u));
  background: #36c5f0;
}
.race-picture .youtag i {
  width: calc(2 * var(--u));
  height: calc(30 * var(--u));
  background: #36c5f0;
}
.race-picture .stamp {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  top: calc(156 * var(--u));
  padding: calc(6 * var(--u)) calc(12 * var(--u));
  border-radius: calc(6 * var(--u));
  background: #ff5a5f;
  color: #2b0508;
  font-family: "Noto Sans Display", "Noto Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: calc(17 * var(--u));
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* The look's name, for two seconds after the key that switches it: the design's tag
   (docs/designs/story-18h-the-two-looks/8-hud.html), top centre under the weather bar. */
.race-picture .looktag {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(150 * var(--u));
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  padding: calc(7 * var(--u)) calc(12 * var(--u));
  white-space: nowrap;
  background: #161b22db;
  border: 1px solid #ffffff1f;
  border-radius: calc(12 * var(--u));
  box-shadow: 0 calc(8 * var(--u)) calc(30 * var(--u)) #0006;
  font-family: "Noto Sans Display", "Noto Sans", system-ui, sans-serif;
  color: #e9edf2;
  font-size: calc(19 * var(--u));
}
/* With the wetness override's label showing in that place, the tag stands under it. */
.race-picture .looktag[data-under-stamp] {
  top: calc(200 * var(--u));
}
.race-picture .looktag span {
  font-size: calc(13 * var(--u));
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #98a2b0;
}
.race-picture .looktag kbd {
  font:
    700 calc(14 * var(--u)) "Noto Sans Display",
    "Noto Sans",
    system-ui,
    sans-serif;
  padding: calc(2 * var(--u)) calc(8 * var(--u));
  border-radius: calc(4 * var(--u));
  background: #2d3643;
  color: #e9edf2;
}
.race-picture .youtag[hidden],
.race-picture .stamp[hidden],
.race-picture .looktag[hidden] {
  display: none;
}
/* The loading card (story 50a, loading-card.ts): the waiting screen's car, its wheels
   turning and the road running under it, on the race screen's page colour, until the
   picture's first picture. Its colours are the race screen's (clients/crude/index.html):
   the page #0d1117 (--surface-page), the car #36c5f0 (--control-accent), the road
   #98a2b0 (--text-muted) and the words #c9d1db, the waiting screen's. Sized in points of
   the 1920x1080 picture, which the race screen scales to its slot. */
.race-picture .loading-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  background: #0d1117;
  color: #c9d1db;
  font:
    34px/1.5 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
}
.race-picture .loading-card p {
  margin: 0;
}
/* The countdown (story 50b): the seconds left to the start, in large figures on the car's
   body, above its wheels. */
.race-picture .loading-on-car {
  position: relative;
}
.race-picture .loading-count {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  font-size: 88px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #c9d1db;
}
.race-picture .loading-count[hidden] {
  display: none;
}
/* The countdown over a picture drawn before zero: the card's figures, centred across
   the picture on the look tag's dark backing. Its distance from the top is set by
   loading-card.ts: below the page's strips across the picture's top, when it has any. */
.race-picture .picture-count {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 28px;
  background: #161b22db;
  border: 1px solid #ffffff1f;
  border-radius: 12px;
  box-shadow: 0 8px 30px #0006;
  font:
    700 88px/1 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-variant-numeric: tabular-nums;
  color: #c9d1db;
}
.race-picture .picture-count[hidden] {
  display: none;
}
.race-picture .loading-car {
  width: 480px;
  height: auto;
  overflow: visible;
  /* The outline faces left; mirrored, the car drives to the right, as on the waiting
     screen. The wheels' spin and the road's run mirror with it. */
  transform: scaleX(-1);
}
.race-picture .loading-car path,
.race-picture .loading-car circle,
.race-picture .loading-car line {
  fill: none;
  stroke: #36c5f0;
  /* The waiting screen's 2.5px on its 280px car, kept in proportion on this 480px one. */
  stroke-width: 4.3px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.race-picture .loading-car .loading-wing {
  fill: color-mix(in srgb, #36c5f0 25%, transparent);
}
.race-picture .loading-car .loading-wheel {
  transform-box: fill-box;
  transform-origin: center;
  animation: loading-wheel 0.9s linear infinite reverse;
}
.race-picture .loading-car .loading-road {
  stroke: #98a2b0;
  stroke-dasharray: 40 30;
  animation: loading-road 0.12s linear infinite;
}
/* Names of their own: the race screen has a `spin` and a `c-road` of its own. */
@keyframes loading-wheel {
  to {
    transform: rotate(360deg);
  }
}
@keyframes loading-road {
  to {
    stroke-dashoffset: -70;
  }
}
