/*
Theme Name: Wavelength
Theme URI: https://wavelength.run
Author: Austin Ginder
Description: The site for Wavelength, the headless music engine for AI agents: what it does, the agent skill, and a library of songs with their prompts, instruments and patches.
Version: 1.6.2
Requires PHP: 8.1
License: MIT
Text Domain: wavelength
*/

/* All three faces are self-hosted and preloaded (SIL OFL 1.1, assets/fonts/*-OFL.txt).
   Anybody (display): headings wait for it instead of swapping in front of the reader (header.php).
   Instrument Sans and JetBrains Mono (text, code): font-display optional, so text never swaps
   mid-read: if the preloaded font isn't there for the first paint, that page view keeps the
   size-matched fallback below and the next page has it from the cache. */
@font-face {
  font-family: "Anybody";
  font-style: normal;
  font-weight: 300 900;
  font-stretch: 50% 150%;
  font-display: swap;
  src: url("assets/fonts/anybody-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Anybody";
  font-style: normal;
  font-weight: 300 900;
  font-stretch: 50% 150%;
  font-display: swap;
  src: url("assets/fonts/anybody-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Anybody";
  font-style: normal;
  font-weight: 300 900;
  font-stretch: 50% 150%;
  font-display: swap;
  src: url("assets/fonts/anybody-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url("assets/fonts/instrument-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url("assets/fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: optional;
  src: url("assets/fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: optional;
  src: url("assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Size-matched stand-ins, used only if a page view starts before the real font arrives: Arial and
   Courier New scaled so lines break and stack where Instrument Sans' and JetBrains Mono's would
   (measured with fontTools on a paragraph of the site's copy). */
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans");
  size-adjust: 101.33%;
  ascent-override: 95.73%;
  descent-override: 24.67%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "JetBrains Mono Fallback";
  src: local("Courier New"), local("CourierNewPSMT"), local("Liberation Mono");
  size-adjust: 99.98%;
  ascent-override: 102.02%;
  descent-override: 30%;
  line-gap-override: 0%;
}

/* Anybody's stand-ins, one per weight and width a heading uses: Arial Black scaled to that
   instance's width (measured with fontTools on the site's headings), so a heading held for Anybody
   (wl-fonts-pending) already takes the room it will need and nothing below it moves when it lands. */
@font-face {
  font-family: "Anybody 700 100";
  src: local("Arial Black"), local("Arial-Black");
  size-adjust: 99.83%;
  ascent-override: 79.63%;
  descent-override: 24.04%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Anybody 700 105";
  src: local("Arial Black"), local("Arial-Black");
  size-adjust: 105.32%;
  ascent-override: 75.48%;
  descent-override: 22.79%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Anybody 700 110";
  src: local("Arial Black"), local("Arial-Black");
  size-adjust: 110.80%;
  ascent-override: 71.75%;
  descent-override: 21.66%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Anybody 700 112";
  src: local("Arial Black"), local("Arial-Black");
  size-adjust: 113.00%;
  ascent-override: 70.36%;
  descent-override: 21.24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Anybody 700 120";
  src: local("Arial Black"), local("Arial-Black");
  size-adjust: 121.77%;
  ascent-override: 65.29%;
  descent-override: 19.71%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Anybody 800 78";
  src: local("Arial Black"), local("Arial-Black");
  size-adjust: 81.09%;
  ascent-override: 98.04%;
  descent-override: 29.60%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Anybody 800 118";
  src: local("Arial Black"), local("Arial-Black");
  size-adjust: 124.10%;
  ascent-override: 64.06%;
  descent-override: 19.34%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Anybody 800 125";
  src: local("Arial Black"), local("Arial-Black");
  size-adjust: 131.63%;
  ascent-override: 60.40%;
  descent-override: 18.23%;
  line-gap-override: 0%;
}

:root {
  --paper: #eceef3;
  --paper-2: #e2e5ec;
  --ink: #1a1c2b;
  --slate: #5b6173;
  --line: #c9cdd8;
  --cobalt: #2f4be0;
  --cobalt-ink: #2239b8;
  --amber: #e39a0b;
  --code-bg: #1a1c2b;
  --code-ink: #e6e8ef;
  --button: #2f4be0;
  --button-hover: #2239b8;
  --on-button: #fff;
  --area: rgba(227, 154, 11, 0.16);
  --mint: #14936f;
  --menu-bg: #fff;
  --menu-shadow: 0 10px 30px rgba(26, 28, 43, 0.18);
  color-scheme: light;

  --display: "Anybody", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", "Instrument Sans Fallback", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 68ch;
  --wide: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
}

:root[data-theme="dark"] {
  --paper: #151826;
  --paper-2: #1f2334;
  --ink: #e4e7f0;
  --slate: #9aa1b6;
  --line: #2f3448;
  --cobalt: #93a4ff;
  --cobalt-ink: #b9c4ff;
  --amber: #f2b33d;
  --code-bg: #0c0e17;
  --code-ink: #e4e7f0;
  --button: #4058ee;
  --button-hover: #5068ff;
  --on-button: #fff;
  --area: rgba(242, 179, 61, 0.14);
  --mint: #4fd1a5;
  --menu-bg: #22263a;
  --menu-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151826;
    --paper-2: #1f2334;
    --ink: #e4e7f0;
    --slate: #9aa1b6;
    --line: #2f3448;
    --cobalt: #93a4ff;
    --cobalt-ink: #b9c4ff;
    --amber: #f2b33d;
    --code-bg: #0c0e17;
    --code-ink: #e4e7f0;
    --button: #4058ee;
    --button-hover: #5068ff;
    --on-button: #fff;
    --area: rgba(242, 179, 61, 0.14);
  --mint: #4fd1a5;
    --menu-bg: #22263a;
    --menu-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  font-feature-settings: "ss01";
}
img, svg, iframe { max-width: 100%; }
a { color: var(--cobalt); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--cobalt-ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--button); color: var(--on-button); }

.skip-link { position: absolute; left: -9999px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { left: var(--gutter); top: 12px; background: var(--code-bg); color: var(--code-ink); padding: 8px 12px; z-index: 10; }

.wrap { width: min(var(--wide), 100% - 2 * var(--gutter)); margin-inline: auto; }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1em; }

/* ---------------------------------------------------------------- header / footer */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.brand {
  --display: "Anybody", "Anybody 700 120", "Instrument Sans", system-ui, sans-serif;
  font: 700 1.35rem/1 var(--display);
  font-variation-settings: "wdth" 120;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
}
/* the lockup's proportions: 1.35 x cap height (cap = 0.7em in Anybody), one step from the name */
.brand-mark { height: 0.95em; width: auto; color: var(--cobalt); flex: none; }
.site-nav { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--cobalt); }

/* About: a disclosure (button + panel of links), opened by site.js; without scripts it opens on focus */
.nav-menu { position: relative; }
.nav-menu-button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--ink); font: 500 1rem var(--body);
}
.nav-menu-button svg { width: 12px; height: 12px; transition: transform 0.15s; }
.nav-menu-button:hover, .nav-menu.is-current .nav-menu-button, .nav-menu.is-open .nav-menu-button { color: var(--cobalt); }
.nav-menu.is-open .nav-menu-button svg { transform: rotate(180deg); }
.nav-menu-panel {
  display: none;
  position: absolute; left: -12px; top: calc(100% + 12px); z-index: 20;
  width: max-content; max-width: min(330px, calc(100vw - 32px));
  padding: 6px;
  background: var(--menu-bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--menu-shadow);
}
.nav-menu.is-open .nav-menu-panel, :root:not(.wl-js) .nav-menu:focus-within .nav-menu-panel { display: block; }
.site-nav .nav-menu-panel a { display: block; padding: 9px 12px; border-radius: 4px; }
.site-nav .nav-menu-panel a span { display: block; margin-top: 2px; color: var(--slate); font-weight: 400; font-size: 0.86rem; }
.site-nav .nav-menu-panel a:hover, .site-nav .nav-menu-panel a:focus-visible { background: var(--paper-2); outline: none; }
@media (prefers-reduced-motion: reduce) { .nav-menu-button svg { transition: none; } }
@media (max-width: 480px) {
  .site-tools { gap: 12px; }
  .site-nav { gap: 14px; }
  .site-nav a, .nav-menu-button { font-size: 0.94rem; }
  /* the panel spans the header instead of hanging off the button */
  .site-header .wrap { position: relative; }
  .nav-menu { position: static; }
  .nav-menu-panel { left: 0; right: 0; top: calc(100% + 8px); width: auto; max-width: none; }
}

.site-footer { margin-top: 120px; padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--slate); font-size: 0.95rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--slate); }
.footer-links { display: flex; gap: 20px; }

/* ---------------------------------------------------------------- theme switch */
.site-tools { display: flex; align-items: center; gap: 22px; }
.theme-switch { position: relative; }
.theme-toggle {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  padding: 0; border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon { display: none; }
:root[data-pref="light"] .theme-toggle .icon-light,
:root[data-pref="dark"] .theme-toggle .icon-dark,
:root[data-pref="system"] .theme-toggle .icon-system,
:root:not([data-pref]) .theme-toggle .icon-system { display: block; }
.theme-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  min-width: 150px; margin: 0; padding: 6px; list-style: none;
  background: var(--menu-bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--menu-shadow);
}
.theme-menu[hidden] { display: none; }
.theme-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 4px; background: transparent;
  color: var(--ink); font: 500 0.95rem var(--body); text-align: left; cursor: pointer;
}
.theme-menu button:hover, .theme-menu button:focus-visible { background: var(--paper-2); outline: none; }
.theme-menu .check { width: 14px; color: var(--cobalt); visibility: hidden; }
.theme-menu button[aria-checked="true"] .check { visibility: visible; }

/* ---------------------------------------------------------------- studio (parts/studio.php, assets/studio.js) */
.studio { margin: 0; --cord-a: var(--cobalt); --cord-b: var(--amber); --cord-c: var(--mint); }
/* it sits small beside the heading of "How an agent makes a song", so its lines run a little heavier */
.how-wrap { display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 30vw, 360px); grid-template-rows: auto 1fr; column-gap: 40px; }
.how-wrap > h2, .how-wrap > .band-intro { grid-column: 1; }
.how-wrap > .studio { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin-bottom: 30px; }
.how-wrap > .steps { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .how-wrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .how-wrap > .studio { grid-column: 1; grid-row: auto; width: min(100%, 340px); margin: 0 0 28px; }
}
.studio-art { display: block; width: 100%; height: auto; overflow: visible; }
.studio-art * { stroke-linecap: round; stroke-linejoin: round; }
.studio-art .ln { fill: none; stroke: var(--ink); stroke-width: 3.6; }
.studio-art .ln-thin { fill: none; stroke: var(--ink); stroke-width: 2.2; }
.studio-art .fill { fill: var(--paper); }
.studio-floor { fill: none; stroke: var(--ink); stroke-width: 3; }
.studio-mark { fill: none; stroke: var(--cobalt); stroke-width: 2.6; }
.studio-label { font: 500 15px var(--mono); letter-spacing: 0.16em; fill: var(--ink); }
.studio-screen { fill: var(--code-bg); stroke: var(--ink); stroke-width: 3; }
.studio-wave { fill: none; stroke: var(--slate); stroke-width: 2.4; }
.studio-readout { font: 500 15px var(--mono); fill: var(--code-ink); white-space: pre; }
.studio-bay { fill: var(--paper-2); stroke: var(--line); stroke-width: 1.6; }
.studio-hole { fill: var(--ink); }
.studio-led, .studio-chest { fill: var(--line); stroke: var(--ink); stroke-width: 1.6; transition: fill 200ms; }
.studio-black { fill: var(--ink); }
.studio-lead { fill: none; stroke: var(--ink); stroke-width: 2.8; }
.cord-shadow { fill: none; stroke: var(--ink); stroke-opacity: 0.12; stroke-width: 11; }
.cord-outline { fill: none; stroke: var(--ink); stroke-width: 11; }
.cord-body { fill: none; stroke: var(--cord); stroke-width: 6; }
.cord-crease { fill: none; stroke: #fff; stroke-opacity: 0.45; stroke-width: 1.4; stroke-dasharray: 14 10; }
.cord-socket, .cord-head { fill: var(--cord); stroke: var(--ink); stroke-width: 2.6; }
.cord-tip { fill: var(--paper-2); stroke: var(--ink); stroke-width: 2; }
.cord-grip { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-opacity: 0.6; }
.studio-hose { fill: none; stroke: var(--ink); stroke-width: 11; }
.studio-band { fill: none; stroke: var(--ink); stroke-width: 6; }
.studio-eye { fill: var(--ink); }
.studio-happy { display: none; }
.studio-bulb { fill: var(--paper); stroke: var(--ink); stroke-width: 3; transition: fill 200ms; }
.studio-note { stroke: var(--ink); stroke-width: 1.8; }
.studio-spark { fill: none; stroke-width: 3; }

/* ---------------------------------------------------------------- hero */
.hero { padding: clamp(40px, 8vw, 96px) 0 48px; }
.hero > .wrap { container-type: inline-size; }
.wordmark {
  font-family: var(--display);
  /* the word is about 6.4 font-sizes wide (wl_wordmark keeps the mean letter width fixed): 14.5cqi fits the column */
  font-size: min(clamp(3.4rem, 13.5vw, 11.5rem), 14.5cqi);
  line-height: 0.9;
  margin: 0;
  display: flex;
  align-items: flex-end;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark span {
  display: inline-block;
  font-variation-settings: "wdth" var(--w, 100), "wght" var(--g, 500);
  transition: font-variation-settings 1400ms cubic-bezier(.2,.7,.1,1);
}
.wordmark.is-flat span { font-variation-settings: "wdth" 90, "wght" 420; }
/* every heading set in the display font waits for it (the wordmark then animates) */
.wl-fonts-pending :is(.brand, .wordmark, .band > .wrap > h2, .band-title, .step h3, .instrument-heading,
  .song-title, .song-head h1, .song-body h2, .song-body h3, .archive-head h1,
  .brand-hero h1, .brand-section h2, .readings h3, .reading-letter, .specimen-widths) { visibility: hidden; }
.hero-lede {
  margin: 44px 0 0;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.4;
  max-width: 34ch;
  font-weight: 500;
}
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.button {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--button);
  background: var(--button);
  color: var(--on-button);
}
.button:hover { background: var(--button-hover); border-color: var(--button-hover); color: var(--on-button); text-decoration: none; }
.button.quiet { background: transparent; color: var(--cobalt); border-color: var(--cobalt); }
.button.quiet:hover { background: var(--button); border-color: var(--button); color: var(--on-button); }

/* ---------------------------------------------------------------- sections */
.band { padding: 72px 0 0; }
.band > .wrap > h2, .band-title {
  --display: "Anybody", "Anybody 700 112", "Instrument Sans", system-ui, sans-serif;
  font: 700 clamp(1.8rem, 4vw, 2.6rem)/1.05 var(--display);
  font-variation-settings: "wdth" 112;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.band-intro { color: var(--slate); max-width: var(--measure); margin: 0 0 32px; }

/* how an agent makes a song: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 40px; }
.step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: start; counter-increment: step; }
.step h3 { --display: "Anybody", "Anybody 700 105", "Instrument Sans", system-ui, sans-serif; font: 700 1.35rem/1.2 var(--display); font-variation-settings: "wdth" 105; margin: 0 0 8px; }
.step h3::before { content: counter(step); display: inline-block; width: 1.6em; color: var(--cobalt); }
.step p { margin: 0; color: var(--slate); }

pre, code { font-family: var(--mono); }
pre {
  margin: 0;
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 18px 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.55;
}
p code, li code, td code { font-size: 0.88em; background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 4px; }
pre code { font-size: inherit; background: none; padding: 0; border-radius: 0; color: inherit; }
.tok-key { color: #9fb2ff; }
.tok-str { color: #f2c46d; }
.tok-num { color: #f2c46d; }
.tok-dim { color: #8a90a6; }

/* ---------------------------------------------------------------- instruments */
.instrument-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.instrument-heading { --display: "Anybody", "Anybody 700 105", "Instrument Sans", system-ui, sans-serif; font: 700 1.35rem/1.2 var(--display); font-variation-settings: "wdth" 105; margin: 0 0 8px; }
.instruments td:first-child { white-space: normal; }
.instruments .maker { display: block; font-weight: 400; color: var(--slate); font-size: 0.88rem; }
.instrument-note { color: var(--slate); max-width: var(--measure); margin: 24px 0 0; font-size: 0.95rem; }

/* ---------------------------------------------------------------- song list */
.song-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.song-row { border-bottom: 1px solid var(--line); }
.song-row.has-download { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; }
.song-row .song-link {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) auto;
  gap: 28px;
  align-items: center;
  padding: 24px 0;
  color: var(--ink);
  text-decoration: none;
}
.song-row .song-link:hover .song-title { color: var(--cobalt); }
/* the song as a .wavelength file, beside its row */
.song-file {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); text-decoration: none; font: 500 0.88rem var(--mono); white-space: nowrap;
}
.song-file svg { width: 16px; height: 16px; flex: none; color: var(--cobalt); }
.song-file:hover { border-color: var(--cobalt); color: var(--cobalt); }
.song-file-size { color: var(--slate); }
.song-title { --display: "Anybody", "Anybody 700 110", "Instrument Sans", system-ui, sans-serif; font: 700 1.6rem/1.1 var(--display); font-variation-settings: "wdth" 110; display: block; }
.song-summary { color: var(--slate); display: block; margin-top: 6px; font-size: 0.98rem; }
.song-length { color: var(--slate); font-variant-numeric: tabular-nums; }
.contour { display: block; width: 100%; height: auto; overflow: visible; }
.contour .area { fill: var(--area); }
.contour .line { fill: none; stroke: var(--amber); stroke-width: 2; stroke-linejoin: round; }
.contour .tick { stroke: var(--line); stroke-width: 1; }
.contour text { font: 500 11px var(--body); fill: var(--slate); }
.contour .lufs { fill: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- skill */
.skill-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 40px; align-items: start; }
.install-steps { margin: 0 0 24px; padding-left: 1.3em; }
.install-steps li { margin-bottom: 14px; }
.install-steps pre { margin-top: 8px; }
.skill-does { margin: 0; padding: 0; list-style: none; border-left: 3px solid var(--cobalt); padding-left: 20px; }
.skill-does li { margin-bottom: 12px; }
.skill-does strong { display: block; }

/* ---------------------------------------------------------------- song page */
.song-head { padding: 48px 0 8px; }
.song-head h1 {
  --display: "Anybody", "Anybody 800 125", "Instrument Sans", system-ui, sans-serif;
  font: 800 clamp(2.2rem, 7.4vw, 6rem)/0.92 var(--display);
  font-variation-settings: "wdth" 125;
  overflow-wrap: anywhere;
  letter-spacing: -0.02em;
  margin: 0;
}
.song-head .song-summary { font-size: 1.2rem; margin-top: 16px; max-width: var(--measure); }
.player { margin: 36px 0 0; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.player iframe { display: block; width: 100%; height: 166px; border: 0; }

/* the site's own player: transport + the arrangement timeline (assets/player.js) */
.song-player { margin: 36px 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.song-player.is-plain { border: 0; background: none; }
.player-audio { display: block; width: 100%; }
/* Without scripts the song player is the plain audio element. With them (wl-js, set before the
   first paint) the transport and timeline take its place from the start, at their final height,
   so nothing jumps when player.js takes over. */
.player-transport, .player-timeline { display: none; }
.wl-js .song-player:not(.is-plain) .player-audio { display: none; }
.wl-js .song-player .player-transport { display: flex; }
.wl-js .song-player .player-timeline { display: block; }
.player-transport { align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.player-play { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--button); color: var(--on-button); display: grid; place-items: center; cursor: pointer; }
.player-play:hover { background: var(--button-hover); }
.player-play:focus-visible, .player-timeline:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.player-play svg { fill: currentColor; }
.player-play .icon-pause, .song-player.is-playing .icon-play { display: none; }
.song-player.is-playing .icon-pause { display: inline; }
.player-time { font-family: var(--mono); font-size: 0.9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.player-section { color: var(--slate); font-size: 0.92rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-download { margin-left: auto; font-family: var(--mono); font-size: 0.82rem; color: var(--slate); }
.player-download:hover { color: var(--cobalt); }
.player-timeline { position: relative; padding: 4px 0 2px; container-type: inline-size; }
/* the canvas's height before player.js draws it: 26 px of section names, a row per track, 6 px
   under them; rows as player.js's layout() picks them from the timeline's width */
.player-timeline canvas { display: block; width: 100%; cursor: pointer; touch-action: none; --row: 28px; height: calc(32px + var(--tracks, 0) * var(--row)); }
.is-dense .player-timeline canvas { --row: 22px; }
@container (max-width: 559.98px) {
  .player-timeline canvas { --row: 24px; }
  .is-dense .player-timeline canvas { --row: 20px; }
}
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px 28px; margin: 32px 0 0; }
.facts div { border-top: 2px solid var(--ink); padding-top: 8px; }
.facts dt { color: var(--slate); font-size: 0.88rem; }
.facts dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.figure { margin: 56px 0 0; }
.chart-scroll { overflow-x: auto; }
.chart-scroll .contour { min-width: 560px; }
.song-body .chart-scroll .contour { min-width: 860px; }
.figure figcaption { color: var(--slate); font-size: 0.92rem; margin-top: 10px; max-width: var(--measure); }

.song-body h2 {
  --display: "Anybody", "Anybody 700 112", "Instrument Sans", system-ui, sans-serif;
  font: 700 clamp(1.6rem, 3.4vw, 2.2rem)/1.1 var(--display);
  font-variation-settings: "wdth" 112;
  margin: 72px 0 16px;
}
.song-body h3 { --display: "Anybody", "Anybody 700 105", "Instrument Sans", system-ui, sans-serif; font: 700 1.2rem/1.2 var(--display); font-variation-settings: "wdth" 105; margin: 36px 0 6px; }
.song-body .group-note { color: var(--slate); margin: 0 0 12px; max-width: var(--measure); }

.song-picture { margin-top: 0; }
.song-picture img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #0b0d12; }
.song-download p { max-width: var(--measure); }
.song-download pre { margin: 16px 0; }
.song-download-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.song-license { color: var(--slate); font-size: 0.92rem; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--slate); border-bottom: 2px solid var(--ink); }
td:first-child { font-weight: 600; white-space: nowrap; }
.timeline td:first-child { font-variant-numeric: tabular-nums; color: var(--slate); font-weight: 500; }
.timeline td:nth-child(2) { font-weight: 600; white-space: nowrap; }

.prompt {
  position: relative;
  margin: 0;
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
}
.prompt blockquote { margin: 0; font: 500 1.2rem/1.5 var(--body); }
.prompt blockquote::before { content: none; }
.prompt .slash { color: #9fb2ff; font-family: var(--mono); font-size: 0.95em; }
.prompt figcaption { margin-top: 18px; color: #b8bdcc; font-size: 0.92rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.copy-button {
  font: 600 0.9rem var(--body);
  background: transparent;
  color: var(--code-ink);
  border: 1px solid #5b6173;
  border-radius: var(--radius);
  padding: 7px 12px;
  cursor: pointer;
}
.copy-button:hover { border-color: var(--code-ink); }

.list-plain { padding-left: 1.2em; max-width: var(--measure); }
.list-plain li { margin-bottom: 8px; }

.archive-head { padding: 48px 0 32px; }
.archive-head h1 { --display: "Anybody", "Anybody 800 125", "Instrument Sans", system-ui, sans-serif; font: 800 clamp(2.6rem, 8vw, 5rem)/0.95 var(--display); font-variation-settings: "wdth" 125; margin: 0 0 12px; }

.empty { color: var(--slate); padding: 32px 0; }

/* ---------------------------------------------------------------- brand page */
.brand-hero { padding: 56px 0 24px; }
.brand-hero h1 { --display: "Anybody", "Anybody 800 118", "Instrument Sans", system-ui, sans-serif; font: 800 clamp(2.4rem, 6.4vw, 4.6rem)/0.95 var(--display); font-variation-settings: "wdth" 118; margin: 0; letter-spacing: -0.01em; }
.brand-lede { font-size: clamp(1.2rem, 2.2vw, 1.45rem); line-height: 1.4; max-width: 30ch; margin: 18px 0 0; font-weight: 500; }
.mark-stage { margin: 44px 0 0; }
.mark-play { display: block; width: min(100%, 720px); height: auto; overflow: visible; }
.mark-dim { stroke: var(--line); }
.mark-lit { stroke: var(--cobalt); }
.mark-stage:not(.is-playing) .mark-dim { stroke: var(--cobalt); }
.mark-notes text { font: 500 1.35px var(--mono); fill: var(--slate); transition: fill 120ms; }
.mark-notes text.is-on { fill: var(--cobalt); }
.mark-stage figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 18px; color: var(--slate); font-size: 0.95rem; }
.mark-audio { max-width: 100%; }
.mark-play-button { font-size: 1.05rem; padding: 13px 22px; }
/* the button replaces the plain audio player from the first paint when scripts run (wl-js) */
.mark-play-button { display: none; }
.wl-js .mark-play-button { display: inline-flex; }
.wl-js .mark-audio { display: none; }

.brand-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 88px; padding-top: 48px; }
.brand-section h2 { --display: "Anybody", "Anybody 700 100", "Instrument Sans", system-ui, sans-serif; font: 700 clamp(1.8rem, 4vw, 2.6rem)/1.05 var(--display); margin: 0 0 14px; }
.section-intro { color: var(--slate); max-width: var(--measure); margin: 0 0 28px; }

.readings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 28px; }
.readings > div > :first-child { display: block; height: 90px; width: auto; max-width: 100%; margin-bottom: 18px; }
.reading-mark { color: var(--ink); }
.readings .contour { width: 100%; }
.reading-letter { font: 800 90px/90px var(--display); font-variation-settings: "wdth" 120; color: var(--ink); }
.readings h3 { --display: "Anybody", "Anybody 700 110", "Instrument Sans", system-ui, sans-serif; font: 700 1.25rem/1.2 var(--display); font-variation-settings: "wdth" 110; margin: 0 0 6px; }
.readings p { margin: 0; color: var(--slate); }

.construction-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.construction-grid .figure { margin: 0; }
.construction { display: block; width: 100%; height: auto; }
.c-clear { fill: var(--area); }
.c-grid { stroke: var(--line); stroke-width: 0.03; }
.c-grid.major { stroke-width: 0.07; }
.c-centre { stroke: var(--amber); stroke-width: 0.08; stroke-dasharray: 0.4 0.3; }
.c-mark { stroke: var(--cobalt); opacity: 0.9; }
.c-spine { stroke: var(--paper); stroke-width: 0.08; }
.c-dim { stroke: var(--slate); stroke-width: 0.06; }
.c-label { font: 500 1.05px var(--mono); fill: var(--slate); }

.icon-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 28px 36px; }
.icon-row figure { margin: 0; }
.icon-row figcaption { color: var(--slate); font-size: 0.9rem; margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.pixel-zoom img { image-rendering: pixelated; display: block;
  /* the pixel grid over the enlarged favicon */
  background: repeating-linear-gradient(90deg, transparent 0 7px, var(--line) 7px 8px), repeating-linear-gradient(0deg, transparent 0 7px, var(--line) 7px 8px); }
.pixel-zoom { display: inline-block; position: relative; }
.pixel-zoom::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(255,255,255,.28) 7px 8px), repeating-linear-gradient(0deg, transparent 0 7px, rgba(255,255,255,.28) 7px 8px); border-radius: 22px; }

.lockups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lockup-tile { border-radius: var(--radius); padding: 44px 28px; display: grid; place-items: center; border: 1px solid var(--line); }
.lockup-tile img { width: 100%; max-width: 260px; height: auto; }
.on-paper { background: #eceef3; }
.on-ink { background: #1a1c2b; }
.on-cobalt { background: #2f4be0; border-color: #2f4be0; }

.swatches { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.swatches li { display: grid; gap: 4px; align-content: start; font-size: 0.95rem; }
.swatches span:last-child { color: var(--slate); font-size: 0.9rem; }
.swatches code { font: 0.85rem var(--mono); }
.swatch { height: 96px; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 8px;
  background: linear-gradient(135deg, var(--light) 0 50%, var(--dark) 50% 100%); }

.type-specimens { display: grid; gap: 36px; }
.specimen p { margin: 0 0 6px; max-width: var(--measure); }
.specimen p + p { color: var(--slate); }
.specimen-widths { font: 800 clamp(2.4rem, 7vw, 4.4rem)/1 var(--display); display: flex; flex-wrap: wrap; gap: 0.3em; max-width: none !important; }
.specimen-body { font-size: 1.5rem; }
.specimen-mono code { font: 1.25rem var(--mono); }

.donts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.donts li { display: grid; gap: 8px; color: var(--slate); font-size: 0.95rem; }
.donts svg { width: 100%; height: auto; color: var(--ink); background: var(--paper-2); border-radius: var(--radius); padding: 14px; box-sizing: border-box; overflow: visible; }
.donts path { stroke-linejoin: miter; }
.dont-x { stroke: #c2410c; stroke-width: 0.9; fill: none; }

.files { margin-top: 28px; }
.files td:last-child, .files th:last-child { text-align: right; white-space: nowrap; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .step, .skill-grid, .instrument-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .readings, .construction-grid, .lockups { grid-template-columns: minmax(0, 1fr); }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .donts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .song-row .song-link { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .song-row.has-download { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .song-row.has-download .song-link { padding-bottom: 12px; }
  .song-row .song-file { justify-self: start; margin-bottom: 24px; }
  .song-length { order: -1; font-size: 0.9rem; }
}
@media (max-width: 600px) {
  .song-head h1, .archive-head h1 { font-variation-settings: "wdth" 78; --display: "Anybody", "Anybody 800 78", "Instrument Sans", system-ui, sans-serif; }
}
@media (prefers-reduced-motion: reduce) {
  .wordmark span { transition: none; }
}

/* ---- wavelength serve demo (front page, parts/serve-demo.php): the review page as it looks, in its
   own dark tokens (ui/brand.css in the engine) whatever the site's theme. ---- */
.serve-wide { width: min(1320px, 100% - 2 * var(--gutter)); margin: 28px auto 0; }
.serve-demo {
  --sd-bg: #151826; --sd-panel: #1a1e2f; --sd-panel-2: #1f2334; --sd-line: #2f3448; --sd-text: #e4e7f0;
  --sd-muted: #9aa1b6; --sd-accent: #93a4ff; --sd-amber: #f2b33d; --sd-ok: #6fd3a8; --sd-button: #4058ee;
  --sd-body: "Instrument Sans", system-ui, sans-serif;
  color-scheme: dark;
  background: var(--sd-bg); color: var(--sd-text); font: 14px/1.45 var(--sd-body);
  border: 1px solid var(--sd-line); border-radius: 10px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(10, 12, 24, .35);
}
.sd-chrome { display: flex; align-items: center; gap: 7px; padding: 9px 14px; background: #10131f; border-bottom: 1px solid var(--sd-line); }
.sd-chrome span { width: 11px; height: 11px; border-radius: 50%; background: #3a3f55; }
.sd-chrome em { margin: 0 auto; font: 12px var(--mono); font-style: normal; color: var(--sd-muted); background: var(--sd-panel-2); padding: 2px 14px; border-radius: 5px; }
.sd-app { display: grid; grid-template-columns: 200px minmax(0, 1fr) 250px; min-height: 520px; }
.sd-songs { border-right: 1px solid var(--sd-line); padding: 14px 10px; }
.sd-brand { display: flex; align-items: center; gap: 8px; color: var(--sd-accent); padding: 0 6px 14px; }
.sd-brand svg { flex: none; }
.sd-brand span { font: 700 17px var(--display); color: var(--sd-text); font-stretch: 110%; }
.sd-live { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sd-ok); margin-left: auto; }
.sd-songs ul { list-style: none; margin: 0; padding: 0; }
.sd-songs button { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; gap: 8px; width: 100%;
  padding: 7px 10px; border-radius: 6px; cursor: pointer; color: var(--sd-text); font-size: 13.5px; }
.sd-songs button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-songs button small { color: var(--sd-muted); font: 11px var(--mono); flex: none; }
.sd-songs button:hover { background: var(--sd-panel-2); }
.sd-songs button[aria-current] { background: var(--sd-panel-2); box-shadow: inset 2px 0 var(--sd-accent); }
.sd-songs button:focus-visible, .serve-demo button:focus-visible { outline: 2px solid var(--sd-accent); outline-offset: 1px; }
.sd-main { padding: 16px 18px; min-width: 0; }
.sd-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sd-title { margin: 0; font: 800 26px/1.1 var(--display); font-stretch: 112%; color: var(--sd-text); }
.sd-badge { font-size: 12px; color: var(--sd-ok); background: rgba(111, 211, 168, .12); padding: 3px 9px; border-radius: 999px; }
.sd-open { margin-left: auto; font-size: 12.5px; color: var(--sd-accent); }
.sd-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.sd-stats div { background: var(--sd-panel); border: 1px solid var(--sd-line); border-radius: 6px; padding: 6px 12px; min-width: 64px; }
.sd-stats dt { order: 2; font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--sd-muted); }
.sd-stats dd { margin: 0; font: 700 19px var(--display); font-stretch: 105%; color: var(--sd-text); }
.sd-stats div { display: flex; flex-direction: column-reverse; }
.sd-card { background: var(--sd-panel); border: 1px solid var(--sd-line); border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
.sd-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--sd-line); }
.sd-card h4, .sd-panel h4 { margin: 0; font: 700 15px var(--display); font-stretch: 105%; color: var(--sd-text); }
.sd-files { font: 11.5px var(--mono); color: var(--sd-muted); }
.sd-transport { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.sd-play { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; background: var(--sd-button); color: #fff; display: grid; place-items: center; }
.sd-play svg { fill: currentColor; }
.sd-play .icon-pause, .serve-demo.is-playing .sd-play .icon-play { display: none; }
.serve-demo.is-playing .sd-play .icon-pause { display: inline; }
.sd-time { font: 13px var(--mono); color: var(--sd-text); white-space: nowrap; }
.sd-file { font: 12.5px var(--sd-body); color: var(--sd-muted); border: 1px solid var(--sd-line); border-radius: 5px; padding: 3px 10px; }
.sd-lanes canvas { display: block; width: 100%; height: 300px; cursor: crosshair; touch-action: pan-y; user-select: none; -webkit-user-select: none; border-top: 1px solid var(--sd-line); }
.sd-sections ol { list-style: none; margin: 0; padding: 8px 6px; columns: 2 220px; column-gap: 16px; }
.sd-sections button { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 7.5em 1fr 3.4em; align-items: center; gap: 10px;
  width: 100%; padding: 4px 8px; border-radius: 5px; cursor: pointer; font-size: 13px; color: var(--sd-text); break-inside: avoid; }
.sd-sections button:hover { background: var(--sd-panel-2); }
.sd-sections button[aria-pressed] { background: rgba(242, 179, 61, .12); }
.sd-sname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-bar { height: 7px; border-radius: 4px; background: var(--sd-panel-2); overflow: hidden; }
.sd-bar i { display: block; height: 100%; background: var(--sd-accent); border-radius: 4px; }
.sd-sections button[aria-pressed] .sd-bar i { background: var(--sd-amber); }
.sd-lufs { font: 12px var(--mono); color: var(--sd-muted); text-align: right; }
.sd-side { border-left: 1px solid var(--sd-line); }
.sd-panel { padding: 14px 16px; border-bottom: 1px solid var(--sd-line); }
.sd-panel p { margin: 8px 0 0; font-size: 13px; color: var(--sd-muted); }
.sd-picked-what { color: var(--sd-text) !important; }
.sd-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sd-actions button, .sd-save { all: unset; cursor: pointer; font-size: 13px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--sd-line); color: var(--sd-text); }
.sd-preview { background: #b98320 !important; border-color: #b98320 !important; color: #151826 !important; font-weight: 600; }
.sd-panel textarea { box-sizing: border-box; width: 100%; margin-top: 10px; resize: none; background: var(--sd-bg); color: var(--sd-text);
  border: 1px solid var(--sd-line); border-radius: 6px; padding: 8px 10px; font: 13px var(--sd-body); }
.sd-panel textarea:disabled { opacity: .6; cursor: not-allowed; }
.sd-panel textarea:focus-visible { outline: 2px solid var(--sd-accent); outline-offset: 1px; }
.sd-save { margin-top: 8px; background: var(--sd-button); border-color: var(--sd-button); color: #fff; }
.sd-save:disabled { opacity: .5; cursor: not-allowed; }
.sd-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; }
.sd-panel-head h4 { white-space: nowrap; }
.sd-count { font: 11px var(--mono); color: var(--sd-muted); }
.sd-comments { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.sd-c { background: var(--sd-bg); border: 1px solid var(--sd-line); border-left: 2px solid var(--sd-accent); border-radius: 6px; padding: 8px 10px; }
.sd-c.is-done { border-left-color: var(--sd-ok); }
.sd-c-ref { all: unset; cursor: pointer; display: block; font: 11px/1.4 var(--mono); color: var(--sd-accent); }
.sd-c-ref:hover { text-decoration: underline; }
.sd-c-text { margin: 4px 0 0 !important; color: var(--sd-text) !important; font-size: 13px; overflow-wrap: anywhere; white-space: pre-line; }
.sd-c-reply { margin: 6px 0 0 !important; padding-left: 8px; border-left: 2px solid var(--sd-ok); font-size: 12.5px !important; }
.sd-c-reply b { color: var(--sd-ok); font-weight: 600; }
.sd-c-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--sd-muted); }
.sd-c-state { margin-right: auto; }
.sd-c-state.is-busy::before, .sd-log .is-busy i { animation: sd-pulse 1s ease-in-out infinite; }
.sd-c-state.is-busy::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--sd-amber); vertical-align: 1px; }
.sd-c-meta button { all: unset; cursor: pointer; color: var(--sd-muted); }
.sd-c-meta button:hover { color: var(--sd-text); text-decoration: underline; }
.sd-log { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font: 11.5px/1.4 var(--mono); color: var(--sd-muted); }
.sd-log li { display: flex; gap: 8px; align-items: baseline; }
.sd-log li:last-child { color: var(--sd-text); }
.sd-log i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--sd-ok); transform: translateY(-1px); }
.sd-log .is-busy i { background: var(--sd-amber); }
@keyframes sd-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .sd-c-state.is-busy::before, .sd-log .is-busy i { animation: none; } }
.serve-caption { margin: 12px 0 0; font-size: 14px; color: var(--slate); }
@media (max-width: 1080px) {
  .sd-app { grid-template-columns: 190px minmax(0, 1fr); }
  /* the side panel moves under the arrangement, so selections and comments still work */
  .sd-side { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--sd-line); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
  .sd-panel { border-bottom: 0; border-right: 1px solid var(--sd-line); }
}
@media (max-width: 720px) {
  .sd-app { grid-template-columns: minmax(0, 1fr); }
  .sd-panel { border-right: 0; border-bottom: 1px solid var(--sd-line); }
  .sd-songs { border-right: 0; border-bottom: 1px solid var(--sd-line); padding: 10px; }
  .sd-songs ul { display: flex; gap: 4px; overflow-x: auto; }
  .sd-songs li { flex: none; }
  .sd-songs button small { display: none; }
  .sd-main { padding: 12px; }
  .sd-open { margin-left: 0; }
  .sd-file { display: none; }
  .sd-title { font-size: 21px; overflow-wrap: anywhere; }
  .sd-brand { padding-bottom: 10px; }
  .sd-live { margin-left: 8px; }
}
