/* ==========================================================================
   FullStack Media - component bundle
   The flat web translation of the rack: black ground, machined panels with a
   one-pixel top bevel, silk-screen legends, lamps that show state, recessed
   readout windows and liner-notes type for reading.

   Contract
   - Every class is prefixed fs-. Public knobs are --fs-* custom properties;
     names that start --_ are private to a rule.
   - Colour, spacing, radius and shadow come from tokens.css variables.
   - Type comes from the type-style classes (.legend, .shout-l, .liner ...).
     Put the class in the markup: <button class="fs-key legend">. Fonts
     inherit, so a wrapper such as <nav class="fs-selector legend"> covers
     its links.
   - One light, from the top. Only lamps are round.
   - Helpers without a card of their own: .fs-panel (a bare plate),
     .fs-indicator (an indicator with its legend), .fs-frame (a 16:9 still).

   Colour rule: a lamp colour means its channel and nothing else. States
   (standby, record, peak, current, primary) are lamp-white or plain ink.

   Written by hand where no token reaches, and marked where it happens: the
   glow of the white lamp and of readout digits, the cast shadow of torn tape,
   the keyline of the credit block, the drawing of screws and tape tears,
   and the two ends of the faceplate headline scale.

   Index
   0  Type helpers            6  Key
   1  Theme and channel       7  Selector
   2  Panel and well          8  Faceplate
   3  Lamp, indicator         9  Tape label
   4  Imprint, lockup        10  Liner notes, credit block, tab, schedule
   5  Meter, readout         11  Focus, motion, forced colours
   ========================================================================== */


/* 0  Type helpers ---------------------------------------------------------- */

/* Display and legend styles are always set in capitals. */
.shout-xl, .shout-l, .shout-m, .shout-s,
.legend-xl, .legend, .legend-sm { text-transform: uppercase; }


/* 1  Theme and channel switches -------------------------------------------- */

/* What a lamp is depends on what it sits on, and the logo already says how.
   Rack (dark): light comes out of the lamp. Unlit is a neutral smoked lens in
   a steel bezel, whatever its colour will be; lit is the lamp fill and its
   glow. So the lit lamp is the only colour.
   Liner notes (light): the lamp is printed, as on the black-on-bone logo.
   Unlit is an ink ring; lit is the fill inside an ink bezel, and the white
   lamp, which cannot out-shine paper, is solid ink like the parent brand's
   dots.
   The switches live on the theme scope, so a nested data-theme re-themes its
   own lamps. */
:root, [data-theme="dark"] {
  --fs-bezel: 0%;                       /* share of ink in a lit lamp's bezel */
  --fs-lamp-rim: var(--steel);          /* bezel of an unlit lamp */
  --fs-lamp-lens: color-mix(in srgb, var(--steel) 22%, var(--well));   /* the unlit lens */
  --fs-lamp-white: var(--lamp-white);   /* fill of the lit white lamp */
  /* tokens.json has no glow-white; this mirrors the geometry of the other three */
  --fs-lamp-white-glow: 0 0 6px 1px color-mix(in srgb, var(--lamp-white) 95%, transparent),
                        0 0 22px 6px color-mix(in srgb, var(--lamp-white) 42%, transparent);
  --fs-tape-lift: 0;                    /* white laid over the bone of console tape */
}
[data-theme="light"] {
  --fs-bezel: 100%;
  --fs-lamp-rim: var(--ink);
  --fs-lamp-lens: var(--surface);
  --fs-lamp-white: var(--ink);
  --fs-lamp-white-glow: 0 0 0 0 transparent;
  --fs-tape-lift: 0.7;
}

/* A channel scope. Put data-channel="form|music|tv" on a page, a section, a
   plate or on the part itself: what glows in a well inside it (readout
   digits, meter steps) takes that channel's lamp colour. The value is
   inherited, so the nearest scope wins. With no scope the glow is warm white. */
[data-channel="form"]  { --fs-channel: var(--lamp-amber); }
[data-channel="music"] { --fs-channel: var(--lamp-red); }
[data-channel="tv"]    { --fs-channel: var(--lamp-green); }


/* 2  Panel and well -------------------------------------------------------- */

/* A raised, machined plate. Faceplate is a panel with ears and a headline;
   .fs-panel is the bare plate to mount indicators and controls on. */
.fs-panel,
.fs-faceplate {
  box-sizing: border-box;
  background-color: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
}
.fs-panel { padding: var(--space-6); }

/* A window recessed into a plate. Always dark, in both themes. */
.fs-readout,
.fs-meter {
  box-sizing: border-box;
  background-color: var(--well);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-well);
}


/* 3  Lamp, indicator ------------------------------------------------------- */

.fs-lamp {
  --_hue: var(--lamp-white);
  --_lit: var(--fs-lamp-white);
  --_glow: var(--fs-lamp-white-glow);
  --_warm: 0%;                          /* how far a dark lens leans to its colour; hover raises it */
  box-sizing: border-box;
  display: inline-block;
  flex: none;
  inline-size: var(--space-3);
  block-size: var(--space-3);
  border: 1px solid var(--fs-lamp-rim);
  border-radius: var(--radius-lamp);
  background-color: var(--fs-lamp-lens);
  background-color: color-mix(in srgb, var(--_hue) var(--_warm), var(--fs-lamp-lens));
  vertical-align: middle;
  /* a lamp switches, it does not fade: 120 ms, linear */
  transition: background-color 0.12s linear, border-color 0.12s linear, box-shadow 0.12s linear, filter 0.12s linear;
}
.fs-lamp[data-size="16"] { inline-size: var(--space-4); block-size: var(--space-4); }
.fs-lamp[data-color="amber"] { --_hue: var(--lamp-amber); --_lit: var(--lamp-amber); --_glow: var(--glow-amber); }
.fs-lamp[data-color="red"]   { --_hue: var(--lamp-red);   --_lit: var(--lamp-red);   --_glow: var(--glow-red); }
.fs-lamp[data-color="green"] { --_hue: var(--lamp-green); --_lit: var(--lamp-green); --_glow: var(--glow-green); }

/* Lit: by its own data-on, or because the control that owns it is latched
   (aria-pressed) or current (aria-current). */
.fs-lamp[data-on],
[aria-pressed="true"] > .fs-lamp,
[aria-current]:not([aria-current="false"]) > .fs-lamp {
  border-color: var(--_lit);
  border-color: color-mix(in srgb, var(--ink) var(--fs-bezel), var(--_lit));
  background-color: var(--_lit);
  box-shadow: var(--_glow);
}

/* A Live lamp may breathe while a stream is running. It is the only looping
   animation in the system: the lamp strikes, holds for one period, then its
   halo goes out and comes back while the lamp itself stays lit. */
.fs-lamp[data-on][data-pulse] { animation: fs-lamp-pulse 2.4s ease-in-out 2.4s infinite; }
@keyframes fs-lamp-pulse {
  50% { box-shadow: 0 0 6px 1px transparent, 0 0 22px 6px transparent; filter: brightness(0.84); }
}

/* A lamp or any other indicator with the legend that names it. */
.fs-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink);
  white-space: nowrap;
}
.fs-indicator[data-stack] { flex-direction: column; }
/* The legend steps back while its lamp is dark, so state never rests on hue alone. */
.fs-indicator:has(> .fs-lamp:not([data-on])) { color: var(--ink-dim); }


/* 4  Imprint, lockup ------------------------------------------------------- */

/* The FULLSTACK wordmark. Size it with --fs-cap, the cap height. All three
   dots are drawn as r 5.46 with a 2.08 stroke, so a solid dot (fill + stroke
   in one colour) and a ring (stroke only) share the 13-unit outer diameter. */
.fs-imprint,
.fs-lockup {
  --_cap: var(--fs-cap, var(--u1));
  display: block;
  flex: none;
  inline-size: auto;
  overflow: visible;
  color: var(--ink);
  fill: currentColor;
}
.fs-imprint { block-size: calc(var(--_cap) * 1.225); }
/* The lockup box starts at the left edge of the F. The swash of Form and the
   first stroke of Music hang up to 0.1 cap outside it, as drawn. */
.fs-lockup { block-size: calc(var(--_cap) * 4.51); }
.fs-lockup[data-channel="tv"] { block-size: calc(var(--_cap) * 4.3864); }

.fs-imprint__dot { fill: currentColor; stroke: currentColor; }

/* On a channel mark only its own lamp is lit; the other two are rings. */
:is(.fs-imprint, .fs-lockup)[data-channel] .fs-imprint__dot { fill: none; }
:is(.fs-imprint, .fs-lockup)[data-channel="form"] .fs-imprint__dot:nth-of-type(1) { --_lamp: var(--lamp-amber); }
:is(.fs-imprint, .fs-lockup)[data-channel="music"] .fs-imprint__dot:nth-of-type(2) { --_lamp: var(--lamp-red); }
:is(.fs-imprint, .fs-lockup)[data-channel="tv"] .fs-imprint__dot:nth-of-type(3) { --_lamp: var(--lamp-green); }
:is(.fs-imprint, .fs-lockup)[data-channel="form"] .fs-imprint__dot:nth-of-type(1),
:is(.fs-imprint, .fs-lockup)[data-channel="music"] .fs-imprint__dot:nth-of-type(2),
:is(.fs-imprint, .fs-lockup)[data-channel="tv"] .fs-imprint__dot:nth-of-type(3) {
  fill: var(--_lamp);
  stroke: var(--_lamp);
  stroke: color-mix(in srgb, currentColor var(--fs-bezel), var(--_lamp));
}


/* 5  Meter, readout -------------------------------------------------------- */

/* Twelve segments: eleven steps and a peak, set apart by a notch. Every lit
   step is one colour, the channel's lamp or lamp-white when no channel is
   set, and the peak segment is always lamp-white. A lamp colour means its
   channel, never a level, so there is no green-to-red ramp. Set --level
   (0 to 12) inline. ::before is the unlit ladder, ::after the lit part, cut
   to length. */
.fs-meter {
  --_c: var(--fs-channel, var(--lamp-white));
  --_p: var(--fs-meter-pitch, var(--space-2));            /* one segment and its gap */
  --_size: var(--fs-meter-size, var(--space-4));          /* thickness of the bar */
  --_g: calc(var(--space-1) / 2);                         /* gap between segments */
  --_s: calc(var(--_p) - var(--_g));                      /* one segment */
  --_n: var(--space-1);                                   /* the notch before the peak */
  --_pad: var(--space-2);
  --_run: calc(12 * var(--_p) - var(--_g) + var(--_n));
  --_lv: var(--level, 0);
  --_lit: calc(var(--_lv) * var(--_p) + var(--_n) * clamp(0, var(--_lv) - 11, 1));
  --_to: to right;
  --_ladder: linear-gradient(var(--_to),
    var(--black) 0 var(--_s),
    transparent 0 var(--_p), var(--black) 0 calc(var(--_p) + var(--_s)),
    transparent 0 calc(2 * var(--_p)), var(--black) 0 calc(2 * var(--_p) + var(--_s)),
    transparent 0 calc(3 * var(--_p)), var(--black) 0 calc(3 * var(--_p) + var(--_s)),
    transparent 0 calc(4 * var(--_p)), var(--black) 0 calc(4 * var(--_p) + var(--_s)),
    transparent 0 calc(5 * var(--_p)), var(--black) 0 calc(5 * var(--_p) + var(--_s)),
    transparent 0 calc(6 * var(--_p)), var(--black) 0 calc(6 * var(--_p) + var(--_s)),
    transparent 0 calc(7 * var(--_p)), var(--black) 0 calc(7 * var(--_p) + var(--_s)),
    transparent 0 calc(8 * var(--_p)), var(--black) 0 calc(8 * var(--_p) + var(--_s)),
    transparent 0 calc(9 * var(--_p)), var(--black) 0 calc(9 * var(--_p) + var(--_s)),
    transparent 0 calc(10 * var(--_p)), var(--black) 0 calc(10 * var(--_p) + var(--_s)),
    transparent 0 calc(11 * var(--_p) + var(--_n)), var(--black) 0);
  position: relative;
  display: inline-block;
  flex: none;
  inline-size: calc(var(--_run) + 2 * var(--_pad));
  block-size: calc(var(--_size) + 2 * var(--_pad));
  vertical-align: middle;
}
@supports (width: round(down, 1px, 1px)) {
  /* whole segments only, whatever number arrives */
  .fs-meter { --_lv: round(down, var(--level, 0), 1); }
}
.fs-meter[data-orient="vertical"] {
  --_to: to top;
  inline-size: calc(var(--_size) + 2 * var(--_pad));
  block-size: calc(var(--_run) + 2 * var(--_pad));
}
.fs-meter::before,
.fs-meter::after {
  content: "";
  position: absolute;
  inset: var(--_pad);
  background-image: linear-gradient(var(--_to), var(--_c) 0 calc(11 * var(--_p)), var(--lamp-white) 0);
  -webkit-mask-image: var(--_ladder);
  mask-image: var(--_ladder);
}
.fs-meter::before { opacity: 0.17; }
/* the three uncut sides overshoot by a pixel so only the cut edge is ever clipped;
   the cut edge moves to its value with a small overshoot and settles */
.fs-meter::after {
  clip-path: inset(-1px calc(100% - var(--_lit)) -1px -1px);
  transition: clip-path 0.4s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.fs-meter[data-orient="vertical"]::after { clip-path: inset(calc(100% - var(--_lit)) -1px -1px -1px); }

/* Glowing characters in a well: the channel's lamp colour inside a channel
   scope, --readout (the same warm white as lamp-white) everywhere else. The
   glow follows the same colour. data-ghost holds the all-segments string that
   sits faintly behind the live text, e.g. data-ghost="8:88:88". */
.fs-readout {
  --_c: var(--fs-channel, var(--readout));
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  min-block-size: var(--u1);
  padding: var(--space-2) var(--space-3);
  color: var(--_c);
  white-space: pre;
  /* tokens.json has no glow for text in a well; built from the colour in use */
  text-shadow: 0 0 var(--space-1) color-mix(in srgb, var(--_c) 70%, transparent),
               0 0 var(--space-4) color-mix(in srgb, var(--_c) 45%, transparent);
}
.fs-readout[data-ghost]::before {
  content: attr(data-ghost);
  content: attr(data-ghost) / "";
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: inherit;
  color: var(--_c);
  opacity: 0.13;
  text-shadow: none;
  pointer-events: none;
}
/* powered down: the window keeps its width and shows the ghosts only */
.fs-readout[data-off] { color: transparent; text-shadow: none; }


/* 6  Key ------------------------------------------------------------------- */

/* The button. Selector links are the same part, so they share the rule. */
.fs-key,
.fs-selector > a {
  --_face: var(--surface);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  block-size: var(--u1);
  margin: 0;
  padding: 0 var(--space-6);
  border: 0;
  border-radius: var(--radius-key);
  background-color: var(--_face);
  box-shadow: var(--shadow-key);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  /* a key travels one pixel: 60 ms down, 90 ms up */
  transition: background-color 0.09s linear, box-shadow 0.09s linear;
}
/* a lamp sits nearer the edge than a label does */
.fs-key:has(> .fs-lamp:first-child) { padding-inline-start: var(--space-4); }

.fs-key:not(:disabled, [aria-disabled="true"]):hover,
.fs-selector > a:hover { --_face: color-mix(in srgb, var(--surface) 93%, var(--ink)); }
/* hover brightens the lamp: a dark lens warms up, a lit one runs hotter */
:is(.fs-key:not(:disabled, [aria-disabled="true"]), .fs-selector > a):hover > .fs-lamp { --_warm: 45%; filter: brightness(1.18) saturate(1.1); }

/* held down, or latched on */
.fs-key:active,
.fs-selector > a:active,
.fs-key[aria-pressed="true"],
.fs-selector > a[aria-current]:not([aria-current="false"]) {
  --_face: color-mix(in srgb, var(--surface) 70%, var(--ground));
  box-shadow: var(--shadow-key-down);
  padding-block-start: calc(var(--space-1) / 2);
  transition-duration: 0.06s;
}

.fs-key:disabled,
.fs-key[aria-disabled="true"] {
  --_face: var(--surface);
  box-shadow: var(--shadow-panel);
  padding-block-start: 0;
  color: var(--ink-dim);
  cursor: not-allowed;
}
.fs-key:disabled > .fs-lamp,
.fs-key[aria-disabled="true"] > .fs-lamp {
  border-color: var(--rule);
  background-color: var(--fs-lamp-lens);
  box-shadow: none;
  filter: none;
}


/* 7  Selector -------------------------------------------------------------- */

/* A bank of interlocked keys: one is down, its lamp is lit. */
.fs-selector {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
}
.fs-selector > a { padding-inline: var(--space-4); }


/* 8  Faceplate ------------------------------------------------------------- */

/* The section header strip: 3U tall (2U on phones, or with data-compact), an
   ear at each end, two screws per ear. It is its own query container, so it
   adapts to the column it sits in. */
.fs-faceplate {
  container: fs-faceplate / inline-size;
  display: flex;
}
/* An ear. Layers, top to bottom: a collar that also trims the slot to the
   head, the slot, the head (twice each, one screw up, one down), the seam. */
.fs-faceplate::before,
.fs-faceplate::after {
  --_y: calc(var(--u1) / 2);                 /* screw centre, from the top and bottom edges */
  --_box: calc(var(--space-3) + var(--space-1) / 2);
  --_collar: radial-gradient(circle at center, transparent 0 4.4px, color-mix(in srgb, var(--black) 55%, var(--surface)) 5px 5.8px, var(--surface) 6.4px);
  --_head: radial-gradient(circle at center, color-mix(in srgb, var(--steel) 62%, var(--surface)) 0 5px, transparent 5.4px);
  content: "";
  box-sizing: border-box;
  flex: none;
  inline-size: var(--u1);
  background-repeat: no-repeat;
  background-image:
    var(--_collar), var(--_collar),
    linear-gradient(var(--_a1), transparent calc(50% - 0.8px), var(--well) 0 calc(50% + 0.8px), transparent 0),
    linear-gradient(var(--_a2), transparent calc(50% - 0.8px), var(--well) 0 calc(50% + 0.8px), transparent 0),
    var(--_head), var(--_head),
    linear-gradient(var(--surface-edge), var(--surface-edge));
  background-size:
    var(--_box) var(--_box), var(--_box) var(--_box),
    var(--_box) var(--_box), var(--_box) var(--_box),
    var(--_box) var(--_box), var(--_box) var(--_box),
    1px calc(100% - 2px);
  background-position:
    center calc(var(--_y) - var(--_box) / 2), center calc(100% - var(--_y) + var(--_box) / 2),
    center calc(var(--_y) - var(--_box) / 2), center calc(100% - var(--_y) + var(--_box) / 2),
    center calc(var(--_y) - var(--_box) / 2), center calc(100% - var(--_y) + var(--_box) / 2),
    var(--_seam) 1px;
}
.fs-faceplate::before { --_a1: 28deg; --_a2: 112deg; --_seam: right; }
.fs-faceplate::after  { --_a1: 96deg; --_a2: 162deg; --_seam: left; }

.fs-faceplate__body {
  box-sizing: border-box;
  flex: 1;
  min-inline-size: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  align-content: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  min-block-size: var(--u3);
  padding: var(--space-4) var(--space-6);
}
/* the compact plate: a 2U strip for controls, such as the site header */
.fs-faceplate[data-compact] > .fs-faceplate__body { min-block-size: var(--u2); align-items: center; row-gap: var(--space-3); }
.fs-faceplate__title { margin: 0; text-wrap: balance; }
/* .shout-l is 72px. Type styles are classes, not variables, so the two ends
   of this scale are written out: 72px (.shout-l) down to 40px (.shout-m). */
.fs-faceplate__title.shout-l { font-size: clamp(40px, 6.5cqi, 72px); }
.fs-faceplate__model {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  margin-inline-start: auto;
  color: var(--ink-dim);
  white-space: nowrap;
}
@container fs-faceplate (max-width: 560px) {
  .fs-faceplate::before,
  .fs-faceplate::after { inline-size: var(--space-6); }
  .fs-faceplate__body { min-block-size: var(--u2); padding-inline: var(--space-4); }
}


/* 9  Tape label ------------------------------------------------------------ */

/* A strip of console tape with a typed label. Handwriting is never drawn or
   imitated with a font: until a real strip is photographed, labels are typed.
   The paper is the ::before so the torn ends can be clipped while the shadow
   follows the tear. Tape carries black writing in both themes; on bone paper
   it is lifted towards white so it still reads. */
.fs-tape {
  position: relative;
  isolation: isolate;
  display: inline-block;
  box-sizing: border-box;
  min-block-size: var(--space-8);
  padding: var(--space-1) var(--space-4);
  color: var(--black);
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(var(--fs-tape-tilt, -1.5deg));
  /* the box-shadow tokens cannot follow a clip-path; this is the one cast shadow written by hand */
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.14));
}
.fs-tape::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--bone);
  /* a lit top edge and a shaded bottom edge, then the lift */
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 0 1px, rgba(255, 255, 255, 0) 0 calc(100% - 1px), rgba(0, 0, 0, 0.16) 0),
    linear-gradient(rgba(255, 255, 255, var(--fs-tape-lift)), rgba(255, 255, 255, var(--fs-tape-lift)));
  clip-path: polygon(
    1.5px 0, calc(100% - 1px) 0,
    calc(100% - 3.5px) 19%, calc(100% - 0.5px) 34%, calc(100% - 2px) 58%, 100% 73%, calc(100% - 3px) 100%,
    2px 100%,
    0 79%, 2.5px 62%, 1px 41%, 3.5px 23%);
}
/* the real thing: a photograph of a strip of tape, cut out along its edge.
   It brings its own paper, so the drawn strip steps aside. */
.fs-tape:has(> img) { min-block-size: 0; padding: 0; }
.fs-tape:has(> img)::before { content: none; }
.fs-tape > img { display: block; block-size: var(--space-8); inline-size: auto; }


/* 10  Liner notes, credit block, tab, schedule ----------------------------- */

/* A reading block. Measure about 60 characters of .liner. */
.fs-liner {
  max-inline-size: 34rem;
  color: var(--ink);
}
.fs-liner > * { margin: 0; }
.fs-liner > * + * { margin-block-start: var(--space-4); }
.fs-liner p { text-wrap: pretty; }
/* blackletter drop cap: two lines of .liner-lead deep, sitting on the second baseline */
.fs-liner__cap {
  float: inline-start;
  margin-block-start: 0.135em;
  margin-inline-end: var(--space-2);
}
/* the opening quotation mark hangs in the margin */
.fs-liner > .fs-liner__quote {
  margin-block: var(--space-8);
  text-indent: -0.42em;
  text-wrap: balance;
}
.fs-liner > .fs-liner__credits {
  margin-block-start: var(--space-8);
  padding-block-start: var(--space-4);
  border-block-start: 1px solid var(--rule);
}
.fs-liner__credits > div { display: flex; align-items: baseline; }
.fs-liner__credits dt {
  flex: 0 1 20ch;
  overflow: hidden;
  white-space: nowrap;
}
.fs-liner__credits dt::after {
  content: " ................................................";
  content: " ................................................" / "";
  color: var(--ink-dim);
}
.fs-liner__credits dd { flex: 1 1 0; min-inline-size: 0; margin: 0; padding-inline-start: 1ch; }

/* The lower-left video credit. It sits on footage, so it is bone in both themes,
   with the one-pixel black keyline of a broadcast caption (eight hard shadows,
   which every browser draws alike) and a soft shadow under it. */
.fs-credit {
  --_k: rgba(0, 0, 0, 0.85);
  display: grid;
  justify-items: start;
  max-inline-size: 24rem;
  color: var(--bone);
  text-shadow:
    1px 0 0 var(--_k), -1px 0 0 var(--_k), 0 1px 0 var(--_k), 0 -1px 0 var(--_k),
    1px 1px 0 var(--_k), -1px 1px 0 var(--_k), 1px -1px 0 var(--_k), -1px -1px 0 var(--_k),
    0 2px 4px rgba(0, 0, 0, 0.6);
}
.fs-credit > * { margin: 0; }
.fs-credit__title { text-indent: -0.42em; }
.fs-credit > :last-child { margin-block-start: var(--space-1); }

/* A 16:9 video or still frame. Empty, it is a well with a faint vignette. */
.fs-frame {
  position: relative;
  box-sizing: border-box;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius-none);
  background-color: var(--well);
  background-image: radial-gradient(120% 100% at 50% 36%, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 68%);
}
/* picture, video or embed placed straight inside fills the frame */
.fs-frame > :is(img, video, iframe) {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
  object-fit: cover;
}
.fs-frame > .fs-credit {
  position: absolute;
  z-index: 1;
  inset-inline-start: min(5%, var(--u1));
  inset-block-end: min(8%, var(--u1));
}

/* Six-line ASCII tablature. Strings and bar lines are dim; wrap notes in <b>. */
.fs-tab {
  box-sizing: border-box;
  inline-size: fit-content;
  max-inline-size: 100%;
  margin: 0;
  padding-block: var(--space-4);
  border-block: 1px solid var(--rule);
  overflow-x: auto;
  color: var(--ink-dim);
  white-space: pre;
}
.fs-tab b { color: var(--ink); font-weight: 700; }
.fs-tab__head {
  display: block;
  margin-block-end: var(--space-4);
  padding-block-end: var(--space-4);
  border-block-end: 1px solid var(--rule);
}

/* Stream schedule, set like tour dates on the back of a shirt. */
.fs-schedule {
  container: fs-schedule / inline-size;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  border-block-end: 1px solid var(--rule);
}
.fs-schedule > li {
  display: grid;
  grid-template-columns: var(--u3) minmax(0, 1fr) auto;
  column-gap: var(--space-6);
  align-items: baseline;
  padding-block: var(--space-3);
  border-block-start: 1px solid var(--rule);
}
.fs-schedule__what { text-wrap: pretty; }
.fs-schedule__length { min-inline-size: var(--u2); text-align: end; white-space: nowrap; }
@container fs-schedule (max-width: 520px) {
  .fs-schedule > li { grid-template-columns: minmax(0, 1fr) auto; }
  .fs-schedule__what { grid-column: 1 / -1; grid-row: 2; }
  .fs-schedule__length { min-inline-size: 0; }
}


/* 11  Focus, motion, forced colours ---------------------------------------- */

.fs-key:focus-visible,
.fs-selector > a:focus-visible,
.fs-tab:focus-visible,
:is(.fs-liner, .fs-schedule, .fs-faceplate, .fs-credit) a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* with reduced motion a lamp is simply on and a meter is at its value */
@media (prefers-reduced-motion: reduce) {
  .fs-lamp,
  .fs-meter::after,
  .fs-key,
  .fs-selector > a { transition: none; }
  .fs-lamp[data-on][data-pulse] { animation: none; }
}

@media (forced-colors: active) {
  .fs-key,
  .fs-selector > a,
  .fs-panel,
  .fs-faceplate,
  .fs-readout,
  .fs-meter { border: 1px solid ButtonText; }
  .fs-lamp { forced-color-adjust: none; }
}
