:root {
  color-scheme: only light;

  --room: #1A1815;
  --room-glow: #2B2722;
  --surface: #0E0D0B;
  --bezel-hi: #3A3732;
  --bezel: #2B2925;
  --bezel-lo: #1C1A17;
  --screen: #0B0A09;
  --label: #DAD3C4;
  --label-muted: #9A9182;
  --osd: #F2EEE6;
  --osd-muted: #A39A89;
  --osd-scrim: rgba(0, 0, 0, .55);
  --rec-osd: #FF4A3D;
  --accent: #E1A527;
  --on-accent: #1F1C17;
  --amber: #FFB547;
  --amber-dim: #B9832F;
  --amber-bg: #150D03;
  --green: #8CF2A6;
  --green-dim: #56A56C;
  --green-bg: #04120A;
  --lcd: #CFE4FF;
  --lcd-dim: #7F97B3;
  --lcd-bg: #0A1420;
  --nixie: #FFB067;
  --nixie-glow: #FF6A10;
  --nixie-off: rgba(255, 150, 80, .085);
  --exit: #22A455;
  --desk: #211F1B;
  --desk-hi: #34312B;
  --metal-hi: #4A4741;
  --metal: #34322D;
  --metal-lo: #23211E;
  --titlecard: #050505;
  --titlecard-ink: #F2EEE6;
  --titlecard-muted: #BDB6A8;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='1.6 0 0 0 -.3 1.6 0 0 0 -.3 1.6 0 0 0 -.3 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --screws:
    radial-gradient(circle at 50% 40%, #8d8981 0 1.5px, #3b3934 2.5px, transparent 3.5px) .5rem .5rem / 7px 7px no-repeat,
    radial-gradient(circle at 50% 40%, #8d8981 0 1.5px, #3b3934 2.5px, transparent 3.5px) calc(100% - .5rem) .5rem / 7px 7px no-repeat,
    radial-gradient(circle at 50% 40%, #8d8981 0 1.5px, #3b3934 2.5px, transparent 3.5px) .5rem calc(100% - .5rem) / 7px 7px no-repeat,
    radial-gradient(circle at 50% 40%, #8d8981 0 1.5px, #3b3934 2.5px, transparent 3.5px) calc(100% - .5rem) calc(100% - .5rem) / 7px 7px no-repeat;
  --brushed: repeating-linear-gradient(90deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px);

  --f-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-text: 'Barlow', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --f-serif: 'Source Serif 4', Georgia, serif;

  --t-name: clamp(2.75rem, 12vw, 4.5rem);
  --t-slogan: clamp(1.375rem, 5.6vw, 2rem);
  --t-data: .75rem;
  --t-osd: .6875rem;

  --s-1: .25rem;
  --s-2: .5rem;
  --s-3: .75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --gutter: clamp(.75rem, 4vw, 1rem);
  --gap: .75rem;
  --b: .375rem;
  --hit: 2.75rem;
  --plate-h: 4rem;
  --mon-top: 2rem;
  --fr-face: linear-gradient(to bottom, #34322F, #1A1917 20%, #0F0E0D 75%, #1B1A18);
  --fr-edge: rgba(255, 255, 255, .14);
  --desk-h: 9.5rem;
  --tabbar-h: 4.25rem;
  --r-tag: 4px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --z-osd: 2;
  --z-keys: 20;
  --z-popover: 30;
}

[data-light="night"] {
  --room: #0C0B0A;
  --room-glow: #16130F;
  --desk: #181613;
  --desk-hi: #26231F;
}

html {
  background: var(--surface);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--surface);
  color: var(--label);
  font-family: var(--f-text);
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.ic {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
}

[data-shift="on"] .v-off,
[data-shift="on"] .v-weekend,
[data-shift="off"] .v-on,
[data-shift="off"] .v-weekend,
[data-shift="weekend"] .v-on,
[data-shift="weekend"] .v-off {
  display: none;
}

.voice {
  font-style: italic;
  font-size: .9375rem;
  line-height: 1.4;
}

/* a line Mira says, always signed: “…” — Mira */
.who {
  font-family: var(--f-mono);
  font-style: normal;
  font-weight: 600;
  font-size: .75em;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: .75;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .04em;
  border-radius: var(--r-tag);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--hit);
  padding: 0 var(--s-4);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

/* room and header plate */

.room {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 50% 0%, var(--room-glow), transparent 65%),
    var(--room);
  outline: none;
}

.room::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--noise);
  opacity: .035;
}

.plate {
  position: relative;
  z-index: var(--z-popover);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  min-height: var(--plate-h);
  padding: var(--s-2) var(--gutter);
  background: linear-gradient(to bottom, #2C2925, #1E1C19);
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
}

.plate__brand {
  flex: 1;
  min-width: 0;
}

.plate__name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #EDE6D7;
  text-shadow: 0 1px 0 #000, 0 -1px 0 rgba(255, 255, 255, .08);
}

.plate__sub {
  margin-top: .2rem;
  font-family: var(--f-mono);
  font-size: var(--t-osd);
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--label-muted);
}

[data-standalone] .plate__sub {
  color: var(--green);
}

@media (max-width: 29.99em) {
  .plate__pre {
    display: none;
  }
}

/* AI chip and lamps: separate grid cells on phones, one row on the right on wide screens */
.plate__status {
  display: contents;
}

.lamps {
  display: flex;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lamp {
  display: flex;
  align-items: center;
  gap: .35rem;
  white-space: nowrap;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6E675C;
}

.lamp::before {
  content: '';
  width: .625rem;
  height: .625rem;
  border-radius: 50%;
  background: #3A3631;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .6);
}

[data-shift="on"] .lamp--on,
[data-shift="off"] .lamp--off,
[data-shift="weekend"] .lamp--weekend {
  color: var(--label);
}

[data-shift="on"] .lamp--on::before {
  background: #7CE38B;
  box-shadow: 0 0 8px #7CE38B, inset 0 -1px 1px rgba(0, 0, 0, .3);
}

[data-shift="off"] .lamp--off::before {
  background: #FF5A45;
  box-shadow: 0 0 8px #FF5A45, inset 0 -1px 1px rgba(0, 0, 0, .3);
}

[data-shift="weekend"] .lamp--weekend::before {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), inset 0 -1px 1px rgba(0, 0, 0, .3);
}

.plate__clock {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  padding: .3rem .6rem;
  background: #0A0908;
  border-radius: 3px;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, .8),
    0 0 0 1px #000,
    0 0 0 .1875rem #141312,
    0 0 0 calc(.1875rem + 1px) rgba(255, 255, 255, .14);
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}

/* the clock needs the script; until then the plate keeps its place empty */
html:not([data-js]) .plate__clock {
  visibility: hidden;
}

.plate__label {
  font-size: var(--t-osd);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--label-muted);
}

.plate__time {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  color: var(--amber);
  text-shadow: 0 0 6px rgba(255, 181, 71, .45);
}

.toast {
  position: absolute;
  left: 50%;
  top: calc(100% + .75rem);
  z-index: var(--z-popover);
  padding: .45rem .8rem;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-dim);
  border-radius: 3px;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-data);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(140, 242, 166, .5);
  white-space: nowrap;
  transform: translateX(-50%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .5);
}

/* the status line stays rendered for screen readers; it shows only while it has something to say */
.toast:not([data-show]) {
  opacity: 0;
  pointer-events: none;
}

.toast[data-show] {
  animation: toast-in .25s var(--ease) both;
}

.toast:empty {
  padding: 0;
  border: 0;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -.4rem);
  }
}

.dymo {
  display: inline-block;
  padding: .3rem .6rem;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #F4F4F2;
  background: linear-gradient(to bottom, #2A2A2A, #121212);
  border: 0;
  border-radius: 2px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .7), 0 -1px 0 rgba(255, 255, 255, .18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  white-space: nowrap;
}

.dymo--tilt {
  transform: rotate(-1.2deg);
}

.dymo--ai {
  position: relative;
  min-height: 1.75rem;
  text-decoration: none;
  cursor: pointer;
}

.dymo--ai::after {
  content: '';
  position: absolute;
  inset: -.5rem -.25rem;
}

.dymo--ai:hover {
  color: var(--accent);
}

.ai {
  position: relative;
}

.ai-pop {
  position: absolute;
  top: calc(100% + .75rem);
  right: 0;
  z-index: var(--z-popover);
  width: max-content;
  max-width: min(18rem, calc(100vw - 2 * var(--gutter)));
  padding: var(--s-3) var(--s-4);
  background: #F2EEE6;
  color: #1F1C17;
  border-radius: var(--r-tag);
  font-size: .9375rem;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}

.ai-pop a {
  display: inline-block;
  margin-top: var(--s-2);
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* wall: mobile flow first */

.wall {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: var(--gap) var(--gutter);
}

.col {
  display: contents;
}

.unit--main { order: 1; }
.dvr { order: 2; }
.tix { order: 3; }
.next { order: 4; }
.bank { order: 5; }
.ptz { order: 6; }
.feeds { order: 7; }
.order { order: 8; }
.crew { order: 9; }
.dm { order: 10; }
.keys { order: 11; }

.side {
  display: grid;
  gap: var(--gap);
  align-content: start;
}

.desk {
  display: none;
}

/* monitor frame: every screen on the wall sits in the same bezel */

.unit,
.fr {
  --fw: var(--b);
  position: relative;
  padding: var(--fw);
  background:
    linear-gradient(var(--screen), var(--screen)) content-box,
    linear-gradient(#000, #000) center / calc(100% - 2 * var(--fw) + 2px) calc(100% - 2 * var(--fw) + 2px) no-repeat,
    var(--fr-face);
  border-radius: .625rem;
  box-shadow:
    inset 0 0 0 1px var(--fr-edge),
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 10px 22px rgba(0, 0, 0, .5);
}

.fr {
  --fw: .1875rem;
  background:
    linear-gradient(var(--screen), var(--screen)) content-box,
    linear-gradient(#000, #000) center / calc(100% - 2 * var(--fw) + 2px) calc(100% - 2 * var(--fw) + 2px) no-repeat,
    var(--fr-face);
  border-radius: .3125rem;
  box-shadow:
    inset 0 0 0 1px var(--fr-edge),
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 3px 8px rgba(0, 0, 0, .45);
}

.unit--cam::after,
.unit--term::after,
.unit--green::after,
.unit--lcd::after {
  content: '';
  position: absolute;
  inset: var(--b);
  z-index: 3;
  pointer-events: none;
  border-radius: 3px;
  background:
    radial-gradient(ellipse at 25% -10%, rgba(255, 255, 255, .09), transparent 55%),
    radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(0, 0, 0, .35));
}

/* cams */

.bank {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.bank__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-3);
}

.bank__h {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--label-muted);
}

.bank__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.cam {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  container: cam / inline-size;
  padding: 0;
  overflow: hidden;
  background: var(--screen);
  color: var(--osd);
  color-scheme: only dark;
  border: 0;
  border-radius: 3px;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.cam--nosignal:not(.cam--locked) {
  cursor: default;
}

.cam__img,
.cam__vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transition: filter .2s;
}

.cam__vid {
  opacity: 0;
  transition: opacity .4s;
}

.cam__vid.is-live {
  opacity: 1;
}

.cam::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .5), transparent 32%, transparent 68%, rgba(0, 0, 0, .5)),
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .08) 0 1px, transparent 1px 2px);
}

.cam::after {
  content: '';
  position: absolute;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  background-image: var(--noise);
  opacity: .09;
  animation: grain .8s steps(6) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-6%, 4%); }
  40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, 8%); }
  80% { transform: translate(7%, 2%); }
  100% { transform: translate(-4%, -5%); }
}

[data-light="night"] .cam__img,
[data-light="night"] .cam__vid {
  filter: grayscale(1) contrast(1.15) brightness(.72);
}

[data-light="night"] .cam::after {
  opacity: .17;
}

.cam__ir {
  display: none;
}

[data-light="night"] .cam__ir {
  display: inline;
}

button.cam:hover .cam__img {
  filter: brightness(1.08);
}

[data-light="night"] button.cam:hover .cam__img {
  filter: grayscale(1) contrast(1.15) brightness(.8);
}

.cam__osd {
  position: absolute;
  z-index: var(--z-osd);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 2px #000;
  white-space: nowrap;
}

.cam__osd--tl {
  top: .45rem;
  left: .5rem;
}

.cam__osd--tr {
  top: .45rem;
  right: .5rem;
}

.cam__osd--bl {
  bottom: .45rem;
  left: .5rem;
}

.cam__rec {
  color: var(--rec-osd);
}

.cam__dot {
  display: inline-block;
  animation: blink 1s steps(1, end) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.cam__play {
  position: absolute;
  z-index: var(--z-osd);
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: -1.375rem 0 0 -1.375rem;
  border-radius: 50%;
  background: var(--osd-scrim);
  box-shadow: inset 0 0 0 1.5px var(--osd);
}

.cam__play .ic {
  width: 1.125rem;
  height: 1.125rem;
  margin-left: 2px;
  fill: currentColor;
}

.cam[aria-disabled="true"] {
  cursor: default;
}

.cam[aria-disabled="true"] .cam__play {
  display: none;
}

.cam__onmon,
.cam__lock {
  position: absolute;
  z-index: var(--z-osd);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  padding: .3rem .45rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 2px;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cam__lock {
  z-index: 4;
  background: var(--rec-osd);
  color: #fff;
}

.cam[data-onmon] .cam__rec,
.cam[data-onmon] .cam__play {
  display: none;
}

.cam[data-onmon] .cam__onmon {
  display: block;
}

.bank[data-ptz] .cam__lock {
  display: block;
  animation: lock-flash .9s steps(2, jump-none) 1;
}

.bank[data-ptz] .cam__onmon,
.bank[data-ptz] .cam__play {
  visibility: hidden;
}

.bank[data-ptz] .cam__img,
.bank[data-ptz] .cam__vid {
  animation: ptz-try .9s var(--ease) 1;
}

@keyframes ptz-try {
  0% { transform: none; }
  30% { transform: scale(1.06) translate(var(--px, 3%), var(--py, 0)); }
  45% { transform: scale(1.06) translate(calc(var(--px, 3%) * -.4), calc(var(--py, 0) * -.4)); }
  60% { transform: scale(1.03) translate(calc(var(--px, 3%) * .2), 0); }
  100% { transform: none; }
}

@keyframes lock-flash {
  50% {
    opacity: .35;
  }
}

.cam[data-live],
.cam[data-onmon] {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.cam__state {
  position: absolute;
  z-index: var(--z-osd);
  right: .4rem;
  bottom: .3rem;
  display: none;
  padding: .3rem .45rem;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--osd);
  background: var(--osd-scrim);
  box-shadow: inset 0 0 0 1px var(--osd);
}

[data-light="day"][data-shift="off"] .cam__state,
[data-light="day"][data-shift="weekend"] .cam__state {
  display: block;
}

.cam--nosignal {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1A1815;
}

.cam--nosignal::before {
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px);
}

.cam--nosignal::after {
  opacity: .24;
}

.cam--locked {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.cam--locked .cam__osd--bl {
  right: .5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cam__padlock {
  display: inline-block;
  width: .875em;
  height: .875em;
  margin-right: .3em;
  vertical-align: -.1em;
  opacity: .8;
}

.cam--locked:hover .cam__osd--bl,
.cam--locked:focus-visible .cam__osd--bl {
  color: var(--accent);
}

.cam__nosignal {
  position: relative;
  z-index: var(--z-osd);
  padding: 0 var(--s-2);
  text-align: center;
}

.cam__nosignal strong {
  display: block;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: .8125rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.cam__nosignal span {
  display: block;
  margin-top: var(--s-1);
  font-style: italic;
  font-size: .75rem;
  line-height: 1.3;
  color: rgba(242, 238, 230, .8);
}

@container cam (max-width: 13.5rem) {
  .cam__recword {
    display: none;
  }
}

@container cam (max-width: 11.5rem) {
  [data-light="day"][data-shift="off"] .cam__state,
  [data-light="day"][data-shift="weekend"] .cam__state {
    display: none;
  }
}

@container cam (max-width: 10rem) {
  [data-light="night"] .cam__ir,
  .cam__rec {
    display: none;
  }

  .cam__nosignal span {
    display: none;
  }
}

/* next tape: nixie desk clock */

.next {
  display: flex;
  justify-content: center;
}

.next__body {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "head tubes";
  align-items: center;
  gap: .2rem var(--s-4);
  width: 100%;
  padding: var(--s-3) var(--s-4);
  color: var(--nixie);
  background:
    var(--screws),
    repeating-linear-gradient(100deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 7px),
    linear-gradient(to bottom, #4A3626, #2F2117 55%, #21170F);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 220, 180, .14), 0 8px 18px rgba(0, 0, 0, .5);
  font-family: var(--f-mono);
}

.next__head {
  grid-area: head;
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1.2;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #D9A272;
}

.next__short {
  display: none;
}

.next .nixie__tubes {
  grid-area: tubes;
  justify-content: flex-end;
}

.nixie__tubes {
  display: flex;
  align-items: center;
  gap: 3px;
}

.nixie__plain {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  color: var(--nixie);
  text-shadow: 0 0 4px var(--nixie-glow), 0 0 14px rgba(255, 106, 16, .7);
}

.tube {
  position: relative;
  flex: 0 1 2.1rem;
  min-width: 1.35rem;
  aspect-ratio: 5 / 8;
  container-type: inline-size;
  border-radius: 45% 45% 14% 14% / 26% 26% 8% 8%;
  background:
    repeating-linear-gradient(0deg, rgba(255, 170, 110, .05) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255, 170, 110, .05) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 50% 35%, rgba(255, 140, 60, .1), rgba(20, 10, 4, .92) 75%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 210, 170, .16),
    inset 3px 2px 6px rgba(255, 255, 255, .06),
    0 2px 0 #1A120B;
}

.tube::after {
  content: '';
  position: absolute;
  left: 18%;
  top: 6%;
  width: 18%;
  height: 40%;
  border-radius: 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .16), transparent);
  pointer-events: none;
}

.tube__d {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.6rem;
  font-size: 92cqi;
  line-height: 1;
  color: var(--nixie-off);
}

.tube__d.is-on {
  color: var(--nixie);
  text-shadow: 0 0 3px #FFD2A4, 0 0 8px var(--nixie-glow), 0 0 18px rgba(255, 90, 0, .8);
}

.colon {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.colon::before,
.colon::after {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--nixie);
  box-shadow: 0 0 6px var(--nixie-glow);
}

/* direct line: Mira's Telegram channel on a monitor */

.dm {
  position: relative;
}

.unit--dm {
  height: 100%;
}

.dmscreen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 13rem;
  container: dm / inline-size;
  color: #F5F7FA;
  text-decoration: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(94, 181, 247, .06), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(94, 181, 247, .05), transparent 45%),
    #0E1621;
  border-radius: 3px;
  overflow: hidden;
}

.dmscreen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 25% -10%, rgba(255, 255, 255, .08), transparent 55%),
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .14) 0 1px, transparent 1px 3px);
}

.dmscreen__osd {
  position: absolute;
  z-index: var(--z-osd);
  top: .45rem;
  left: .55rem;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--osd);
  text-shadow: 0 0 2px #000;
}

.tg {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.tg__msgs {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: var(--s-2);
  min-height: 0;
  padding: 1.6rem var(--s-3) var(--s-2);
}

.tg__bubble {
  display: block;
  min-width: 0;
  max-width: 34rem;
  padding: .45rem .75rem .55rem;
  background: #182533;
  border-radius: .9rem .9rem .9rem .3rem;
  font-family: var(--f-text);
  font-size: .9375rem;
  line-height: 1.38;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

.tg__name {
  display: block;
  margin-bottom: .1rem;
  font-weight: 600;
  font-size: .8125rem;
  color: #6AB3F3;
}

.tg__nowrap {
  white-space: nowrap;
}

.tg__down {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: .25rem;
  border-radius: 50%;
  background: #182533;
  color: #8FA6BA;
}

.tg__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  height: 2.75rem;
  padding: 0 var(--s-3);
  background: #17212B;
  border-top: 1px solid #0B1117;
  color: #5EB5F7;
}

.tg__mute {
  font-family: var(--f-text);
  font-weight: 600;
  font-size: .875rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.tg__ic,
.tg__down {
  line-height: 0;
}

.tg__ic svg,
.tg__down svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tg__ic--dm {
  border-radius: 50%;
  animation: dm-pulse 1.6s ease-in-out infinite;
}

@keyframes dm-pulse {
  0%,
  100% {
    color: #4C9FE0;
    filter: none;
  }

  50% {
    color: #CFEAFF;
    filter: drop-shadow(0 0 4px #5EB5F7) drop-shadow(0 0 12px #2F8FE0);
  }
}

.dmscreen:hover .tg__bubble {
  background: #1D2D3D;
}

.dm {
  --reject-w: 3.5rem;
}

.dm .tg__msgs {
  padding-right: calc(var(--reject-w) + var(--s-3));
}

@media (max-width: 63.99em), (orientation: portrait) {
  .dm .tg__down {
    display: none;
  }

  .dm .reject__tape {
    font-size: .5rem;
    letter-spacing: .1em;
  }

  .dm .reject__cap {
    font-size: .5rem;
    letter-spacing: .03em;
  }
}

@media (min-width: 64em) and (orientation: landscape) {
  .dm {
    --reject-w: clamp(4.5rem, 18%, 6.25rem);
  }

  @container dm (max-width: 26rem) {
    .tg__bubble {
      font-size: .8125rem;
    }

    .tg__down {
      display: none;
    }
  }

  @container dm (max-width: 22rem) {
    .tg__bubble {
      font-size: .75rem;
      line-height: 1.28;
    }
  }

  /* labels go only when the screen is narrow and short; a tall screen has room for them */
  @container dm (max-width: 22rem) and (max-height: 14rem) {
    .dmscreen__osd,
    .tg__name {
      display: none;
    }

    .tg__msgs {
      padding-top: .6rem;
    }
  }
}

.reject {
  position: absolute;
  z-index: 7;
  display: block;
  top: -.35rem;
  right: .55rem;
  width: var(--reject-w);
  margin: 0;
  padding: .3rem .3rem .25rem;
  font: inherit;
  color: inherit;
  text-align: center;
  background: #E9E4D8;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(0, 0, 0, .06);
  filter: brightness(.78) sepia(.2);
  transform: rotate(3.5deg);
  transition: filter .25s;
}

.reject:hover,
.reject:focus-visible {
  filter: brightness(.95) sepia(.1);
}

.reject:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.reject[data-lit] {
  background: #FFF;
  filter: none;
  box-shadow: 0 0 0 3px #FFF, 0 0 22px 6px rgba(255, 255, 255, .55), 0 3px 8px rgba(0, 0, 0, .55);
}

.reject__code {
  position: relative;
  display: block;
}

.reject__qr {
  display: block;
  width: 100%;
  height: auto;
}

.reject__tape {
  position: absolute;
  left: calc(-.3rem - 9%);
  right: calc(-.3rem - 9%);
  top: 41%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: max(14%, .75rem);
  background: rgba(242, 201, 76, .7);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: .5625rem;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #6A4E0E;
  transform: rotate(-9deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .45s var(--ease), opacity .3s .12s;
}

.reject[data-lit] .reject__tape,
[data-scan-state="found"] .scanner__tape {
  opacity: 0;
  transform: translate(45%, -160%) rotate(-28deg);
}

.reject__cap {
  display: block;
  margin-top: .2rem;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: .5625rem;
  line-height: 1.1;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  color: #3A352D;
}

/* main monitor */

.unit--main {
  isolation: isolate;
  display: flex;
  flex-direction: column;
}

.ambi {
  position: absolute;
  z-index: -1;
  left: -12%;
  right: -12%;
  top: 4%;
  bottom: 4%;
  width: 124%;
  height: 92%;
  object-fit: cover;
  filter: blur(46px) saturate(1.5);
  opacity: .32;
  pointer-events: none;
  transition: opacity .6s;
}

[data-light="night"] .ambi {
  opacity: .42;
}

[data-power="off"] .ambi {
  opacity: 0;
}

.monitor {
  position: relative;
  container: mon / inline-size;
  display: flex;
  flex-direction: column;
  background: var(--screen);
  color: var(--osd);
  color-scheme: only dark;
  border-radius: 3px;
  overflow: hidden;
}

.monitor__top {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--mon-top);
  padding: 0 var(--s-3);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tally {
  flex: none;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: #5A4A1A;
}

.monitor[data-playing] .tally,
.monitor[data-live="1"] .tally {
  background: var(--rec-osd);
  box-shadow: 0 0 6px var(--rec-osd);
}

.monitor[data-live="0"]:not([data-playing]) .tally {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(225, 165, 39, .7);
}

.monitor__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitor__mode {
  flex: none;
  color: var(--osd-muted);
}

.monitor__mode .v-live,
.monitor[data-live="1"] .monitor__mode .v-tape,
[data-tape-run="repeat"] .monitor__mode .v-auto,
[data-tape-run="auto"] .monitor__mode .v-repeat {
  display: none;
}

.monitor[data-live="1"] .monitor__mode .v-live {
  display: inline;
  color: var(--rec-osd);
}

@container mon (max-width: 20rem) {
  .monitor__mode {
    display: none;
  }
}

.monitor__screen {
  position: relative;
  width: min(100%, calc(64vh * 9 / 16));
  width: min(100%, calc(64svh * 9 / 16));
  aspect-ratio: 9 / 16;
  margin-inline: auto;
  overflow: hidden;
  background: var(--screen);
}

.monitor__preview {
  position: absolute;
  inset: 0;
}

.monitor__preview::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .45), transparent 30%, transparent 62%, rgba(0, 0, 0, .7)),
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .06) 0 1px, transparent 1px 2px);
}

.monitor__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.monitor__osd {
  position: absolute;
  z-index: var(--z-osd);
  left: .75rem;
  right: .75rem;
  bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--s-2);
  min-width: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

.monitor__title {
  min-width: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.375rem;
  line-height: 1.05;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.monitor__dur {
  flex: none;
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: var(--t-data);
  color: var(--osd-muted);
}

.monitor__time {
  position: absolute;
  z-index: var(--z-osd);
  left: .75rem;
  bottom: .75rem;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 2px #000;
}

[data-tape-stamp]:empty,
.tix__date:empty {
  display: none;
}

.monitor__play {
  position: absolute;
  inset: 0;
  z-index: var(--z-osd);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  width: 100%;
  padding: 0;
  color: var(--osd);
  background: none;
  border: 0;
  text-decoration: none;
  cursor: pointer;
}

.monitor__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .45), 0 0 0 6px rgba(225, 165, 39, .18);
  transition: transform .15s var(--ease);
}

.monitor__btn .ic {
  width: 1.75rem;
  height: 1.75rem;
  margin-left: 3px;
  fill: currentColor;
}

.monitor__play:hover .monitor__btn {
  transform: scale(1.05);
}

.monitor__note {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1;
  letter-spacing: .04em;
  text-shadow: 0 0 2px #000;
}

.monitor__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.monitor__end {
  position: absolute;
  inset: 0;
  z-index: var(--z-osd);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-4);
  text-align: center;
  background: var(--screen);
}

.monitor__endh {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: .875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.monitor__next {
  font-family: var(--f-mono);
  font-size: var(--t-data);
  color: var(--nixie);
}

.monitor__endkeys {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
}

.standby {
  position: absolute;
  inset: var(--mon-top) 0 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-4);
  text-align: center;
  background: #050505;
  animation: standby-in .5s .5s both;
}

@keyframes standby-in {
  from {
    opacity: 0;
  }
}

.standby__led {
  width: .625rem;
  height: .625rem;
  border-radius: 50%;
  background: var(--rec-osd);
  box-shadow: 0 0 10px var(--rec-osd);
  animation: blink 2s steps(1, end) infinite;
}

.standby__h {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: .875rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.standby__p {
  font-family: var(--f-mono);
  font-size: var(--t-data);
  color: var(--osd-muted);
}

.standby .key {
  margin-top: var(--s-2);
}

.dymo--bezel {
  position: absolute;
  z-index: 6;
  right: 1rem;
  bottom: -.7rem;
  transform: rotate(-1.4deg);
}

/* DVR on the desk */

.dvr {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-2);
  background:
    var(--brushed),
    linear-gradient(to bottom, #2A2824, #1A1916);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 6px 14px rgba(0, 0, 0, .45);
}

html:not([data-js]) .dvr {
  display: none;
}

.dvr {
  container: dvr / inline-size;
}

.dvr__top {
  display: flex;
  align-items: center;
  gap: var(--s-1);
}

.dvr__top .dvr__brand {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.key--auto[aria-pressed="true"] .key__lamp {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

@container dvr (max-width: 19rem) {
  .dvr__ch {
    display: none;
  }
}

.dvr__brand {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--label-muted);
}

.dvr__keys {
  display: flex;
  align-items: center;
  gap: var(--s-1);
}

.dvr__gap {
  flex: 1;
}

.key {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-width: var(--hit);
  height: var(--hit);
  padding: 0 var(--s-2);
  color: var(--label);
  background: linear-gradient(to bottom, #3A3732, #2A2824);
  border: 0;
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 2px 0 #0D0C0B, 0 3px 6px rgba(0, 0, 0, .4);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.key .ic {
  width: 1.125rem;
  height: 1.125rem;
}

.key:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 #0D0C0B;
}

.key:disabled {
  opacity: .4;
  cursor: default;
}

.key--wide {
  padding: 0 var(--s-4);
}

.key--amber {
  color: var(--on-accent);
  background: linear-gradient(to bottom, #F0BC45, var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 0 #8A6214, 0 3px 6px rgba(0, 0, 0, .4);
}

.key--full {
  height: 2.25rem;
  min-width: 0;
  padding: 0 var(--s-3) 0 var(--s-2);
}

.key--full .ic {
  width: 1rem;
  height: 1rem;
}

[data-full] .key--full {
  color: var(--on-accent);
  background: linear-gradient(to bottom, #F0BC45, var(--accent));
}

.key--auto,
.key--remote {
  height: 2.25rem;
  min-width: 0;
  padding: 0 var(--s-3) 0 var(--s-2);
}

.key--remote .ic {
  width: 1rem;
  height: 1rem;
}

/* compact keys keep their look; an invisible pad brings the touch area up to 44 px */
.key--full::after,
.key--auto::after,
.key--remote::after,
.dvr__keys .key::after {
  content: '';
  position: absolute;
  inset: min(0px, calc((100% - var(--hit)) / 2));
}

.key__lamp {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: #5A2420;
}

.key__lamp--pair {
  background: #23402B;
}

[data-standalone] .key__lamp--pair {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

[data-tape="live"] .key--live .key__lamp {
  background: var(--rec-osd);
  box-shadow: 0 0 6px var(--rec-osd);
}

.axis {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas:
    "start . stub end"
    "track track track track";
  align-items: center;
  gap: 0 var(--s-2);
  min-height: 2.75rem;
  padding: .4rem var(--s-2) 0;
  background: #0D1A10;
  border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .8);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--green);
}

.axis__end {
  flex: none;
  color: var(--green-dim);
}

.axis__end--start {
  grid-area: start;
}

.axis__end--live {
  grid-area: end;
}

[data-tape="live"] .axis__end--live {
  color: var(--green);
  text-shadow: 0 0 6px rgba(140, 242, 166, .6);
}

.axis__track {
  grid-area: track;
  position: relative;
  height: 2.5rem;
  margin-inline: .75rem;
}

.axis__track::before,
.axis__fill {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
}

.axis__track::before {
  right: 0;
  background: #24402B;
}

.axis__fill {
  background: var(--green);
  box-shadow: 0 0 6px rgba(140, 242, 166, .5);
}

.axis--before .axis__track::before {
  left: -.75rem;
  background: linear-gradient(90deg, transparent, #24402B .75rem);
}

.axis--after .axis__track::before {
  right: -.75rem;
  background: linear-gradient(90deg, #24402B calc(100% - .75rem), transparent);
}

.axis--before.axis--after .axis__track::before {
  background: linear-gradient(90deg, transparent, #24402B .75rem, #24402B calc(100% - .75rem), transparent);
}

.axis__stub {
  flex: none;
  width: 1.25rem;
  height: .5rem;
  grid-area: stub;
  background: repeating-linear-gradient(-45deg, #24402B 0 3px, transparent 3px 6px);
}

.axis__tick {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  padding: 0;
  transform: translate(-50%, -50%);
  color: var(--green);
  background: #0D1A10;
  border: 1.5px solid #2F5A3B;
  border-radius: 2px;
  font: inherit;
  cursor: pointer;
}

.axis__tick::after {
  content: '';
  position: absolute;
  inset: -.7rem -.45rem;
}

.axis__tick.is-done {
  border-color: var(--green);
}

.axis__tick[aria-current] {
  background: var(--green);
  color: #04120A;
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(140, 242, 166, .7);
  transform: translate(-50%, -50%) scale(1.15);
}

.axis__tick--radio {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
}

.axis__tick--radio::after {
  inset: -.875rem -.5rem;
}

/* off-site feeds: switch panel */

.feeds {
  position: relative;
  container: feeds / inline-size;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4) var(--s-3);
  background:
    var(--screws),
    var(--brushed),
    linear-gradient(to bottom, var(--metal-hi), var(--metal) 18%, var(--metal-lo));
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 8px 18px rgba(0, 0, 0, .45);
  outline: none;
}

.feeds:focus-visible {
  outline: 3px solid var(--accent);
}

.feeds__head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding-inline: var(--s-2);
}

.exit {
  flex: none;
  padding: .2rem .4rem;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: .75rem;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #EFFFF3;
  background: linear-gradient(to bottom, #2DBE66, var(--exit));
  border-radius: 2px;
  box-shadow: 0 0 0 2px #111, 0 0 14px rgba(45, 190, 102, .55);
  text-shadow: 0 0 6px rgba(255, 255, 255, .6);
}

.feeds__h {
  flex: 1;
  min-width: 0;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-data);
  line-height: 1.1;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--label);
}

.feeds__handle {
  font-family: var(--f-mono);
  font-size: var(--t-osd);
  color: var(--label-muted);
}

.feeds__voice {
  padding-inline: var(--s-2);
  font-size: .875rem;
  color: var(--label);
}

.feeds__row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--s-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sw {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  min-height: var(--hit);
  padding: .35rem 0 .3rem;
  color: var(--label);
  text-decoration: none;
  border-radius: 5px;
}

.sw:hover {
  background: rgba(255, 255, 255, .04);
}

.sw__lamp {
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, .25), transparent 50%), #2B2A27;
  box-shadow: 0 0 0 2px #1A1917, inset 0 1px 2px rgba(0, 0, 0, .7);
  transition: background .2s, box-shadow .2s;
}

.sw.is-on .sw__lamp {
  background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, .7), transparent 50%), var(--lamp);
  box-shadow: 0 0 0 2px #1A1917, 0 0 10px var(--lamp), 0 0 18px var(--lamp);
}

.sw__base {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #1b1a18 0 22%, transparent 23%),
    radial-gradient(circle at 38% 32%, #8a8780, #45423d 55%, #26241f);
  box-shadow: 0 0 0 3px #1E1C19, 0 2px 4px rgba(0, 0, 0, .6), inset 0 1px 1px rgba(255, 255, 255, .25);
}

.sw__lever {
  position: absolute;
  left: 50%;
  top: 50%;
  width: .5rem;
  height: 1.55rem;
  margin-left: -.25rem;
  border-radius: .25rem .25rem .4rem .4rem;
  background: linear-gradient(to right, #77746E, #F1EEE8 45%, #9A968F 70%, #5D5A55);
  box-shadow: 0 3px 4px rgba(0, 0, 0, .55);
  transform-origin: 50% 0;
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1);
}

.sw__lever::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -.2rem;
  width: .7rem;
  height: .7rem;
  margin-left: -.35rem;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #FFFFFF, #B5B1A9 55%, #6F6C66);
}

.sw:hover .sw__lever {
  transform: scaleY(.88);
}

.sw.is-on .sw__lever {
  transform: scaleY(-1);
}

.sw__name {
  margin-top: .65rem;
  padding: .2rem .3rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: .625rem;
  line-height: 1.1;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #F4F4F2;
  background: linear-gradient(to bottom, #2A2A2A, #121212);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}

.sw__verb {
  font-family: var(--f-mono);
  font-size: .625rem;
  line-height: 1;
  color: var(--label-muted);
}

@container feeds (max-width: 25rem) {
  .sw__name {
    padding-inline: .2rem;
    font-family: var(--f-display);
    font-weight: 700;
    font-size: .6875rem;
    letter-spacing: .03em;
  }
}

/* PTZ control */

.ptz {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background:
    var(--screws),
    var(--brushed),
    linear-gradient(to bottom, var(--metal-hi), var(--metal) 18%, var(--metal-lo));
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 8px 18px rgba(0, 0, 0, .45);
}

.ptz__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "h seg"
    "lcd lcd"
    "label label"
    "reply reply";
  align-items: center;
  gap: var(--s-1) var(--s-3);
  min-width: 0;
}

.ptz__h {
  grid-area: h;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-data);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--label);
}

.ptz__fr-lcd {
  grid-area: lcd;
  justify-self: start;
}

.ptz__fr-seg {
  grid-area: seg;
}

.ptz__lcd {
  padding: .25rem .45rem;
  background: #2A0A08;
  border-radius: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .8);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #FF7A6B;
  text-shadow: 0 0 6px rgba(255, 74, 61, .6);
  white-space: nowrap;
}

.seg {
  position: relative;
  padding: .35rem .6rem;
  background: #0A0606;
  border-radius: 3px;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .9);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.seg__val {
  color: #FF5A45;
  text-shadow: 0 0 8px rgba(255, 90, 69, .6);
}

.ptz__label {
  grid-area: label;
  font-family: var(--f-mono);
  font-size: var(--t-osd);
  line-height: 1.35;
  color: var(--label-muted);
}

.ptz__reply {
  grid-area: reply;
  min-height: 1.4em;
  font-size: .875rem;
  color: var(--label);
}

.stick {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  --sx: 0px;
  --sy: 0px;
}

.stick:active {
  cursor: grabbing;
}

.stick__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .35) 0 2px, transparent 2px 6px),
    radial-gradient(circle at 50% 45%, #2A2826 0 38%, #141312 62%, #3A3833 66%, #1A1917 72%);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .08);
}

.stick__shaft {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1rem;
  height: 1rem;
  margin: -.5rem 0 0 -.5rem;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #8B8882, #3A3834);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, .35);
  transform: translate(calc(var(--sx) * .45), calc(var(--sy) * .45));
}

.stick__ball {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.25rem;
  height: 2.25rem;
  margin: -1.125rem 0 0 -1.125rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FF8F80, #D2352A 45%, #7A1610 85%);
  box-shadow: 0 6px 10px rgba(0, 0, 0, .6), inset 0 -2px 4px rgba(0, 0, 0, .35);
  transform: translate(var(--sx), var(--sy));
  transition: transform .35s cubic-bezier(.3, 1.8, .5, 1);
}

.stick__shaft {
  transition: transform .35s cubic-bezier(.3, 1.8, .5, 1);
}

.stick[data-drag] .stick__ball,
.stick[data-drag] .stick__shaft {
  transition: none;
}

/* nav keys */

.plate .keys--plate {
  display: none;
}

.keys {
  position: sticky;
  bottom: 0;
  z-index: var(--z-keys);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--s-1);
  margin-inline: calc(-1 * var(--gutter));
  margin-bottom: calc(-1 * var(--gap));
  padding: var(--s-2) var(--gutter) calc(var(--s-2) + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, #2B2925, #1A1916);
  border-top: 1px solid #3B3832;
}

.navkey {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  min-height: 3.25rem;
  padding: .25rem 0;
  color: var(--label-muted);
  background: linear-gradient(to bottom, #3A3732, #2A2824);
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 0 #0D0C0B;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
}

.navkey .ic {
  width: 1.25rem;
  height: 1.25rem;
}

.navkey[aria-current="page"] {
  color: var(--on-accent);
  background: linear-gradient(to bottom, #F0BC45, var(--accent));
}

.navkey:hover {
  color: var(--label);
}

.navkey[aria-current="page"]:hover {
  color: var(--on-accent);
}

/* crew lamp, the shift lamps in small: red breathing without a hard hat number on this device, steady green with one */

.navkey--crew {
  position: relative;
}

[data-crew] .navkey--crew::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(25% - var(--crew-ic, 1.25rem) / 4 - .13125rem);
  width: .2625rem;
  height: .2625rem;
  margin-top: -.13125rem;
  border-radius: 50%;
  background: #FF5A45;
  box-shadow: 0 0 4px #FF5A45, inset 0 -1px 1px rgba(0, 0, 0, .3);
  animation: crew-lamp .8s ease-in-out infinite alternate;
}

[data-crew="on"] .navkey--crew::after {
  background: #7CE38B;
  box-shadow: 0 0 4px #7CE38B, inset 0 -1px 1px rgba(0, 0, 0, .3);
  animation: none;
}

@keyframes crew-lamp {
  from {
    filter: brightness(1);
    box-shadow: 0 0 4px #FF5A45, inset 0 -1px 1px rgba(0, 0, 0, .3);
  }
  to {
    filter: brightness(.55);
    box-shadow: 0 0 1px rgba(255, 90, 69, .4), inset 0 -1px 1px rgba(0, 0, 0, .3);
  }
}

/* side units */

.term,
.green,
.lcd {
  position: relative;
  height: 100%;
  padding: var(--s-3) var(--s-4) var(--s-4);
  border-radius: 3px;
  font-family: var(--f-mono);
  font-size: .8125rem;
  line-height: 1.45;
  overflow: hidden;
}

.term::before,
.green::before,
.lcd::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px);
}

.term {
  background: var(--amber-bg);
  color: var(--amber);
  text-shadow: 0 0 5px rgba(255, 181, 71, .4);
}

.term__head,
.green__head,
.lcd__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-bottom: var(--s-2);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-data);
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.term__head {
  border-bottom: 1px dashed var(--amber-dim);
}

.term__flag {
  padding: .1rem .35rem;
  background: var(--amber);
  color: var(--amber-bg);
  text-shadow: none;
}

.term__meta {
  margin-top: var(--s-2);
  font-size: var(--t-data);
  color: var(--amber-dim);
  text-transform: uppercase;
}

.term__text {
  margin-top: var(--s-2);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
}

.term__voice {
  margin-top: var(--s-1);
  font-family: var(--f-text);
  color: var(--amber-dim);
}

.term__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-3);
  margin-top: var(--s-3);
  font-size: var(--t-data);
  text-transform: uppercase;
}

.term__cursor {
  display: inline-block;
  width: .5rem;
  height: .9rem;
  margin-left: .25rem;
  vertical-align: -.15rem;
  background: var(--amber);
  animation: blink 1.1s steps(1, end) infinite;
}

.term__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  padding: 0 var(--s-3);
  color: var(--amber-bg);
  background: var(--amber);
  font-weight: 600;
  text-decoration: none;
  text-shadow: none;
  letter-spacing: .06em;
}

.term__btn:hover {
  filter: brightness(1.1);
}

.order--none {
  display: none;
}

[data-order="none"] .order--open {
  display: none;
}

[data-order="none"] .order--none,
.order--none.order--idle {
  display: block;
}

.green {
  background: var(--green-bg);
  color: var(--green);
  text-shadow: 0 0 5px rgba(140, 242, 166, .3);
}

.green__head {
  border-bottom: 1px dashed var(--green-dim);
}

.absence {
  display: none;
  margin-top: var(--s-2);
  font-weight: 600;
  color: var(--green);
}

[data-visit="away"] .absence {
  display: block;
}

.tix__start {
  margin-top: var(--s-2);
  font-size: var(--t-osd);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green-dim);
}

@supports not selector(::-webkit-scrollbar) {
  .tix .green {
    scrollbar-width: thin;
    scrollbar-color: var(--green-dim) transparent;
  }
}

.tix .green::-webkit-scrollbar {
  width: 7px;
}

.tix .green::-webkit-scrollbar-thumb {
  background: var(--green-dim);
  border-radius: 2px;
}

.tix .green::-webkit-scrollbar-track {
  background: transparent;
}

.tix__list {
  margin: var(--s-1) 0 0;
  padding: 0;
  list-style: none;
}

.tix__row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "name date state"
    "title title state";
  align-items: center;
  gap: .1rem var(--s-3);
  width: 100%;
  min-height: 2.75rem;
  padding: .3rem var(--s-2);
  color: var(--green);
  background: none;
  border: 0;
  font: inherit;
  font-size: var(--t-data);
  line-height: 1.2;
  text-align: left;
  text-shadow: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.tix__row:hover {
  background: rgba(140, 242, 166, .08);
}

.tix__row.is-done {
  color: var(--green-dim);
}

.tix__row.is-current {
  background: var(--green);
  color: var(--green-bg);
  text-shadow: none;
}

.tix__no,
.tix__dur {
  display: none;
}

.tix__name {
  grid-area: name;
  font-size: var(--t-osd);
}

.tix__date {
  grid-area: date;
  font-size: var(--t-osd);
  opacity: .75;
}

.tix__title {
  grid-area: title;
  font-weight: 600;
  text-transform: uppercase;
}

.tix__state {
  grid-area: state;
  font-weight: 600;
  text-align: right;
}

.lcd {
  background: var(--lcd-bg);
  color: var(--lcd);
  text-shadow: 0 0 5px rgba(207, 228, 255, .3);
}

.lcd__head {
  border-bottom: 1px dashed var(--lcd-dim);
}

.lcd__big {
  margin-top: var(--s-2);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
}

.lcd__text {
  margin-top: var(--s-1);
  color: var(--lcd-dim);
}

.lcd__foot {
  margin-top: var(--s-3);
}

.lcd__btn {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  padding: 0 var(--s-3);
  color: var(--lcd-bg);
  background: var(--lcd);
  font-weight: 600;
  font-size: var(--t-data);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: none;
}

/* footer */

.foot {
  padding: var(--s-5) var(--gutter) var(--s-6);
  background: #0B0A09;
  font-size: .875rem;
  color: var(--label-muted);
}

.foot__plate {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--s-2) var(--s-5);
  margin: 0;
}

.foot__plate dt {
  font-family: var(--f-mono);
  font-size: var(--t-osd);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.foot__plate dd {
  margin: 0;
  color: var(--label);
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s-5);
  margin: var(--s-4) 0 0;
  padding: 0;
  list-style: none;
}

.foot__links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--label);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.foot__alerts {
  margin-top: var(--s-3);
  color: var(--label);
}

.foot__alertsbtn {
  min-height: var(--hit);
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--label);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.foot__copy {
  margin-top: var(--s-3);
  font-family: var(--f-mono);
  font-size: var(--t-osd);
}

/* drawers */

.drawer {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, 34rem);
  max-width: none;
  max-height: 94svh;
  margin: 0 auto;
  padding: 0;
  color: var(--label);
  background: transparent;
  border: 0;
  overflow: visible;
}

.drawer::backdrop {
  background: rgba(5, 4, 3, .6);
}

.drawer[open] .drawer__in {
  animation: drawer-in .38s var(--ease) both;
}

.drawer[data-closing] .drawer__in {
  animation: drawer-out .2s ease-in both;
}

@keyframes drawer-in {
  from {
    transform: translateY(104%);
  }
}

@keyframes drawer-out {
  to {
    transform: translateY(104%);
  }
}

.drawer__in {
  display: flex;
  flex-direction: column;
  max-height: 94svh;
  filter: drop-shadow(0 -10px 30px rgba(0, 0, 0, .6));
}

.drawer__tray {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  min-height: 0;
  overflow-y: auto;
  padding: var(--s-5) var(--s-5) var(--s-4);
  background:
    radial-gradient(circle, rgba(255, 255, 255, .035) 1px, transparent 1.5px) 0 0 / 6px 6px,
    linear-gradient(to bottom, #121110, #1D1B18);
  border-radius: 12px 12px 0 0;
  box-shadow:
    inset 0 14px 18px -10px rgba(0, 0, 0, .9),
    inset 10px 0 14px -10px rgba(0, 0, 0, .7),
    inset -10px 0 14px -10px rgba(0, 0, 0, .7),
    0 0 0 6px #2E2B27;
}

.drawer__front {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3.5rem;
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: content-box;
  background:
    var(--brushed),
    linear-gradient(to bottom, #55524B, #3B3833 40%, #2A2824);
  border-top: 1px solid #6A665E;
  box-shadow: 0 0 0 6px #2E2B27;
}

.drawer__handle {
  width: 7.5rem;
  height: 1rem;
  border-radius: .5rem;
  background: linear-gradient(to bottom, #141312, #2A2824);
  box-shadow: inset 0 3px 4px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .15);
}

.drawer__dymo {
  position: absolute;
  left: var(--s-4);
  top: 50%;
  transform: translateY(-50%) rotate(-1.5deg);
}

.plateout {
  position: relative;
  padding: var(--s-3) var(--s-5);
  color: #24211C;
  background:
    var(--screws),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .12) 0 1px, transparent 1px 3px),
    linear-gradient(to bottom, #DAD5CB, #A9A398);
  border-radius: 4px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .6);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
}

.plateout__label {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5B564C;
}

.plateout__name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.plateout__handle {
  margin-top: .2rem;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-data);
  color: #4A463E;
}

.drawer__voice {
  color: var(--label);
}

.drawer__note {
  font-family: var(--f-mono);
  font-size: var(--t-osd);
  line-height: 1.4;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--label-muted);
}

/* site alerts drawer: what the alerts are, before the browser asks */

.drawer__list {
  display: grid;
  gap: var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--label);
}

.drawer__list li {
  position: relative;
  padding-left: 1.1rem;
  line-height: 1.35;
  text-wrap: pretty;
}

.drawer__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .5em;
  width: .45rem;
  height: .45rem;
  background: var(--accent);
  border-radius: 1px;
}

.pg-alerts .plateout__name {
  font-size: clamp(1.5rem, 7vw, 2rem);
  text-wrap: balance;
}

.drawer__keys {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-1);
}

.drawer__keys--end {
  justify-content: flex-end;
}

.rocker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 3.25rem;
  padding: 0 var(--s-5);
  color: var(--on-accent);
  background: linear-gradient(to bottom, #F0BC45, var(--accent));
  border: 0;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 0 #8A6214, 0 6px 12px rgba(0, 0, 0, .45);
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.rocker .ic {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2.5;
}

.rocker:active {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #8A6214, 0 2px 4px rgba(0, 0, 0, .45);
}

.remote {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--s-5);
}

.remote__art {
  width: 4.75rem;
  height: auto;
  transform: rotate(-9deg);
  filter: drop-shadow(4px 8px 8px rgba(0, 0, 0, .7));
}

.remote__kicker {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
}

.remote__h {
  margin-top: .2rem;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.remote__voice {
  margin-top: var(--s-2);
}

.pair {
  display: none;
  margin: var(--s-3) 0 0;
  font-size: .9375rem;
  line-height: 1.4;
}

ol.pair {
  padding-left: 1.25rem;
}

[data-pair="prompt"] .pair--prompt,
[data-pair="ios"] .pair--ios,
[data-pair="manual"] .pair--manual,
[data-pair="done"] .pair--done {
  display: block;
}

.remote__p {
  margin-top: var(--s-2);
  font-size: .9375rem;
  line-height: 1.4;
  color: var(--label-muted);
}

.pair--done {
  font-family: var(--f-mono);
  font-weight: 600;
  color: var(--green);
}

.pair__lamp {
  display: inline-block;
  width: .55rem;
  height: .55rem;
  margin-right: .45rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

/* rejected footage: a pretend QR scanner reads the code for the visitor */

.scanner {
  display: grid;
  justify-items: center;
  gap: var(--s-3);
  text-align: center;
}

.scanner__bar {
  justify-self: stretch;
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: var(--t-osd);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--label-muted);
}

.scanner__cam {
  color: #FF6A5C;
}

.scanner__view {
  --c: var(--accent);
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: min(15rem, 38svh);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .04) 1px, transparent 1.5px) 0 0 / 4px 4px,
    radial-gradient(ellipse at 50% 40%, #3A3732, #141311 75%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 0 30px rgba(0, 0, 0, .8);
}

.scanner__card {
  position: relative;
  display: block;
  width: 58%;
  padding: 4%;
  background: #E9E4D8;
  border-radius: 2px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .6);
  transform: rotate(3.5deg) scale(.94);
  filter: blur(1.2px) brightness(.8) sepia(.2);
  transition: filter .35s, transform .35s var(--ease);
}

.scanner__qr {
  display: block;
  width: 100%;
  height: auto;
}

.scanner__tape {
  position: absolute;
  left: -9%;
  right: -9%;
  top: 41%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 13%;
  background: rgba(242, 201, 76, .7);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .45s var(--ease), opacity .3s .12s;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: .75rem;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #6A4E0E;
  transform: rotate(-9deg);
}

.scanner__frame {
  position: absolute;
  inset: 13%;
  background:
    linear-gradient(var(--c), var(--c)) left top / 1.5rem 3px,
    linear-gradient(var(--c), var(--c)) left top / 3px 1.5rem,
    linear-gradient(var(--c), var(--c)) right top / 1.5rem 3px,
    linear-gradient(var(--c), var(--c)) right top / 3px 1.5rem,
    linear-gradient(var(--c), var(--c)) left bottom / 1.5rem 3px,
    linear-gradient(var(--c), var(--c)) left bottom / 3px 1.5rem,
    linear-gradient(var(--c), var(--c)) right bottom / 1.5rem 3px,
    linear-gradient(var(--c), var(--c)) right bottom / 3px 1.5rem;
  background-repeat: no-repeat;
  transition: inset .3s var(--ease);
}

.scanner__line {
  position: absolute;
  left: 15%;
  right: 15%;
  top: 16%;
  height: 2px;
  background: var(--green);
  box-shadow: 0 0 10px 1px var(--green);
  animation: scan-sweep 1.1s ease-in-out infinite alternate;
}

@keyframes scan-sweep {
  to {
    top: 84%;
  }
}

.scanner__h {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.scanner__url {
  padding: .4rem .9rem;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: .9375rem;
  color: var(--label);
  background: rgba(255, 255, 255, .08);
  border-radius: 999px;
}

[data-scan-state="scan"] .scanner__url,
[data-scan-state="scan"] [data-scan-go] {
  visibility: hidden;
}

[data-scan-state="found"] .scanner__view {
  --c: var(--green);
}

[data-scan-state="found"] .scanner__frame {
  inset: 8%;
}

[data-scan-state="found"] .scanner__card {
  transform: rotate(3.5deg);
  filter: brightness(.95) sepia(.1);
}

[data-scan-state="found"] .scanner__line {
  display: none;
}

/* tape mode: the tape zone zoomed to the whole screen while it plays */

.zoom-exit {
  position: fixed;
  z-index: 70;
  top: max(.75rem, env(safe-area-inset-top));
  right: max(.75rem, env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--hit);
  padding: 0 var(--s-4);
  color: var(--on-accent);
  background: linear-gradient(to bottom, #F0BC45, var(--accent));
  border: 0;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 0 #8A6214, 0 6px 16px rgba(0, 0, 0, .6);
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
}

.zoom-exit .ic {
  width: 1.125rem;
  height: 1.125rem;
  stroke-width: 2.5;
}

[data-zoom] body {
  overflow: hidden;
}

[data-zoom] .plate,
[data-zoom] .foot,
[data-zoom] .keys,
[data-zoom] .col--left,
[data-zoom] .col--right {
  display: none !important;
}

[data-zoom] .wall {
  --zpad: 1rem;
  --zh: calc(100vh - 2 * var(--zpad));
  --zh: calc(100svh - 2 * var(--zpad));
  --zm-w: calc((var(--zh) - 2 * var(--b) - var(--mon-top)) * 9 / 16 + 2 * var(--b));
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: var(--zm-w) minmax(15rem, 19rem);
  grid-template-rows: var(--zh);
  justify-content: center;
  align-content: center;
  gap: var(--gap);
  max-width: none;
  margin: 0;
  padding: var(--zpad);
  background:
    radial-gradient(ellipse at 50% 42%, #221E19, #080706 72%),
    #080706;
}

[data-zoom] .col--main {
  grid-column: 1;
  grid-row: 1;
  display: flex;
}

[data-zoom] .col--deck {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-height: 0;
}

[data-zoom] .unit--main .monitor__screen {
  width: 100%;
}

[data-zoom] .tix {
  flex: 1 1 auto;
  min-height: 0;
}

[data-zoom] .tix .green {
  height: 100%;
  overflow-y: auto;
}

@media (max-width: 63.99em), (orientation: portrait) {
  [data-zoom] .wall {
    --zpad: .5rem;
    --zdvr: 11.25rem;
    --zh: calc(100vh - var(--zdvr) - var(--gap) - 2 * var(--zpad));
    --zh: calc(100svh - var(--zdvr) - var(--gap) - 2 * var(--zpad));
    --zm-w: min(calc(100vw - 2 * var(--zpad)), calc((var(--zh) - 2 * var(--b) - var(--mon-top)) * 9 / 16 + 2 * var(--b)));
    grid-template-columns: var(--zm-w);
    grid-template-rows: auto auto;
    padding-top: max(var(--zpad), env(safe-area-inset-top));
    padding-bottom: max(var(--zpad), env(safe-area-inset-bottom));
  }

  [data-zoom] .col--main,
  [data-zoom] .col--deck {
    display: contents;
  }

  [data-zoom] .unit--main,
  [data-zoom] .dvr {
    grid-column: 1;
  }

  [data-zoom] .tix,
  [data-zoom] .next,
  [data-zoom] .monitor__mode {
    display: none;
  }

  [data-zoom] .zoom-exit span {
    font-size: .875rem;
  }
}

[data-zoom] .wall {
  animation: zoom-room .45s ease-out both;
}

@keyframes zoom-room {
  from {
    background-color: transparent;
  }
}

/* wall power: boot and standby */

[data-power] .scr {
  will-change: clip-path, filter;
}

[data-power="boot"] .scr {
  animation: crt-on .6s var(--ease) calc(var(--i, 0) * 70ms) both;
}

[data-power="off"] .scr {
  animation: crt-off .45s ease-in calc(var(--i, 0) * 40ms) both;
}

[data-i="0"] { --i: 0; }
[data-i="1"] { --i: 1; }
[data-i="2"] { --i: 2; }
[data-i="3"] { --i: 3; }
[data-i="4"] { --i: 4; }
[data-i="5"] { --i: 5; }
[data-i="6"] { --i: 6; }
[data-i="7"] { --i: 7; }
[data-i="8"] { --i: 8; }
[data-i="9"] { --i: 9; }

.sw[data-feed="youtube"] { --lamp: #FF4A3D; }
.sw[data-feed="tiktok"] { --lamp: #3EE8E0; }
.sw[data-feed="instagram"] { --lamp: #F25AA0; }
.sw[data-feed="telegram"] { --lamp: #3DB2F0; }
.sw[data-feed="x"] { --lamp: #EDE9E1; }
.sw[data-feed="threads"] { --lamp: #C9C4BA; }
.sw[data-feed="patreon"] { --lamp: #F5B82E; }

@keyframes crt-on {
  0% {
    clip-path: inset(50% 0 50% 0);
    filter: brightness(3);
  }

  35% {
    clip-path: inset(49% 0 49% 0);
    filter: brightness(3);
  }

  75% {
    clip-path: inset(0);
    filter: brightness(1.5);
  }

  100% {
    clip-path: inset(0);
    filter: none;
  }
}

@keyframes crt-off {
  0% {
    clip-path: inset(0);
    filter: none;
  }

  45% {
    clip-path: inset(49% 0 49% 0);
    filter: brightness(3);
  }

  80% {
    clip-path: inset(49.5% 47% 49.5% 47%);
    filter: brightness(3);
  }

  100% {
    clip-path: inset(50% 50% 50% 50%);
    filter: brightness(0);
  }
}

[data-power="off"] .plate__time,
[data-power="off"] .seg__val,
[data-power="off"] .sw.is-on .sw__lamp {
  opacity: .25;
  transition: opacity .4s;
}

/* layouts */

@media (max-width: 29.99em) {
  [data-shift="on"] .lamp:not(.lamp--on),
  [data-shift="off"] .lamp:not(.lamp--off),
  [data-shift="weekend"] .lamp:not(.lamp--weekend) {
    gap: 0;
    font-size: 0;
  }

  .plate__label {
    display: none;
  }

  .key--full [data-fs-label] {
    display: none;
  }

  .key--full {
    width: 2.25rem;
    padding: 0;
  }

  .feeds__row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: var(--s-2);
  }

  .remote {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: var(--s-3);
  }

  .remote__art {
    position: absolute;
    right: var(--s-4);
    top: var(--s-4);
    width: 3.25rem;
  }

  .remote__body {
    padding-right: 3.5rem;
  }
}

/* narrow phones: the short label leaves the six tubes their room */
@media (max-width: 22.49em) {
  .next__long {
    display: none;
  }

  .next__short {
    display: inline;
  }
}

@media (max-width: 63.99em), (orientation: portrait) {
  .plate {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand ai ai"
      "lamps full clock";
    align-items: center;
  }

  .key--full {
    grid-area: full;
    justify-self: end;
  }

  .plate__brand {
    grid-area: brand;
  }

  .ai {
    grid-area: ai;
    justify-self: end;
  }

  .lamps {
    grid-area: lamps;
    gap: var(--s-2);
  }

  .plate__clock {
    grid-area: clock;
    justify-self: end;
  }

  .wall {
    padding-bottom: 0;
  }

}

@media (min-width: 37.5em) and (max-width: 63.99em) and (orientation: landscape) {
  .wall {
    width: 100%;
    max-width: 44rem;
    margin-inline: auto;
  }

  .bank__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .side {
    grid-template-columns: 1fr 1fr;
  }

  .tix {
    grid-column: 1 / -1;
  }
}

@media (min-width: 37.5em) and (orientation: portrait) and (max-width: 47.99em) {
  .bank__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .side {
    grid-template-columns: 1fr 1fr;
  }

  .tix {
    grid-column: 1 / -1;
  }
}

/* portrait, tablet and up: main monitor first, off-site things beside it */
@media (min-width: 48em) and (orientation: portrait) {
  .wall {
    --pm-h: min(62vh, 70rem);
    --pm-h: min(62svh, 70rem);
    --pm-w: calc((var(--pm-h) - 2 * var(--b) - var(--mon-top)) * 9 / 16 + 2 * var(--b));
    display: grid;
    grid-template-columns: var(--pm-w) minmax(0, 1fr);
    grid-template-areas:
      "main feeds"
      "main ."
      "dvr next"
      "bank bank"
      "order crew"
      "tix tix"
      "ptz ptz"
      "dm dm"
      "keys keys";
    align-items: start;
    padding-inline: var(--s-5);
  }

  .unit--main { grid-area: main; }
  .dvr { grid-area: dvr; }
  .next { grid-area: next; align-self: stretch; }
  .feeds { grid-area: feeds; }
  .dm { grid-area: dm; }
  .bank { grid-area: bank; }
  .side { display: contents; }
  .order { grid-area: order; height: 100%; }
  .tix { grid-area: tix; }
  .crew { grid-area: crew; height: 100%; }
  .ptz { grid-area: ptz; }
  .keys { grid-area: keys; }

  .unit--main .monitor__screen {
    width: 100%;
  }

  .next__body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "tubes";
    justify-items: center;
    text-align: center;
  }

  .next .nixie__tubes {
    justify-content: center;
    width: 100%;
  }

  .feeds__row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: var(--s-2);
  }

  .bank__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ptz {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (min-width: 64em) and (orientation: portrait) {
  .feeds__row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .wall {
    --pm-h: min(58vh, 70rem);
    --pm-h: min(58svh, 70rem);
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    grid-template-areas:
      "main feeds"
      "main tix"
      "main order"
      "main crew"
      "main ."
      "dvr next"
      "bank bank"
      "ptz ptz"
      "dm dm"
      "keys keys";
  }

  .tix {
    align-self: start;
  }
}

/* desktop: one wall in working zones – cams and what leaves the site | the tape | the office */
@media (min-width: 64em) and (orientation: landscape) {
  html {
    scroll-padding-top: calc(var(--plate-h) + 3px);
  }

  .plate {
    position: sticky;
    top: 0;
    flex-wrap: nowrap;
    padding-inline: var(--s-5);
  }

  /* keys right after the name, then on the right the AI chip, the lamps and the clock in one row;
     the name block has one width on every page, so the keys never move */
  .plate__brand {
    flex: 0 0 14rem;
  }

  .plate__status {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    margin-left: auto;
  }

  .wall {
    --pad: var(--s-5);
    --wall-h: max(40.5rem, calc(100vh - var(--plate-h) - 3px - 2 * var(--gap)));
    --wall-h: max(40.5rem, calc(100svh - var(--plate-h) - 3px - 2 * var(--gap)));
    --main-w: calc((var(--wall-h) - 2 * var(--b) - var(--mon-top)) * 9 / 16 + 2 * var(--b));
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--main-w) minmax(15rem, 17.5rem);
    grid-template-rows: var(--wall-h) auto;
    gap: var(--gap);
    padding: var(--gap) var(--pad);
  }

  .col {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    min-width: 0;
    min-height: 0;
  }

  .col > * {
    order: 0;
  }

  .col--left {
    grid-column: 1;
    grid-row: 1;
  }

  .col--left .bank {
    flex: 1 1 auto;
    min-height: 0;
  }

  .col--left .bank__grid {
    flex: 1 1 auto;
    grid-template-rows: repeat(2, minmax(7rem, 1fr));
  }

  .col--left .cam {
    height: 100%;
    aspect-ratio: auto;
  }

  .col--main {
    grid-column: 2;
    grid-row: 1;
  }

  .col--deck {
    grid-column: 3;
    grid-row: 1;
  }

  .col--right {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .unit--main .monitor__screen {
    width: 100%;
  }

  .bank {
    gap: var(--s-1);
  }

  .bank__h {
    position: absolute;
    left: -9999px;
  }

  .tix {
    flex: 1 1 auto;
    min-height: 9rem;
  }

  .tix .green {
    height: 100%;
    overflow-y: auto;
  }

  .next__body {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "head tubes";
    gap: .35rem .6rem;
    padding: var(--s-3);
  }

  .next__head {
    max-width: 3.5rem;
  }

  .next .nixie__tubes {
    justify-content: flex-end;
  }

  .next__long {
    display: none;
  }

  .next__short {
    display: inline;
  }

  .tube {
    flex-basis: 1.9rem;
  }

  .feeds {
    gap: .35rem;
    padding-block: var(--s-2);
  }

  .feeds__voice {
    font-size: .8125rem;
  }

  .sw {
    gap: .2rem;
    padding-block: .2rem;
  }

  .sw__base {
    width: 2rem;
    height: 2rem;
  }

  .sw__lever {
    height: 1.35rem;
  }

  .sw__name {
    margin-top: .5rem;
  }

  .dvr {
    gap: .35rem;
    padding: .4rem;
  }

  .dvr .key {
    min-width: 2.5rem;
    height: 2.5rem;
  }

  .dvr .key--remote,
  .dvr .key--auto {
    height: 1.75rem;
  }

  .axis {
    min-height: 2.5rem;
  }

  .axis__track {
    height: 2.125rem;
  }

  .ptz {
    padding-block: var(--s-2);
  }

  .stick {
    width: 5rem;
    height: 5rem;
  }

  .keys--dock {
    display: none;
  }

  .plate .keys--plate {
    position: static;
    order: 0;
    display: grid;
    grid-template-columns: repeat(5, 3.5rem);
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
  }

  .keys--plate .navkey {
    min-height: 2.75rem;
    gap: .15rem;
    padding: .2rem 0;
    font-size: .625rem;
  }

  .keys--plate .navkey .ic {
    width: 1.0625rem;
    height: 1.0625rem;
  }

  .keys--plate .navkey--crew {
    --crew-ic: 1.0625rem;
  }

  .foot {
    padding-inline: var(--s-5);
  }
}

@container feeds (max-width: 21rem) {
  .feeds__row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: var(--s-2);
  }
}

/* wide desktops: the office gets its own column on the right */
@media (min-width: 85em) and (orientation: landscape) {
  .wall {
    grid-template-columns: minmax(0, 1fr) var(--main-w) minmax(16.5rem, 19rem) minmax(0, 1fr);
    grid-template-rows: var(--wall-h);
  }

  .col--right {
    grid-column: 4;
    grid-row: 1;
    display: flex;
    align-items: stretch;
  }

  .col--right .dm {
    flex: 1 1 auto;
    min-height: 12rem;
  }

  .unit--dm {
    height: 100%;
  }

  .dmscreen {
    min-height: 0;
    container-type: size;
  }
}

@media (min-width: 64em) and (max-width: 84.99em) and (orientation: landscape) {
  [data-shift="on"] .lamp:not(.lamp--on),
  [data-shift="off"] .lamp:not(.lamp--off),
  [data-shift="weekend"] .lamp:not(.lamp--weekend) {
    gap: 0;
    font-size: 0;
  }

  .plate__label {
    display: none;
  }

  .key--full [data-fs-label] {
    display: none;
  }

  .key--full {
    width: 2.25rem;
    padding: 0;
  }

  .plate__brand {
    flex-basis: 8.5rem;
  }

  .plate__pre {
    display: none;
  }

  .plate__sub {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tube {
    flex-basis: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-power="off"] .scr {
    filter: brightness(0);
  }
}
