/* The chapters built as sets: the data drawn over their stills, and the light that answers the pointer.
   Type comes from the site's own faces (--sans, --mono, and Chakra Petch for figures); nothing here restyles a panel. */

#sets {
  position: absolute;
  z-index: 1; /* over the still and the live canvas, under the stage's reading shade */
  pointer-events: none;
}

.set {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.set.is-up {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s ease 0.1s;
}

.flying .set,
.menu-open .set {
  opacity: 0;
}

/* One figure of the data. The outer box is laid on the wall in perspective; the shape inside is what shows. */
.datum {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  pointer-events: auto;
  cursor: pointer;
  outline: none;
  --c: #2b55ff;
  --hot: #cfdcff;
}

.datum.is-pink { --c: #ff3fd0; --hot: #ffd9f6; }
.datum.is-amber { --c: #ff8a1f; --hot: #ffe2c2; }
.datum.is-grey { --c: #9a8fd0; --hot: #e6e0ff; }
.datum.is-still { pointer-events: none; }

.datum-shape {
  position: absolute;
  inset: 0;
  display: block;
  mix-blend-mode: screen;
  transition: filter 0.25s ease, opacity 0.35s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.set.has-pick .datum:not(.is-on):not(.datum-area):not(.datum-cells) .datum-shape {
  opacity: 0.72;
}

.set.has-pick .datum-cells:not(.is-on) .datum-shape {
  filter: brightness(0.78);
}

.datum.is-dim:not(.datum-area) .datum-shape {
  opacity: 0.4;
}

/* A neon bar: a tube round a faint fill. It grows from its left end when the chapter comes up. */
.datum-bar .datum-shape {
  border: 5px solid var(--hot);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 26%, transparent);
  box-shadow: 0 0 10px var(--c), 0 0 34px var(--c), inset 0 0 10px var(--c), inset 0 0 30px var(--c);
  clip-path: inset(-60px 100% -60px -60px);
  animation: neon-idle 5.2s ease-in-out infinite;
}

.set.is-up .datum-bar .datum-shape {
  clip-path: inset(-60px -60px -60px -60px);
  transition: clip-path 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s, filter 0.25s ease, opacity 0.35s ease;
}

.datum-bar.is-on .datum-shape {
  filter: brightness(1.6) saturate(1.2);
  background: color-mix(in srgb, var(--c) 46%, transparent);
  box-shadow: 0 0 14px var(--hot), 0 0 60px var(--c), 0 0 130px var(--c), inset 0 0 14px var(--c), inset 0 0 44px var(--c);
}

/* A meter on a board: the lit part of its track. */
.datum-meter .datum-shape {
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--hot);
  box-shadow: 0 0 10px var(--c), 0 0 34px var(--c);
  transition: transform 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s, filter 0.25s ease, opacity 0.35s ease;
}

.set.is-up .datum-meter .datum-shape { transform: scaleX(var(--v)); }
.datum-meter.is-on .datum-shape { filter: brightness(1.5); box-shadow: 0 0 14px var(--hot), 0 0 60px var(--c), 0 0 120px var(--c); }

/* A column of cells, lit from the bottom up. The top lit cells breathe, as a level meter does. */
.datum-cells .datum-shape {
  display: flex;
  flex-direction: column-reverse;
  gap: 1.6%;
}

.datum-cells b {
  flex: 1;
  opacity: 0;
  transition: opacity 0.3s ease calc(var(--r) * 45ms + 250ms);
}

.datum-cells b.on {
  background: color-mix(in srgb, var(--hot) 62%, var(--c));
  box-shadow: 0 0 14px var(--c), 0 0 46px var(--c);
}

.set.is-up .datum-cells b.on { opacity: 1; }
.set.is-up .datum-cells b.on:nth-last-of-type(-n + 16) { animation: cell-level 1.9s ease-in-out calc(var(--r) * -0.13s) infinite; }
.datum-cells.is-on .datum-shape { filter: brightness(1.45) saturate(1.2); }

/* Something that is already in the render: nothing is drawn until it is pointed at. Then its own
   colour comes up over it, with a rim, an aura round it and a shaft of light through it. */
.datum-area .datum-shape {
  background: radial-gradient(120% 120% at 50% 50%, color-mix(in srgb, var(--c) 34%, transparent), color-mix(in srgb, var(--c) 10%, transparent) 70%);
  box-shadow: 0 0 0 2px var(--hot), 0 0 26px var(--c), 0 0 90px var(--c), inset 0 0 36px color-mix(in srgb, var(--c) 55%, transparent);
  opacity: 0;
}

.datum-area.is-round .datum-shape { border-radius: 50%; }
.datum-area.is-on .datum-shape { opacity: 1 !important; animation: aura 2.4s ease-in-out infinite; }

.datum-area::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 46%;
  height: 900px;
  transform: translateX(-50%);
  background: linear-gradient(to top, color-mix(in srgb, var(--c) 46%, transparent), transparent 85%);
  filter: blur(14px);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.datum-area.is-on::after { opacity: 0.55; }
.datum-area.is-round::after { display: none; }

/* What is written in the scene: flat, in the site's faces, where the render left room for it. */
.set-label {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  font-size: 48px; /* its own size: the wall's perspective scales it (sets.js) */
  white-space: pre;
  text-align: center;
  font-family: var(--mono);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.06em;
  color: #f4ecff;
  text-shadow: 0 0 10px rgba(250, 189, 249, 0.55), 0 0 28px rgba(250, 189, 249, 0.35);
  pointer-events: none;
}

.set-label.set-fig {
  font-family: 'Chakra Petch', var(--mono);
  font-weight: 900;
  letter-spacing: 0;
}

.set-label.is-pink { color: #ffd9f6; text-shadow: 0 0 10px #ff3fd0, 0 0 30px #ff3fd0; }
.set-label.is-blue { color: #dbe5ff; text-shadow: 0 0 10px #2b55ff, 0 0 30px #2b55ff; }

@keyframes neon-idle {
  0%, 100% { filter: brightness(1); }
  47% { filter: brightness(1.12); }
  50% { filter: brightness(0.9); }
  53% { filter: brightness(1.14); }
}

@keyframes cell-level {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

@keyframes aura {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

@media (prefers-reduced-motion: reduce) {
  .datum-shape, .datum-cells b { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ */
/* On trial: three other ways to draw the checkout chart (?look=a|b|c)  */
/* A bar's own box is 400px long, whatever its value: 400px / --val is  */
/* one point of the scale, and the scale runs to 30.                    */
/* ------------------------------------------------------------------ */

.set[data-look] .datum-bar {
  --pt: calc(400px / var(--val));
}

.set[data-look] .datum-bar .datum-shape,
.set[data-look].is-up .datum-bar .datum-shape {
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  clip-path: none;
  animation: none;
}

.set[data-look] .datum-shape::before,
.set[data-look] .datum-shape::after {
  content: '';
  position: absolute;
  left: 0;
}

/* a: a dot-matrix sign. Every column of lamps is half a point; the lit ones are the figure. */
.set[data-look='a'] .datum-bar {
  --cell: calc(var(--pt) * 0.5);
}

.set[data-look='a'] .datum-shape::before,
.set[data-look='a'] .datum-shape::after {
  top: 14%;
  bottom: 14%;
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 calc(var(--cell) * 0.7), transparent 0 var(--cell)), linear-gradient(#000 70%, transparent 0);
  mask-image: repeating-linear-gradient(90deg, #000 0 calc(var(--cell) * 0.7), transparent 0 var(--cell)), linear-gradient(#000 70%, transparent 0);
  -webkit-mask-size: auto, 100% 20%;
  mask-size: auto, 100% 20%;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.set[data-look='a'] .datum-shape::before {
  width: calc(var(--pt) * 30);
  background: color-mix(in srgb, var(--c) 30%, transparent);
}

.set[data-look='a'] .datum-shape::after {
  width: 0;
  background: linear-gradient(90deg, var(--c), var(--hot) 92%, #fff);
  transition: width 1s steps(24) 0.3s;
}

.set[data-look='a'].is-up .datum-shape::after {
  width: 100%;
}

.set[data-look='a'] .datum-shape {
  filter: drop-shadow(0 0 5px var(--c)) drop-shadow(0 0 18px var(--c));
}

.set[data-look='a'] .datum-bar.is-on .datum-shape {
  filter: brightness(1.5) drop-shadow(0 0 8px var(--hot)) drop-shadow(0 0 36px var(--c));
}

/* c: an instrument. A ruled scale under each track, a hatched level, a bright marker at the reading. */
.set[data-look='c'] .datum-shape::before {
  top: 22%;
  bottom: 0;
  width: calc(var(--pt) * 30);
  border-bottom: 2px solid color-mix(in srgb, var(--hot) 70%, transparent);
  background:
    repeating-linear-gradient(90deg, var(--hot) 0 2px, transparent 2px calc(var(--pt) * 5)) 0 100% / 100% 30% no-repeat,
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--hot) 55%, transparent) 0 1px, transparent 1px var(--pt)) 0 100% / 100% 14% no-repeat,
    linear-gradient(color-mix(in srgb, var(--c) 9%, transparent), color-mix(in srgb, var(--c) 9%, transparent)) 0 0 / 100% 56% no-repeat;
}

.set[data-look='c'] .datum-shape::after {
  top: 22%;
  height: 44%;
  width: 0;
  border: 2px solid var(--hot);
  border-right: 10px solid #fff;
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c) 85%, var(--hot)) 0 4px, transparent 4px 11px);
  box-shadow: 0 0 10px var(--c), 0 0 34px var(--c), 6px 0 18px var(--hot);
  box-sizing: border-box;
  transition: width 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s, filter 0.25s;
}

.set[data-look='c'].is-up .datum-shape::after {
  width: 100%;
}

.set[data-look='c'] .datum-bar.is-on .datum-shape::after {
  filter: brightness(1.5);
  box-shadow: 0 0 14px var(--hot), 0 0 60px var(--c), 8px 0 30px #fff;
}

/* b: what a terminal would print, laid flat on the wall in one piece. The bars and the labels of the
   scene give way to it. */
.set[data-look='b'] .datum,
.set[data-look='b'] .set-label {
  display: none;
}

.set-table {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: auto;
  font-family: var(--mono);
  font-size: 19px;
  line-height: 1;
  color: #ffe6fd;
  text-shadow: 0 0 6px rgba(255, 120, 240, 0.6), 0 0 18px rgba(255, 47, 230, 0.3);
  animation: crt-flicker 4.3s steps(1) infinite;
}

.set-table p {
  margin: 0;
}

.st-cmd,
.st-foot {
  font-size: 15px;
  letter-spacing: 0.06em;
  color: rgba(255, 214, 251, 0.75);
}

.st-cmd i {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 6px;
  vertical-align: -0.15em;
  background: #fabdf9;
  animation: blink 1s steps(2) infinite;
}

.st-row {
  display: grid;
  grid-template-columns: 3ch 16ch 1fr 7ch;
  align-items: center;
  padding: 16px 8px;
  border-top: 1px dashed rgba(250, 189, 249, 0.35);
  white-space: nowrap;
  cursor: pointer;
  --c: #7d97ff;
}

.st-row.is-pink { --c: #ff5fdc; }

.st-n { color: rgba(255, 214, 251, 0.6); }
.st-k { letter-spacing: 0.08em; }

.st-b {
  color: var(--c);
  letter-spacing: 0;
  text-shadow: 0 0 8px var(--c), 0 0 26px var(--c);
  clip-path: inset(-30px 100% -30px 0);
}

.set.is-up .st-b {
  clip-path: inset(-30px 0 -30px 0);
  transition: clip-path 0.9s steps(24) 0.3s;
}

.st-b s {
  text-decoration: none;
  opacity: 0.35;
  text-shadow: none;
}

.st-v {
  text-align: right;
  font-family: 'Chakra Petch', var(--mono);
  font-weight: 900;
  font-size: 26px;
  color: #fff;
}

.st-row.is-on {
  background: color-mix(in srgb, var(--c) 16%, transparent);
}

.st-row.is-on .st-k {
  justify-self: start;
  padding: 3px 6px;
  margin: -3px -6px;
  color: #14061c;
  background: #fabdf9;
  text-shadow: none;
}

.st-row.is-on .st-b {
  filter: brightness(1.5);
}

/* The same three looks on a board's meter. Its box is the whole track: 400px is 100%. */
.set[data-look] .datum-meter .datum-shape,
.set[data-look].is-up .datum-meter .datum-shape {
  transform: none;
  background: none;
  box-shadow: none;
}

.set[data-look] .datum-meter .datum-shape::before,
.set[data-look] .datum-meter .datum-shape::after {
  top: 0;
  bottom: 0;
}

.set[data-look='a'] .datum-meter { --cell: 12.5px; }
.set[data-look='a'] .datum-meter .datum-shape::before { width: 100%; background: color-mix(in srgb, var(--c) 34%, transparent); }
.set[data-look='a'] .datum-meter .datum-shape::before,
.set[data-look='a'] .datum-meter .datum-shape::after {
  -webkit-mask-size: auto, 100% 50%;
  mask-size: auto, 100% 50%;
}
.set[data-look='a'].is-up .datum-meter .datum-shape::after { width: calc(var(--v) * 100%); transition: width 1s steps(16) 0.3s; }

.set[data-look='c'] .datum-meter { --pt: 4px; }
.set[data-look='c'] .datum-meter .datum-shape::before {
  top: 0;
  width: 100%;
  background:
    repeating-linear-gradient(90deg, var(--hot) 0 2px, transparent 2px 40px) 0 100% / 100% 34% no-repeat,
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--hot) 55%, transparent) 0 1px, transparent 1px 8px) 0 100% / 100% 16% no-repeat,
    linear-gradient(color-mix(in srgb, var(--c) 12%, transparent), color-mix(in srgb, var(--c) 12%, transparent)) 0 0 / 100% 60% no-repeat;
}
.set[data-look='c'] .datum-meter .datum-shape::after { top: 0; height: 60%; }
.set[data-look='c'].is-up .datum-meter .datum-shape::after { width: calc(var(--v) * 100%); }

.set[data-look='b'] .datum-meter .datum-shape {
  font-family: var(--mono);
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
  color: var(--hot);
  text-shadow: 0 0 8px var(--c), 0 0 24px var(--c);
  mix-blend-mode: normal;
}
.set[data-look='b'] .datum-meter .datum-shape::before,
.set[data-look='b'] .datum-meter .datum-shape::after { content: none; }
.set[data-look='b'] .datum-meter .datum-shape s { text-decoration: none; opacity: 0.35; text-shadow: none; }

/* ------------------------------------------------------------------ */
/* What is pointed at, in every look: the rest of the picture steps     */
/* back, and a tag says what it is.                                     */
/* ------------------------------------------------------------------ */

.datum-tag {
  position: absolute;
  left: 0;
  bottom: 100%;
  display: none;
  gap: 0.6em;
  margin-bottom: 10px;
  padding: 5px 9px;
  font: 500 24px/1 var(--mono);
  font-style: normal;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: #14061c;
  background: var(--hot);
  box-shadow: 0 0 18px var(--c);
  pointer-events: none;
}

.datum-tag b { font-weight: 500; }
.datum-tag span { font-family: 'Chakra Petch', var(--mono); font-weight: 900; letter-spacing: 0; }
.datum.is-on .datum-tag { display: flex; animation: panel-print 0.25s steps(4) backwards; }

/* ---------- look a: lamps. Everything written in the scene is a dot-matrix sign. ---------- */

.set[data-look='a'] .set-label {
  font-family: 'Chakra Petch', var(--mono);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 8px #ff7df0, 0 0 26px rgba(255, 47, 230, 0.7);
}

.set[data-look='a'] .datum-tag {
  font-family: 'Chakra Petch', var(--mono);
  font-weight: 900;
  color: #fff;
  background: rgba(10, 4, 16, 0.85);
  border: 2px solid var(--hot);
  text-shadow: 0 0 8px var(--c);
}

/* ---------- look b: terminal. Printed text, dashed marks, inverse video for what is chosen. ---------- */

.set[data-look='b'] .set-label {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #ffe6fd;
  text-shadow: 0 0 5px rgba(255, 120, 240, 0.7), 0 0 16px rgba(255, 47, 230, 0.35);
}

.set[data-look='b'] .set-label.set-fig::before { content: '['; opacity: 0.6; margin-right: 0.2em; }
.set[data-look='b'] .set-label.set-fig::after { content: ']'; opacity: 0.6; margin-left: 0.2em; }

.set[data-look='b'] .datum-area .datum-shape {
  background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--c) 30%, transparent) 0 2px, transparent 2px 6px);
  box-shadow: none;
  outline: 3px dashed var(--hot);
  outline-offset: 6px;
  animation: none !important;
}

.set[data-look='b'] .datum-tag::before { content: '> '; }

/* ---------- look c: instrument. Corner marks, a sweep through the thing, a ruled tag. ---------- */

.set[data-look='c'] .set-label {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.22em;
  color: rgba(255, 230, 253, 0.85);
  text-shadow: none;
}

.set[data-look='c'] .set-label.set-fig {
  font-family: 'Chakra Petch', var(--mono);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 120, 240, 0.6);
}

.set[data-look='c'] .datum-area .datum-shape {
  --m: 26px;
  box-shadow: none;
  background:
    linear-gradient(var(--hot), var(--hot)) 0 0 / var(--m) 3px no-repeat, linear-gradient(var(--hot), var(--hot)) 0 0 / 3px var(--m) no-repeat,
    linear-gradient(var(--hot), var(--hot)) 100% 0 / var(--m) 3px no-repeat, linear-gradient(var(--hot), var(--hot)) 100% 0 / 3px var(--m) no-repeat,
    linear-gradient(var(--hot), var(--hot)) 0 100% / var(--m) 3px no-repeat, linear-gradient(var(--hot), var(--hot)) 0 100% / 3px var(--m) no-repeat,
    linear-gradient(var(--hot), var(--hot)) 100% 100% / var(--m) 3px no-repeat, linear-gradient(var(--hot), var(--hot)) 100% 100% / 3px var(--m) no-repeat,
    linear-gradient(to bottom, transparent, color-mix(in srgb, var(--c) 60%, transparent) 48%, #fff 50%, transparent 52%) 0 0 / 100% 200% no-repeat;
  filter: drop-shadow(0 0 6px var(--c));
  inset: -8px;
}

.set[data-look='c'] .datum-area.is-on .datum-shape { animation: sweep 1.6s linear infinite; }
@keyframes sweep {
  from { background-position: 0 0, 0 0, 100% 0, 100% 0, 0 100%, 0 100%, 100% 100%, 100% 100%, 0 200%; }
  to { background-position: 0 0, 0 0, 100% 0, 100% 0, 0 100%, 0 100%, 100% 100%, 100% 100%, 0 -100%; }
}

.set[data-look='c'] .datum-tag {
  color: #fff;
  background: none;
  box-shadow: none;
  border-bottom: 2px solid var(--hot);
  padding: 0 0 6px;
  letter-spacing: 0.2em;
  text-shadow: 0 0 8px var(--c);
}

/* The switch between looks, while they are on trial. */
.look-bar {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  transform: translateX(-50%);
  font: 11px/1 var(--mono);
  letter-spacing: 0.16em;
  color: #fabdf9;
  background: rgba(10, 4, 16, 0.9);
  border: 1px solid rgba(250, 189, 249, 0.4);
}

.look-bar span { padding: 0 8px; }

.look-bar button {
  padding: 8px 10px;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.look-bar button[aria-pressed='true'] { color: #14061c; background: #fabdf9; }

/* Things that are in the render are lit in the render (the still's shader, main.js): nothing is
   painted over them. A look may add its marks round them; the beams of the histogram take none. */
.datum-area .datum-shape {
  background: none;
  box-shadow: none;
}

.datum-area::after,
.set[data-set='typical'] .datum-area .datum-shape {
  display: none;
}

/* ------------------------------------------------------------------ */
/* One quiet way of writing on the scene. The render carries the shape */
/* and the light; the page adds small plain lettering and nothing else. */
/* ------------------------------------------------------------------ */

.set-label,
.set-label.set-fig {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #f1e8fb;
  text-shadow: none;
  opacity: 1;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.set-label.is-pink,
.set-label.is-blue {
  color: #f1e8fb;
  text-shadow: none;
}

.set.has-pick .set-label { opacity: 0.8; }
.set.has-pick .set-label.is-lit { opacity: 1; color: #fff; }

/* What is pointed at is read out in the panel; nothing floats over the scene. */
.datum-tag { display: none !important; }

/* A bar, the quiet way: a flat lit strip on the wall with a bright end, no tube and no halo. */
.datum-bar .datum-shape {
  inset: 32% 0;
  border: 0;
  border-right: 4px solid var(--hot);
  border-radius: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 30%, transparent), color-mix(in srgb, var(--c) 78%, transparent));
  box-shadow: none;
  animation: none;
}

.datum-bar.is-on .datum-shape {
  filter: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--hot) 55%, transparent), var(--hot));
  box-shadow: 0 0 26px color-mix(in srgb, var(--c) 70%, transparent);
}

.set.has-pick .datum-bar:not(.is-on) .datum-shape {
  opacity: 0.45;
}

/* Checkouts: the render lights the wall with one round lamp per category. Each figure is a ring on its
   lamp: a full turn is 30%, so the lit part of the ring is the share. Nothing covers the lamp itself. */
.set[data-set='shops'] .datum-area .datum-shape {
  opacity: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--hot) calc(var(--v) * 360deg), rgba(255, 255, 255, 0.16) 0);
  -webkit-mask: radial-gradient(closest-side, transparent 87%, #000 89%, #000 98.5%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 87%, #000 89%, #000 98.5%, transparent 100%);
  box-shadow: none;
  mix-blend-mode: normal;
  animation: none;
}

.set[data-set='shops'].has-pick .datum-area:not(.is-on) .datum-shape {
  opacity: 0.6;
}

.set[data-set='shops'] .datum-area.is-on .datum-shape {
  background: conic-gradient(from 0deg, #fff calc(var(--v) * 360deg), rgba(255, 255, 255, 0.3) 0);
  animation: none;
}

/* Pointed at, the ring is a neon tube switched on: it strikes, then burns white with its colour round it.
   The glow is on the ring's box, outside the mask that cuts the ring, so it spreads freely. */
.set.is-neon .datum-area {
  transition: filter 0.2s ease;
}

.set.is-neon .datum-area.is-on {
  filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 16px var(--c)) drop-shadow(0 0 46px var(--c)) drop-shadow(0 0 110px var(--c));
  animation: neon-strike 0.5s steps(1) backwards;
}

@keyframes neon-strike {
  0% { opacity: 0.2; }
  12% { opacity: 1; }
  22% { opacity: 0.35; }
  34% { opacity: 1; }
  46% { opacity: 0.6; }
  58% { opacity: 1; }
}

/* The figures are small, plain and a little unwell: now and then the tube that draws one slips, splits
   its colours and drops a band of lines, as the terminal's lettering does. Each on its own clock (--gd). */
.set.is-neon .set-label.set-fig {
  font-weight: 500;
  letter-spacing: 0.1em;
  animation: crt-fail 9s steps(1) var(--gd, 0s) infinite;
}

.set.is-neon .set-label.is-lit {
  text-shadow: 0 0 8px #fff, 0 0 22px #ff7df0;
}

@keyframes crt-fail {
  0% { opacity: 1; text-shadow: none; clip-path: none; }
  41% { opacity: 0.25; text-shadow: none; clip-path: none; }
  41.6% { opacity: 1; text-shadow: -5px 0 #2b55ff, 5px 0 #ff2fe6; clip-path: inset(0 -20px 52% -20px); }
  42.4% { opacity: 0.8; text-shadow: 4px 0 #2b55ff, -4px 0 #ff2fe6; clip-path: inset(46% -20px 0 -20px); }
  43.2% { opacity: 1; text-shadow: -2px 0 #2b55ff, 2px 0 #ff2fe6; clip-path: none; }
  44% { opacity: 1; text-shadow: none; clip-path: none; }
  78% { opacity: 0.45; text-shadow: none; clip-path: none; }
  78.5% { opacity: 1; text-shadow: 3px 0 #2b55ff, -3px 0 #ff2fe6; clip-path: none; }
  79.2% { opacity: 1; text-shadow: none; clip-path: none; }
}

@media (prefers-reduced-motion: reduce) {
  .set.is-neon .datum-area.is-on,
  .set.is-neon .set-label.set-fig {
    animation: none;
  }
}

/* A label read beside its thing, tied to it by a fine line, as the render ties the thin band's. */
.set-label.has-lead::before {
  content: '';
  position: absolute;
  right: calc(100% + 0.65em);
  top: 50%;
  width: 3.4em;
  height: 0.07em;
  background: currentColor;
  opacity: 0.55;
}

/* Revenue: a band of the cylinder pointed at is drawn as the cylinder is: two sides and the front of
   the ring at its foot (the top band keeps its whole upper ring). Nothing is drawn until then. */
.set[data-set='revenue'] .datum-area.is-tube .datum-shape {
  border-left: 3px solid var(--hot);
  border-right: 3px solid var(--hot);
  animation: none;
}

.set[data-set='revenue'] .datum-area.is-tube .datum-shape::before,
.set[data-set='revenue'] .datum-area.is-tube .datum-shape::after {
  content: '';
  position: absolute;
  left: -3px;
  right: -3px;
  aspect-ratio: 5.2 / 1;
  border: 3px solid var(--hot);
  border-radius: 50%;
}

.set[data-set='revenue'] .datum-area.is-tube .datum-shape::after {
  bottom: 0;
  transform: translateY(50%);
  clip-path: inset(50% -10px -10px -10px); /* the half of the ring that faces us */
}

.set[data-set='revenue'] .datum-area.is-tube .datum-shape::before {
  top: 0;
  transform: translateY(-50%);
  clip-path: inset(50% -10px -10px -10px);
}

.set[data-set='revenue'] .datum-area.is-tube.is-pink .datum-shape::before {
  clip-path: none;
}

/* The revenue projection is lit in the picture itself, by its own colour (main.js): nothing is drawn
   over it, because a drawn outline never sits exactly on a rendered cylinder. */
.set[data-set='revenue'] .datum-area.is-tube .datum-shape,
.set[data-set='revenue'] .datum-area.is-tube::after {
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  opacity: 0 !important;
  animation: none !important;
}
