/* Beam media showcase. The visual system of Beam's redesign prototypes in
   the Rooms tint: a plum night ramp, rose light, Beam green for the main
   action and for what is live. No radius, no shadow, hairlines from the
   night ramp, mono labels. Fonts are self-hosted (SIL OFL 1.1, licences in
   /assets/fonts/). */
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/assets/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --n0: #07030a;
  --n1: #0a040e;
  --n2: #130818;
  --n3: #1e0c25;
  --n4: #2a1030;
  --n5: #3a1640;
  --n6: #5a2450;
  --n7: #8a3a6e;
  --l1: #fcf0f3;
  --l2: #f8dfe6;
  --l3: #efc2d0;
  --l4: #d98aa6;
  --on-night: #fff0f4;
  --on-night-2: #d9b3c4;
  --on-night-3: #a07a90;
  --ink: #1a0a14;
  --accent: #ff7a9c;
  --beam: #04f7a4;
  --beam-hover: #5dfbc4;
  --danger: #ff6b6b;
  --danger-hover: #ff9090;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-text: Inter, system-ui, sans-serif;
  --font-code: "JetBrains Mono", ui-monospace, monospace;

  /* one grid for every page: the rail head and the top bar share a line,
     the rail foot and the control dock share another */
  --rail-w: 248px;
  --side-w: 272px;
  --bar-h: 56px;
  --dock-h: 72px;
  --gap: 8px;
  --pad: 24px;
}
@media (max-width: 767px) {
  :root {
    --pad: 16px;
    --dock-h: 64px;
  }
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
}
body {
  background: var(--n1);
  color: var(--on-night);
  font: 400 15px/24px var(--font-text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button,
input {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  z-index: 50;
  left: 8px;
  top: -48px;
  padding: 8px 12px;
  background: var(--beam);
  color: var(--ink);
  font-weight: 500;
}
.skip-link:focus {
  top: 8px;
}
.icon {
  display: block;
  flex: none;
  width: 20px;
  height: 20px;
}
.mono,
.kick,
.tag {
  font-family: var(--font-code);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  background: var(--beam);
  color: var(--ink);
  font: 500 16px/24px var(--font-text);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.12s cubic-bezier(0.37, 0, 0.63, 1);
}
.btn:hover {
  background: var(--beam-hover);
}
.btn-ghost {
  background: var(--n4);
  color: var(--on-night);
}
.btn-ghost:hover {
  background: var(--n5);
}
.btn:disabled,
.ctl:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--on-night-2);
  cursor: pointer;
}
.icon-button:hover,
.icon-button[aria-expanded="true"] {
  background: var(--n4);
  color: var(--on-night);
}

/* ---------- shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) auto;
  height: 100vh;
  height: 100dvh;
}

.rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--n0);
  border-right: 1px solid var(--n4);
}
.rail-head {
  display: flex;
  flex: none;
  align-items: center;
  height: var(--bar-h);
  padding: 0 16px;
  border-bottom: 1px solid var(--n4);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-night);
  text-decoration: none;
}
.logo-mark {
  width: 24px;
  height: 24px;
}
.logo-word {
  font: 500 22px/1 var(--font-display);
  letter-spacing: -0.03em;
}
.logo-tag {
  align-self: flex-end;
  margin-left: -4px;
  padding-bottom: 1px;
  font: 500 12px/1 var(--font-code);
  color: var(--accent);
}
.space {
  flex: none;
  padding: 16px;
  border-bottom: 1px solid var(--n4);
}
.space-name {
  font: 500 18px/24px var(--font-display);
  letter-spacing: -0.01em;
}
.space-meta {
  margin-top: 2px;
  font: 400 12px/16px var(--font-code);
  color: var(--on-night-3);
}
.channels {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 8px 16px;
}
.rail-cap {
  margin: 16px 8px 4px;
  font: 400 11px/16px var(--font-code);
  letter-spacing: 0.04em;
  color: var(--on-night-3);
}
.channel {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 8px;
  color: var(--on-night-2);
  text-decoration: none;
}
.channel .icon {
  width: 18px;
  height: 18px;
  color: var(--on-night-3);
}
.channel:hover {
  background: var(--n3);
  color: var(--on-night);
}
.channel[aria-current="page"] {
  background: var(--n4);
  color: var(--on-night);
  box-shadow: inset 2px 0 0 var(--accent);
}
.channel[aria-current="page"] .icon {
  color: var(--accent);
}
.ch-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ch-status {
  font: 400 11px/16px var(--font-code);
  color: var(--on-night-3);
}
.ch-status.is-count {
  color: var(--on-night);
}
.ch-status.is-count::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  vertical-align: 1px;
  background: var(--beam);
}
.ch-status.is-live,
.badge-live {
  padding: 0 5px;
  background: var(--accent);
  color: var(--ink);
  font: 500 11px/16px var(--font-code);
  letter-spacing: 0.04em;
}
.rail-foot {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  height: var(--dock-h);
  padding: 0 16px;
  border-top: 1px solid var(--n4);
  font: 400 11px/16px var(--font-code);
  color: var(--on-night-3);
}
.env {
  max-width: 100%;
  padding: 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--l2);
  color: var(--ink);
  font: 500 11px/16px var(--font-code);
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.topbar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 16px;
  height: var(--bar-h);
  padding: 0 12px 0 var(--pad);
  border-bottom: 1px solid var(--n4);
}
.menu-button {
  display: none;
  margin-left: -8px;
}
.title {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}
.title .icon {
  color: var(--accent);
}
.title h1 {
  font: 500 18px/24px var(--font-display);
  letter-spacing: -0.01em;
}
.meta-tags {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 8px;
  overflow: hidden;
}
.meta-tags li {
  flex: none;
  padding: 0 6px;
  box-shadow: inset 0 0 0 1px var(--n5);
  font: 400 11px/20px var(--font-code);
  color: var(--on-night-2);
  white-space: nowrap;
}
.topbar-end {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.stat {
  font: 400 12px/16px var(--font-code);
  color: var(--on-night-2);
  white-space: nowrap;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  background: var(--n3);
  font: 400 12px/16px var(--font-code);
  color: var(--on-night-2);
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--on-night-3);
}
.status.connected {
  color: var(--on-night);
}
.status.connected::before {
  background: var(--beam);
}

.notice {
  flex: none;
  padding: 10px var(--pad);
  background: var(--n3);
  border-bottom: 1px solid var(--accent);
  color: var(--on-night);
}

.content {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  container-type: size;
}
.content.is-scroll {
  container-type: normal;
}

.dock {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: var(--gap);
  height: var(--dock-h);
  padding: 0 var(--pad);
  border-top: 1px solid var(--n4);
  background: var(--n0);
}
.dock-group {
  display: flex;
  align-items: center;
  gap: var(--gap);
}
.dock-sep {
  width: 1px;
  height: 32px;
  margin: 0 8px;
  background: var(--n4);
}
.ctl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 16px;
  border: 0;
  background: var(--n4);
  color: var(--on-night);
  font: 500 14px/20px var(--font-text);
  white-space: nowrap;
  cursor: pointer;
}
.ctl:hover:not(:disabled) {
  background: var(--n5);
}
.ctl[aria-pressed="true"] {
  background: var(--l2);
  color: var(--ink);
}
.ctl[aria-pressed="true"]:hover:not(:disabled) {
  background: var(--l3);
}
.ctl-sm {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
}
.ctl-sm .icon {
  width: 16px;
  height: 16px;
}
.ctl-primary {
  background: var(--beam);
  color: var(--ink);
}
.ctl-primary:hover:not(:disabled) {
  background: var(--beam-hover);
}
.ctl-leave {
  background: var(--danger);
  color: var(--ink);
}
.ctl-leave:hover:not(:disabled) {
  background: var(--danger-hover);
}
.dock input {
  width: 180px;
  height: 48px;
  padding: 0 12px;
  border: 0;
  background: var(--n2);
  box-shadow: inset 0 0 0 1px var(--n5);
  font: 400 14px/20px var(--font-code);
}
.dock-hint {
  font: 400 12px/16px var(--font-code);
  color: var(--on-night-3);
}

.side {
  display: none;
  flex-direction: column;
  width: var(--side-w);
  min-height: 0;
  background: var(--n0);
  border-left: 1px solid var(--n4);
}
.side-open .side {
  display: flex;
}
.side-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: var(--bar-h);
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--n4);
}
.side-head h2,
.side-cap {
  font: 400 12px/16px var(--font-code);
  letter-spacing: 0.04em;
  color: var(--on-night-3);
}
.side-head h2 b {
  margin-left: 6px;
  font-weight: 400;
  color: var(--on-night);
}
.side-close {
  display: none;
}
.side-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.side-section {
  padding: 16px;
  border-bottom: 1px solid var(--n4);
}
.side-section:last-child {
  border-bottom: 0;
}
.side-cap {
  margin-bottom: 8px;
}
.members .member {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
}
.member-avatar {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  box-shadow: 0 0 0 1px var(--n4);
}
.member.is-speaking .member-avatar {
  box-shadow: 0 0 0 2px var(--beam);
}
.member-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-tag {
  font: 400 11px/16px var(--font-code);
  color: var(--on-night-3);
}
.member-muted {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.side-empty,
.events-hint {
  font-size: 13px;
  line-height: 20px;
  color: var(--on-night-3);
}
.events li {
  padding: 6px 0;
  border-top: 1px solid var(--n3);
  font: 400 12px/16px var(--font-code);
  color: var(--on-night-2);
  overflow-wrap: anywhere;
}
.events li:first-child {
  border-top: 0;
  padding-top: 0;
}
.events li.events-hint {
  font-family: var(--font-text);
}
.facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 16px;
  margin: 0;
  font-size: 13px;
  line-height: 20px;
}
.facts dt {
  font: 400 12px/20px var(--font-code);
  color: var(--on-night-3);
}
.facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}
.big-number {
  font: 500 32px/40px var(--font-display);
  letter-spacing: -0.02em;
}

.scrim {
  display: none;
}

/* ---------- skies ---------- */
.sky-host {
  position: relative;
  overflow: hidden;
  background: var(--n1);
}
.sky {
  position: absolute;
  top: 0;
  left: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.tags {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.tag {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0 5px;
  background: var(--l2);
  color: var(--ink);
  font: 500 11px/16px var(--font-code);
  white-space: nowrap;
  visibility: hidden;
}
.tag.on {
  visibility: visible;
}
.tag.join {
  background: var(--beam);
}

/* ---------- home ---------- */
.hero {
  display: flex;
  flex-direction: column;
  min-height: 560px;
  height: calc(100cqh - 120px);
  border-bottom: 1px solid var(--n4);
  cursor: crosshair;
  user-select: none;
}
.copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  max-width: min(720px, calc(100% - 2 * var(--pad)));
  padding-top: 72px;
  text-align: center;
  pointer-events: none;
}
.copy a,
.copy button,
.copy input,
.copy label {
  pointer-events: auto;
}
.hero h2 {
  font: 500 56px/64px var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.sub {
  max-width: 34em;
  margin: 24px 0 32px;
  color: var(--on-night-2);
  font-size: 18px;
  line-height: 28px;
  text-wrap: balance;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.hero-meta {
  margin-top: 24px;
  font: 400 12px/16px var(--font-code);
  color: var(--on-night-3);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: var(--pad);
  background: var(--n4);
  border: 1px solid var(--n4);
}
.channel-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--n1);
  text-decoration: none;
}
.channel-card:hover {
  background: var(--n2);
}
.channel-card:hover .open {
  color: var(--beam-hover);
}
.channel-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 22px/28px var(--font-display);
  letter-spacing: -0.01em;
}
.channel-card h2 .icon {
  color: var(--accent);
}
.channel-card p {
  flex: 1;
  color: var(--on-night-2);
  font-size: 15px;
  line-height: 24px;
}
.kick {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.card-tags li {
  padding: 0 6px;
  box-shadow: inset 0 0 0 1px var(--n5);
  font: 400 11px/20px var(--font-code);
  color: var(--on-night-2);
}
.open {
  margin-top: 8px;
  font: 400 12px/16px var(--font-code);
  color: var(--beam);
}
.page-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin: 0 var(--pad) var(--pad);
  font: 400 11px/16px var(--font-code);
  color: var(--on-night-3);
}
.page-foot a {
  color: var(--on-night-2);
}

/* ---------- lobby (call, stage) ---------- */
.lobby {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--pad);
}
.lobby-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(440px, 100%);
  padding: 24px;
  background: var(--n2);
  box-shadow: inset 0 0 0 1px var(--n5);
}
.lobby-card h2 {
  font: 500 32px/40px var(--font-display);
  letter-spacing: -0.02em;
}
.lede {
  color: var(--on-night-2);
}
.join-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.join-form label {
  font: 400 12px/16px var(--font-code);
  color: var(--on-night-3);
}
.field-row {
  display: flex;
  gap: var(--gap);
}
.field-row input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: 0;
  background: var(--n1);
  box-shadow: inset 0 0 0 1px var(--n5);
}
.field-row input::placeholder,
.dock input::placeholder {
  color: var(--on-night-3);
}
.lobby-card .btn {
  flex: none;
}
.trust {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--n4);
  font: 400 12px/16px var(--font-code);
  color: var(--on-night-2);
}
.trust .icon {
  width: 16px;
  height: 16px;
}
.badge-e2ee {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 5px;
  background: var(--beam);
  color: var(--ink);
  font: 500 11px/16px var(--font-code);
}
.badge-e2ee .icon {
  width: 12px;
  height: 12px;
}

/* ---------- tiles ---------- */
.room {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: var(--pad);
}
.grid {
  --cols: 1;
  --rows: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
  /* the widest grid whose rows of 16:9 tiles fit the height */
  width: min(
    100%,
    calc(
      (100cqh - 2 * var(--pad) - (var(--rows) - 1) * var(--gap)) / var(--rows) *
        16 / 9 * var(--cols) + (var(--cols) - 1) * var(--gap)
    )
  );
}
.grid[data-count="2"] {
  --cols: 2;
}
.grid[data-count="3"],
.grid[data-count="4"] {
  --cols: 2;
  --rows: 2;
}
.grid[data-count="5"],
.grid[data-count="6"] {
  --cols: 3;
  --rows: 2;
}
.grid[data-count="7"],
.grid[data-count="8"],
.grid[data-count="9"] {
  --cols: 3;
  --rows: 3;
}
@container (max-width: 640px) {
  .grid[data-count] {
    --cols: 1;
    --rows: 1;
    width: 100%;
  }
  .grid:not([data-count="1"]):not([data-count="2"]) {
    --cols: 2;
  }
  .room {
    place-items: start center;
  }
}
.tile {
  position: relative;
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--n2);
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  box-shadow: inset 0 0 0 1px var(--n4);
  pointer-events: none;
}
.tile.is-speaking::after {
  box-shadow: inset 0 0 0 2px var(--beam);
}
.tile.is-dominant::after {
  box-shadow:
    inset 0 0 0 2px var(--beam),
    inset 0 0 0 4px rgb(4 247 164 / 0.25);
}
.tile-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.tile-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.tile.is-self:not(.is-screen) .tile-media video {
  transform: scaleX(-1);
}
.tile.is-screen .tile-media video {
  object-fit: contain;
}
.tile:not(.has-video) .tile-media,
.tile.camera-off:not(.is-screen) .tile-media {
  display: none;
}
.tile-avatar {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.tile-avatar .avatar {
  width: min(96px, 36%);
  height: auto;
  aspect-ratio: 1;
  image-rendering: pixelated;
}
.tile-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  max-width: calc(100% - 52px);
  padding: 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--l2);
  color: var(--ink);
  font: 500 11px/16px var(--font-code);
}
.tile.is-speaking .tile-label {
  background: var(--beam);
}
.tile-flags {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: flex;
  gap: 4px;
}
.flag {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--n0);
  color: var(--accent);
}
.flag .icon {
  width: 16px;
  height: 16px;
}

/* ---------- stage ---------- */
.stage-view {
  position: absolute;
  inset: 0;
}
.stage-view .room {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 0;
}
.stage-view .grid {
  width: min(
    100%,
    calc(
      (72cqh - 2 * var(--pad) - (var(--rows) - 1) * var(--gap)) / var(--rows) *
        16 / 9 * var(--cols) + (var(--cols) - 1) * var(--gap)
    )
  );
  margin-bottom: 12cqh;
}
.empty-state {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 4px;
  padding: var(--pad);
  text-align: center;
  pointer-events: none;
}
.empty-state h2 {
  font: 500 24px/32px var(--font-display);
  letter-spacing: -0.02em;
}
.empty-state p {
  color: var(--on-night-2);
}

/* ---------- live ---------- */
.live {
  display: flex;
  flex-direction: column;
  gap: var(--pad);
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--pad);
}
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 0 1px var(--n4);
}
.player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.player-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: flex;
  gap: 6px;
  pointer-events: none;
}
.player-overlay .chip {
  padding: 0 5px;
  background: var(--n0);
  color: var(--on-night);
  font: 400 11px/16px var(--font-code);
}
.placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
}
.placeholder-text {
  position: relative;
  z-index: 2;
  padding: 0 6px;
  background: var(--l2);
  color: var(--ink);
  font: 500 12px/20px var(--font-code);
}
.stream-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stream-head h2 {
  font: 500 28px/36px var(--font-display);
  letter-spacing: -0.02em;
}
.stream-head p {
  color: var(--on-night-2);
  max-width: 44em;
}
.panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--n4);
  border: 1px solid var(--n4);
}
.panel {
  padding: 20px;
  background: var(--n1);
  min-width: 0;
}
.panel h3 {
  margin-bottom: 12px;
  font: 500 18px/24px var(--font-display);
}
.steps {
  counter-reset: step;
  display: grid;
  gap: 10px;
}
.steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  color: var(--on-night-2);
  font-size: 14px;
  line-height: 22px;
}
.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  font: 400 12px/22px var(--font-code);
  color: var(--accent);
}
.term {
  margin-top: 16px;
  background: var(--n2);
  box-shadow: inset 0 0 0 1px var(--n5);
}
.term-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 32px;
  padding: 0 4px 0 12px;
  border-bottom: 1px solid var(--n4);
  font: 400 11px/16px var(--font-code);
  color: var(--on-night-3);
}
.term-bar button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--on-night-2);
  font: 400 11px/16px var(--font-code);
  cursor: pointer;
}
.term-bar button:hover {
  background: var(--n4);
  color: var(--on-night);
}
.term-bar .icon {
  width: 14px;
  height: 14px;
}
.term pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  font: 400 13px/20px var(--font-code);
  color: var(--on-night);
}
.term .ps {
  color: var(--accent);
}
/* the source ladder's encoder rules (BEAM_MEDIA_BROADCAST_LADDER=source) */
.source-ladder {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-left: 12px;
  border-left: 1px solid var(--accent);
  color: var(--on-night-2);
  font-size: 14px;
  line-height: 22px;
}
.source-ladder[hidden] {
  display: none;
}
.source-ladder .source-cap {
  font: 400 12px/16px var(--font-code);
  letter-spacing: 0.04em;
  color: var(--accent);
}
.source-ladder code,
.source-ladder pre {
  font: 400 12px/18px var(--font-code);
  color: var(--on-night);
}
.source-ladder pre {
  margin: 0;
  padding: 10px 12px;
  overflow-x: auto;
  background: var(--n2);
  box-shadow: inset 0 0 0 1px var(--n5);
}

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
  /* the side panel overlays the page */
  .side {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    max-width: calc(100vw - 48px);
  }
  .side-close {
    display: inline-grid;
  }
  .scrim:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgb(7 3 10 / 0.72);
  }
}
@media (max-width: 1023px) {
  .meta-tags {
    display: none;
  }
  .panels {
    grid-template-columns: minmax(0, 1fr);
  }
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 767px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: min(var(--rail-w), calc(100vw - 48px));
    transform: translateX(-100%);
    visibility: hidden;
  }
  .rail-open .rail {
    transform: none;
    visibility: visible;
  }
  .menu-button {
    display: inline-grid;
  }
  .topbar {
    gap: 8px;
  }
  .topbar .stat {
    display: none;
  }
  .ctl {
    width: 48px;
    padding: 0;
    justify-content: center;
  }
  .ctl .ctl-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .dock {
    gap: 6px;
  }
  .dock-sep {
    margin: 0 2px;
  }
  .dock input {
    width: 0;
    flex: 1;
    min-width: 96px;
  }
  .dock-hint {
    font-size: 11px;
  }
  .hero {
    min-height: 520px;
    height: auto;
  }
  .copy {
    padding-top: 40px;
  }
  .hero h2 {
    font-size: 34px;
    line-height: 40px;
  }
  .sub {
    margin: 16px 0 24px;
    font-size: 16px;
    line-height: 24px;
  }
  .hero .spacer {
    flex: 1 0 260px;
  }
  .btn {
    height: 44px;
    padding: 0 16px;
  }
  .lobby-card {
    padding: 20px;
  }
  .lobby-card h2 {
    font-size: 26px;
    line-height: 32px;
  }
  .field-row {
    flex-direction: column;
  }
  .field-row input {
    flex: none;
  }
  .stream-head h2 {
    font-size: 22px;
    line-height: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}
