:root {
  --night: #0b1230;
  --night-deep: #070b1e;
  --panel: #121b45;
  --panel-edge: #26336a;
  --brass: #d9ad3c;
  --brass-soft: #f3d27a;
  --hunter: #355e3b;
  --hunter-deep: #24402a;
  --paper: #f4f1e8;
  --mist: #a9b3d6;
  --signal: #e0443a;
  --ok: #6ee07a;
  --display: 'Pixelify Sans', 'Pixelify Fallback', 'Courier New', monospace;
  --body: 'Schibsted Grotesk', 'Schibsted Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Until the web fonts arrive (font-display: swap), the text is set in Arial (or its look-alikes), scaled to
   take the same room: in Courier New the header's buttons were 13% wider, wrapped onto another row and
   then jumped back when the pixel face loaded. Sizes measured on the page's own words. */
@font-face {
  font-family: 'Pixelify Fallback';
  font-weight: 400 600;
  src: local('Arial'), local('ArialMT'), local('Arimo'), local('Liberation Sans');
  size-adjust: 108.9%;
  ascent-override: 84.5%;
  descent-override: 25.7%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Pixelify Fallback';
  font-weight: 700;
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Arimo Bold'), local('Liberation Sans Bold');
  size-adjust: 104.1%;
  ascent-override: 88.4%;
  descent-override: 26.9%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Schibsted Fallback';
  font-weight: 400 500;
  src: local('Arial'), local('ArialMT'), local('Arimo'), local('Liberation Sans');
  size-adjust: 103.1%;
  ascent-override: 95.1%;
  descent-override: 25.2%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Schibsted Fallback';
  font-weight: 600 700;
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Arimo Bold'), local('Liberation Sans Bold');
  size-adjust: 100.6%;
  ascent-override: 97.4%;
  descent-override: 25.8%;
  line-gap-override: 0%;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--night);
  background-image: radial-gradient(circle at 20% 0%, #14205a 0%, transparent 55%);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--brass-soft); }
a:hover { color: var(--paper); }

button, select {
  font: inherit;
  color: var(--paper);
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}
button:hover, select:hover { border-color: var(--brass); }
/* the frame picker while a clip records */
button:disabled, select:disabled { opacity: 0.55; cursor: not-allowed; border-color: var(--panel-edge); }
:focus-visible { outline: 2px solid var(--brass-soft); outline-offset: 2px; }

/* read by screen readers, not shown */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- masthead ---------- */

/* the channel name and how many are watching on the left, the follow buttons on the right
   (on a narrow screen the buttons take their own row under the name) */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.5rem;
  padding: 1.25rem clamp(16px, 4vw, 40px) 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.brand { display: grid; gap: 0.45rem; min-width: 0; }
/* the channel page's heading holds the wordmark: no size or margin of its own, so it looks as on the other pages */
.brand-name { display: flex; margin: 0; font-size: 1rem; line-height: 1; }
/* as tall as the watching tag, so the page does not shift when the count arrives */
.brand-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; min-height: 1.6rem; }

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: 0.02em;
  color: var(--brass-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1;
}

.tally {
  width: 0.55em;
  height: 0.55em;
  border-radius: 2px;
  background: #5a1d19;
  box-shadow: inset 0 0 0 2px #2b0e0c;
}
.tally.live { background: var(--signal); box-shadow: 0 0 12px rgba(224, 68, 58, 0.7); animation: tally 2.4s ease-in-out infinite; }
@keyframes tally { 50% { box-shadow: 0 0 4px rgba(224, 68, 58, 0.4); } }

.tagline { margin: 0; color: var(--mist); font-size: 1rem; line-height: 1.3; }

/* "3 watching": a small studio tag, lettered like the rundown's ON AIR tag (the pixel face's small
   digits are hard to tell apart) */
.watching {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.2rem 0.5rem 0.2rem 0.45rem;
  border: 1px solid var(--panel-edge);
  border-radius: 4px;
  background: rgba(6, 10, 28, 0.55);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--mist);
  white-space: nowrap;
}
.watching i { flex: none; width: 6px; height: 6px; border-radius: 1px; background: var(--signal); }
.watching b { font-size: 0.8rem; letter-spacing: 0.02em; color: var(--paper); font-variant-numeric: tabular-nums; }
.watching[hidden] { display: none; }

@media (max-width: 600px) {
  /* a short header, so the picture starts near the top of a phone screen */
  .masthead { gap: 0.6rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .brand { gap: 0.3rem; }
  /* thumb-sized controls under the picture */
  .controls button, .controls select { min-height: 44px; }
  /* Sound, Full screen and Record share one row on a 375 px phone */
  .controls { gap: 0.4rem; }
  .controls button { padding-inline: 0.65rem; }
  /* the sound button sits in a bar of its own under the picture, never over the lower-third caption */
  .screen .sound-gate { position: static; padding: 0.5rem 0.8rem; font-size: 0.95rem; }
  .feeds { margin-left: 0; }
}

/* ---------- layout ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  /* the sources and the support block sit under the picture; the rail runs down the right of all three */
  grid-template-rows: auto auto 1fr;
  gap: clamp(16px, 2.5vw, 32px);
  padding: 0 clamp(16px, 4vw, 40px) 3rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

.monitor { grid-column: 1; grid-row: 1; min-width: 0; }
.rail { grid-column: 2; grid-row: 1 / span 3; }
.sources-block { grid-column: 1; grid-row: 2; }
.support-block { grid-column: 1; grid-row: 3; }

@media (max-width: 960px) {
  /* one column in page order: the picture and captions, the rundown, then the sources */
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .monitor, .rail, .sources-block, .support-block { grid-column: auto; grid-row: auto; }
}

/* ---------- the monitor ---------- */

.bezel {
  background: linear-gradient(180deg, #1c2340, #12172c);
  border-radius: 14px;
  padding: clamp(6px, 1.2vw, 14px);
  box-shadow: 0 0 0 1px #2c3560, 0 20px 50px rgba(0, 0, 0, 0.45);
}

.screen {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(217, 173, 60, 0.35);
  background: var(--night-deep);
}

#studio {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.screen.tall { max-width: 420px; margin: 0 auto; }
.screen.tall #studio { aspect-ratio: 9 / 16; }
/* full screen: fit the whole picture (a vertical frame on a wide monitor was cropped to its top third) */
.screen:fullscreen #studio { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }
.screen:-webkit-full-screen #studio { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }
/* full screen with the sound bar showing: the picture takes what the bar leaves */
.screen:fullscreen { display: flex; flex-direction: column; }
.screen:fullscreen #studio { flex: 1 1 0; min-height: 0; }

.sound-gate {
  /* a bar of its own under the picture (on every screen size): over the picture it covered the
     lower-third caption and the cards */
  display: block;
  width: 100%;
  min-height: 44px;
  background: var(--brass);
  color: var(--night-deep);
  border: 0;
  border-radius: 0;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.6rem 1.2rem;
}
.sound-gate[hidden] { display: none; }
.sound-gate:hover { background: var(--brass-soft); }
/* the usual outline sits outside the button, where the screen's rounded corners clip it, and it is
   brass on brass: a dark ring inside the bar instead */
.sound-gate:focus-visible { outline: 3px solid var(--night-deep); outline-offset: -7px; }

/* ---------- the slate: what this is, until the studio's first frame ---------- */

.screen { container-type: inline-size; }
.slate {
  position: absolute;
  inset: 0 0 auto;
  aspect-ratio: 16 / 9; /* exactly the picture: the sound bar under it stays in view */
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem;
  text-align: center;
  pointer-events: none;
  /* the studio's night blue, lit from the middle, with the monitor's faint scan lines */
  background:
    repeating-linear-gradient(180deg, rgba(169, 179, 214, 0.035) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 45%, #18245c 0%, var(--night-deep) 72%);
}
.screen.tall .slate { aspect-ratio: 9 / 16; }
.slate.off { opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0s linear 0.35s; }
.slate-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  font-size: clamp(1.25rem, 6.2cqw, 3.1rem);
  line-height: 1;
  color: var(--brass-soft);
}
.slate-name i { width: 0.5em; height: 0.5em; border-radius: 2px; background: var(--signal); }
.slate-line { font-size: 1rem; font-size: clamp(0.875rem, 2.4cqw, 1.2rem); line-height: 1.3; color: #dfe3f2; }
.slate-tag {
  margin-top: 0.35rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--panel-edge);
  border-radius: 4px;
  background: rgba(6, 10, 28, 0.6);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
}
/* three dots that fill in turn, like a set warming up (uncovered, never resized: the tag holds still) */
.slate-tag::after { content: '...'; display: inline-block; width: 1em; text-align: left; animation: slate-dots 1.2s steps(4, jump-none) infinite; }
@keyframes slate-dots { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.slate-tag.stopped::after { content: none; }

/* while a clip records: REC and the time so far, over the studio's own LIVE bug in the picture's top-left
   corner, like a camera's viewfinder (the clip is the canvas, so it has the bug and not this). It takes no
   room: as a bar under the picture it pushed everything below it down 44 px when a clip started with the
   sound already on, and back up when it stopped (the automatic stop at three minutes too). In the top-right
   corner it hid the studio clock. */
.rec-badge {
  position: absolute;
  z-index: 2;
  /* the bug is 6 art pixels in from the corner and 12 tall: 1.25% and 2.5% of the picture's width. The
     badge grows with the picture (in full screen too), so it always covers the bug whole */
  top: max(4px, 1.25cqw);
  left: max(4px, 1.25cqw);
  display: flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.25em 0.55em 0.25em 0.45em;
  border-radius: 3px;
  background: #b8332b; /* 5:1 with the paper text (the signal red was 3.7:1) */
  box-shadow: 0 2px 0 rgba(7, 11, 30, 0.7);
  color: var(--paper);
  font-weight: 700;
  font-size: max(0.6875rem, 1.6cqw);
  line-height: 1.2;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.rec-badge::before { content: ''; flex: none; width: 0.6em; height: 0.6em; border-radius: 1px; background: var(--paper); animation: rec-blink 1.2s steps(2, jump-none) infinite; }
@keyframes rec-blink { 50% { opacity: 0.25; } }
.rec-badge[hidden] { display: none; }
/* on a phone's small picture the badge keeps to REC and the time: with the three-minute limit beside it,
   it was two and a half times the bug's width and covered the show's tag or the card's title under it */
@container (max-width: 480px) { .rec-badge .rec-max { display: none; } }

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.layout-pick { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--mist); font-size: 0.9rem; }
/* as tall as the buttons beside it (a select drew 4 px shorter); a phone's 44 px wins */
:where(.layout-pick) select { min-height: 2.5rem; }

#soundBtn { display: inline-flex; align-items: center; gap: 0.45rem; }
#soundBtn .ico { flex: none; color: var(--mist); }
#soundBtn .ico-on, #soundBtn[aria-pressed="true"] .ico-off { display: none; }
#soundBtn[aria-pressed="true"] .ico-on { display: block; color: var(--brass-soft); }
#soundBtn[aria-pressed="true"] { border-color: var(--brass); color: var(--brass-soft); }
#recBtn.on { background: #b8332b; border-color: #b8332b; } /* 5:1 with the paper text, like the bar (the signal red was 3.7:1) */

/* (wrapping: on its own line it is never wider than the picture's column; at 961 to about 1000 px the last
   feed ran on under the rundown) */
.feeds {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin: 0 0 0 auto;
  padding: 0;
  font-size: 0.85rem;
  color: var(--mist);
}
.feeds li { display: inline-flex; align-items: center; gap: 0.35rem; }
.feeds li::before { content: ''; flex: none; box-sizing: border-box; width: 8px; height: 8px; border-radius: 1px; background: var(--ok); }
/* late or missing: an empty amber square, a different shape and not only a different colour (the
   navy dot it used to be was 1.9:1 against the page); the words are in the item for screen readers */
.feeds li:not(.ok)::before { background: none; border: 2px solid var(--brass); }

.caption {
  min-height: 3.2em;
  margin: 0.9rem 0 0;
  font-size: 1.1rem;
  line-height: 1.45;
  max-width: 70ch;
}
.caption b { font-family: var(--display); font-weight: 700; color: var(--brass-soft); margin-right: 0.4rem; }

/* ---------- links out: YouTube, Instagram, TikTok, support, shop (config/show.json "links") ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--paper);
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  /* a hard, one-step drop shadow, like the pixel art */
  box-shadow: 0 3px 0 var(--night-deep);
}
.btn:hover { color: var(--paper); border-color: var(--brass-soft); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--night-deep); }
.btn svg { flex: none; } /* sized in the page at 2 screen pixels per art pixel */
.btn[hidden], .follow[hidden], .money[hidden], .link-row[hidden], .elsewhere[hidden], .about [data-if-link][hidden] { display: none; }

/* where people follow the channel: quiet buttons with our own generic glyphs (never the sites' logos), Subscribe in brass */
.btn-social:hover { background: #18245a; }
.btn-social .glyph { color: var(--brass-soft); }
.btn-sub { color: var(--brass-soft); border-color: var(--brass); }
.btn-sub:hover { color: var(--paper); }
/* the money actions are filled, so they never read as one more social site */
.btn-support { background: var(--brass); border-color: var(--brass); color: var(--night-deep); }
.btn-support:hover { background: var(--brass-soft); border-color: var(--brass-soft); color: var(--night-deep); }
.btn-shop { background: var(--hunter); border-color: #4c7f53; }
.btn-shop:hover { background: var(--hunter-deep); }

.follow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.money { display: flex; gap: 0.5rem; margin-left: 0.35rem; padding-left: 0.85rem; border-left: 1px solid var(--panel-edge); }

@media (min-width: 601px) {
  /* until the config says which links are set (the page script then marks <html> "links-ready"), support
     and shop keep their places unseen: appearing a second after the page, they pushed the header, the
     picture and the sound button down by a row */
  html:not(.links-ready) .masthead .money[hidden] { display: flex; visibility: hidden; }
  html:not(.links-ready) .masthead .money .btn[hidden] { display: inline-flex; }
}

@media (max-width: 960px) {
  /* too narrow for the money actions beside the four social ones (about 820 px together): a row of
     their own, without the divider (which would otherwise start the second row, indented) */
  .money { flex: 1 1 100%; margin: 0; padding: 0; border: 0; }
}

@media (min-width: 961px) {
  /* a laptop: from about 1240 px the buttons sit beside the name, one header row, in the web fonts and
     in the fallbacks alike (under the name they took a second row, and at 1280-1400 px the controls
     under the picture fell below a 768 px fold); narrower, they still fit one row under it. The sites
     keep their names without the glyphs (as on a phone), the buttons sit a little closer, and the name
     is a touch smaller */
  .masthead { column-gap: 1.25rem; }
  .wordmark { font-size: clamp(1.6rem, 2.7vw, 2.15rem); }
  .follow { gap: 0.4rem; }
  .follow .btn { padding-inline: 0.6rem; }
  .follow .btn-social .glyph { display: none; }
  .follow .btn-social[data-link="x"] { min-width: 2.75rem; }
  .money { gap: 0.4rem; margin-left: 0.2rem; padding-left: 0.6rem; }
}

@media (max-width: 600px) {
  /* one row the width of the screen, each button an easy thumb-sized target */
  .follow { width: 100%; gap: 0.4rem; }
  .follow .btn { flex: 1 1 auto; min-height: 44px; padding-inline: 0.45rem; gap: 0.35rem; font-size: 0.875rem; }
  .money { gap: 0.4rem; }
  /* a sixth site does not fit the row on a phone: Twitch is in About this channel instead */
  .follow .btn-social[data-link="twitch"] { display: none; }
}

@media (max-width: 600px) {
  /* Support and Shop have their own block further down the page ("Keep the desk on the air"): on a
     phone the header keeps only the follow buttons, so the picture is not pushed below the fold */
  .masthead .money { display: none; }
}

@media (max-width: 479px) {
  /* a phone: the labels need about 412 px with their glyphs. The glyphs are generic pictures, not
     the sites' logos, so alone they would not say which site is which: the sites keep their
     names (without the glyph), and Subscribe (the one in brass) shares their row */
  .follow { flex-wrap: nowrap; gap: 0.3rem; }
  .follow .btn-social, .follow .btn-sub { flex: 1 1 auto; min-width: 0; padding-inline: 0.25rem; font-size: 0.8125rem; letter-spacing: 0; }
  .follow .btn-social .glyph { display: none; }
  .follow .btn-sub { order: 1; }
  /* "X" is one letter: keep its button a full thumb-sized target */
  .follow .btn-social[data-link="x"] { flex: 0 0 44px; min-width: 44px; }
}

@media (max-width: 359px) {
  /* a small phone: the names no longer fit one row, so Subscribe takes a full row under them */
  .follow { flex-wrap: wrap; }
  .follow .btn-social { flex: 1 1 0; }
  .follow .btn-sub { order: 1; flex: 1 1 100%; font-size: 1rem; }
}

@media (max-width: 374px) {
  /* a small phone: a slightly smaller tagline, so the watching tag still fits beside it */
  .brand-line { column-gap: 0.5rem; }
  .tagline { font-size: 0.9375rem; }
}

.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0.75rem 0 0.25rem; }

.elsewhere { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.9rem 0 0; padding: 0; font-size: 0.95rem; }
.elsewhere::before { content: 'Also on'; color: var(--mist); }
.elsewhere a { overflow-wrap: anywhere; }

.support-block { border-left-color: var(--brass); }
.support-block p { margin: 0; max-width: 62ch; color: #dfe3f2; }
.support-block p + p { margin-top: 8px; }

/* ---------- rail ---------- */

.rail { display: grid; gap: 1rem; }

.block {
  background: rgba(18, 27, 69, 0.75);
  border: 1px solid var(--panel-edge);
  border-left: 3px solid var(--hunter);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}

.block h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: var(--brass-soft);
}

.block h3 { font-size: 0.95rem; margin: 1rem 0 0.35rem; color: var(--mist); font-weight: 600; }

.now-title { font-family: var(--display); font-size: 1.35rem; margin: 0; line-height: 1.2; }
.now-headline { margin: 0.25rem 0 0; color: var(--mist); }

.next { margin: 0; padding-left: 1.2rem; }
.next li { margin: 0.15rem 0; }
.next .when { color: var(--mist); font-size: 0.9rem; }

.sources { margin: 0; padding-left: 1.1rem; }
.sources li { margin: 0.3rem 0; overflow-wrap: anywhere; }
.sources-block .more { width: auto; padding-inline: 1rem; }

.note { margin: 0.75rem 0 0; color: var(--mist); font-size: 0.9rem; }
.about p { margin: 0 0 0.6rem; font-size: 0.95rem; color: #dfe3f2; }
/* what the channel is, in one line, before the fine print */
.about .lede { font-size: 1rem; font-weight: 500; line-height: 1.45; color: var(--paper); }
.muted { color: var(--mist); }

.breaking .now-title { color: #ff8a80; }

/* ---------- on the schedule: the fixed grid, plain and compact ---------- */

.schedule { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.sch { display: grid; gap: 0.05rem; min-width: 0; padding: 0 0.5rem; }
.sch + .sch { border-top: 1px solid rgba(38, 51, 106, 0.6); padding-top: 0.5rem; }
.sch-title { font-family: var(--display); font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
.sch-when { color: #dfe3f2; font-size: 0.9rem; }
.sch-next { color: var(--mist); font-size: 0.85rem; overflow-wrap: anywhere; }

/* ---------- the rundown (like a TV guide for the next hour) ---------- */

.rundown-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.rundown-note { color: var(--mist); font-size: 0.8rem; }

.rundown { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.ri { min-width: 0; }
.ri > .ri-row {
  width: 100%;
  display: grid;
  grid-template-columns: 4.6em minmax(0, 1fr) auto;
  gap: 0.1rem 0.55rem;
  align-items: baseline;
  text-align: left;
  font: inherit;
  color: var(--paper);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
}
.ri button.ri-row { cursor: pointer; }
.ri button.ri-row:hover { border-color: var(--panel-edge); background: rgba(6, 10, 28, 0.5); }
.ri-time { color: var(--mist); font-variant-numeric: tabular-nums; font-size: 0.85rem; white-space: nowrap; }
.ri-title { font-family: var(--display); font-size: 1rem; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.ri-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mist); white-space: nowrap; }
.ri-head { grid-column: 2 / -1; color: var(--mist); font-size: 0.85rem; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.ri-bar { grid-column: 1 / -1; height: 3px; background: #1b2550; border-radius: 2px; overflow: hidden; margin-top: 0.2rem; }
.ri-bar i { display: block; height: 100%; width: 0; background: var(--brass); }

.ri.onair > .ri-row { border-color: var(--brass); background: rgba(217, 173, 60, 0.08); }
.ri.onair .ri-tag { color: #ff8a80; } /* the darker signal red is under 4.5:1 on the panel at this size */
.ri.breaking .ri-title { color: #ff8a80; }
.ri.ready .ri-tag { color: var(--ok); }
.ri.planned .ri-title { color: #cfd5ec; }
.ri.planned .ri-time::before { content: '~'; }
.ri.working .ri-tag { color: var(--brass-soft); }
.ri.replaying > .ri-row { border-color: var(--brass-soft); }
.ri.muted { color: var(--mist); padding: 0.35rem 0.5rem; }
/* before the first schedule: about the height of the list that replaces it (nine rows and the button) */
.ri.loading { min-height: 28rem; }

.more {
  margin-top: 0.5rem;
  width: 100%;
  font-size: 0.9rem;
  color: var(--mist);
}

.earlier { margin-top: 0.75rem; }
.earlier summary { cursor: pointer; color: var(--mist); font-size: 0.9rem; padding: 0.2rem 0; }
.earlier .rundown { margin-top: 0.4rem; }

/* ---------- replays ---------- */

.replay-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.45rem 0.6rem 0.45rem 0.9rem;
  border: 1px solid var(--brass);
  border-radius: 8px;
  background: rgba(217, 173, 60, 0.1);
}
.replay-bar[hidden] { display: none; }
/* a small tag like the rundown's, the show's name, and under it what this one was about */
.replay-what { margin: 0; min-width: 0; line-height: 1.3; }
.replay-tag { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mist); }
.replay-what b { font-family: var(--display); font-weight: 700; color: var(--brass-soft); overflow-wrap: anywhere; }
.replay-head { display: block; margin-top: 0.1rem; font-size: 0.9rem; color: #dfe3f2; overflow-wrap: anywhere; }
.replay-head[hidden] { display: none; }
/* one line, never squeezed by a long name beside it (at 375 px it broke into "Back / to / live") */
#liveBtn { flex: none; white-space: nowrap; background: #b8332b; border-color: #b8332b; font-weight: 700; } /* 5:1 with the paper text */
@media (max-width: 600px) {
  #liveBtn { min-height: 44px; padding-inline: 0.7rem; }
}


/* ---------- skip link and the site footer (on every page) ---------- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  background: var(--brass);
  color: var(--night-deep);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }
main:focus { outline: none; }

.site-footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem clamp(16px, 4vw, 40px) 2rem;
  border-top: 1px solid var(--panel-edge);
  color: var(--mist);
  font-size: 0.9rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0 0 0.6rem; }
/* tall enough to tap on a phone (24 px is the WCAG 2.2 minimum; these are 44) */
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.footer-links a[aria-current="page"] { color: var(--paper); text-decoration-thickness: 2px; }
.footer-note { margin: 0; max-width: 75ch; line-height: 1.5; }

@media (min-width: 601px) {
  .footer-links a { min-height: 32px; }
}

/* ---------- OBS / broadcast mode: just the picture ---------- */

body.obs { background: #000; overflow: hidden; }
body.obs .masthead, body.obs .controls, body.obs .caption, body.obs .rail, body.obs .sources-block, body.obs .replay-bar,
body.obs .sound-gate, body.obs .rec-badge, body.obs .follow, body.obs .watching, body.obs .support-block,
body.obs .site-footer, body.obs .skip-link, body.obs .slate { display: none; }
body.obs .layout { display: block; padding: 0; max-width: none; }
body.obs .bezel { padding: 0; border-radius: 0; box-shadow: none; background: #000; }
body.obs .screen { border-radius: 0; box-shadow: none; }
body.obs #studio { width: 100vw; height: 100vh; aspect-ratio: auto; object-fit: contain; }
body.obs .screen.tall { max-width: none; }

@media (prefers-reduced-motion: reduce) {
  .tally.live, .slate-tag::after, .rec-badge::before { animation: none; }
  .slate.off { transition: none; }
}
