/* Sound Lab's page (slop.kitchen/soundlab, tools/soundlab.mjs): the app's own look, not LAST LIGHT's. Its dark
   slate panels, the mint of PLAYING and of a lit step, the amber of a hit pad and the analyzer's spectrogram
   colours; plain system type with monospaced labels, like the hardware it imitates. The slop.kitchen
   wordmark uses the main site's display font. */
@font-face {
  font-family: "Exo 2";
  src: url("/fonts/Exo-2-Bold-Italic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
:root {
  --bg: #0e141b;
  --panel: #151e28;
  --panel-2: #1b2733;
  --border: rgba(160, 190, 210, 0.15);
  --text: #e6eef2;
  --muted: #93a4b1;
  --mint: #6fe3b4;
  --mint-deep: #2f9e78;
  --amber: #f2a65a;
  --magenta: #c2367c;
  --violet: #5b1a8a;
  --orange: #f57c2c;
  --yellow: #fcd34d;
  --red: #ff6b6b;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --max: 980px;
  --gap: 6px;
  /* templates/mixtape.css reads these */
  --cyan: var(--mint);
  --ember: var(--amber);
  --display: var(--sans);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  font: 17px/1.6 var(--sans);
  color: var(--text);
  background-color: var(--bg);
  /* the sequencer's grid, faintly, under a glow in the spectrogram's colours */
  background-image:
    radial-gradient(900px 420px at 78% -8%, rgba(194, 54, 124, 0.22), transparent 65%),
    radial-gradient(700px 380px at 12% -12%, rgba(91, 26, 138, 0.3), transparent 62%),
    linear-gradient(rgba(160, 190, 210, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 190, 210, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
}

a { color: var(--mint); text-underline-offset: 3px; }
a:hover { color: #b9f5dc; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.86em; background: rgba(160, 190, 210, 0.1); padding: 0.1em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }
b, strong { font-weight: 700; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--mint); color: #06231a; padding: 8px 14px; z-index: 10; }
.skip:focus { left: 12px; top: 12px; }

main > section { max-width: var(--max); margin: 0 auto; padding: 44px 20px; }
h2 {
  margin: 0 0 0.8em; font: 700 0.95rem/1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint);
  display: flex; align-items: center; gap: 12px;
}
h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.note { color: var(--muted); font-size: 0.92rem; }

/* ---------- the bar at the top ---------- */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; max-width: var(--max); margin: 0 auto; padding: 16px 20px; }
.mark { white-space: nowrap; color: var(--text); text-decoration: none; font: italic 700 1.15rem/1.6 "Exo 2", "Trebuchet MS", system-ui, sans-serif; }
.mark:hover { color: var(--text); }
.bar nav { display: flex; gap: 18px; margin-left: auto; }
.bar nav a { color: var(--muted); text-decoration: none; font: 600 0.82rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.bar nav a:hover { color: var(--text); }

/* ---------- the hero ---------- */
.hero { padding-top: 48px; padding-bottom: 24px; }
.eyebrow { margin: 0 0 10px; font: 600 0.8rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); }
.hero h1 { margin: 0; font: 800 clamp(3rem, 10vw, 5.6rem)/0.95 var(--sans); letter-spacing: -0.02em; color: #fff; }
.lead { max-width: 640px; margin: 0.8em 0 1.4em; color: #c9d6de; font-size: 1.12rem; }

/* sixteen steps of a beat, as the SEQUENCER draws them, with a playhead at 104 BPM */
.steps-row { position: relative; display: grid; grid-template-columns: repeat(16, 1fr); gap: var(--gap); max-width: 640px; margin: 0 0 28px; }
.steps-row i { height: 22px; border-radius: 3px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--border); }
.steps-row i:nth-child(4n + 1) { background: #233140; }
.steps-row i.on { background: var(--orange); box-shadow: none; }
.steps-row i.snare { background: var(--magenta); box-shadow: none; }
.steps-row i.hat { background: rgba(252, 211, 77, 0.5); box-shadow: none; }
.steps-row::after {
  content: ""; position: absolute; top: -4px; bottom: -4px; left: 0; width: calc((100% - 15 * var(--gap)) / 16);
  border: 2px solid var(--mint); border-radius: 5px; animation: sweep 2.31s steps(16, end) infinite;
}
@keyframes sweep { to { left: calc(100% + var(--gap)); } }
@media (prefers-reduced-motion: reduce) { .steps-row::after { display: none; } }

.btn {
  display: inline-block; padding: 13px 24px; border: 0; border-radius: 10px; cursor: pointer; line-height: 1.2;
  background: var(--mint); color: #06231a; font: 700 1.05rem var(--sans); text-decoration: none;
  box-shadow: 0 0 0 1px rgba(111, 227, 180, 0.4), 0 8px 24px -10px rgba(111, 227, 180, 0.6);
}
.btn:hover { color: #06231a; background: #8af0c6; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.get .btn, .get .mx-toggle { margin: 5px 8px 5px 0; vertical-align: middle; }
/* Install with Mixtape (templates/mixtape.css) in Sound Lab's colours */
details.mixtape > .mx-toggle { border-radius: 10px; border-color: var(--mint); background: rgba(111, 227, 180, 0.07); font: 700 1.05rem/1.2 var(--sans); }
details.mixtape > .mx-toggle:hover, details.mixtape[open] > .mx-toggle { background: rgba(111, 227, 180, 0.15); }
.mx-panel .mx-copy { background: rgba(111, 227, 180, 0.1); }
.mx-panel .mx-copy:hover { background: rgba(111, 227, 180, 0.2); }
.mx-panel .mx-line code, .mx-file { background: rgba(6, 10, 14, 0.7); }
.hero .note { margin-top: 1em; }

/* ---------- the stills ---------- */
.stills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding-top: 16px; }
.stills figure { margin: 0; }
.stills a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.stills a:hover { border-color: var(--mint); }
.stills img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; }
.stills figcaption { margin-top: 8px; color: var(--muted); font-size: 0.92rem; }
.stills figcaption b { margin-right: 8px; color: var(--text); font: 700 0.76rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.stills > .note { grid-column: 1 / -1; margin: 0; }

/* ---------- inside ---------- */
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.facts li { position: relative; padding: 12px 16px 12px 40px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; color: #c9d6de; }
.facts li::before { content: ""; position: absolute; left: 16px; top: 1.15em; width: 12px; height: 12px; border-radius: 3px; background: var(--mint); }
.facts li:nth-child(3n + 2)::before { background: var(--magenta); }
.facts li:nth-child(3n)::before { background: var(--amber); }
.facts b { color: var(--text); }

/* ---------- install ---------- */
.numbered { counter-reset: step; list-style: none; margin: 1em 0; padding: 0; }
.numbered > li { counter-increment: step; position: relative; margin: 0 0 14px; padding-left: 44px; min-height: 28px; }
.numbered > li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0.05em; width: 30px; height: 26px; border-radius: 6px;
  display: grid; place-items: center; background: var(--panel-2); color: var(--mint); font: 700 0.78rem var(--mono); box-shadow: inset 0 0 0 1px var(--border);
}
.platform { margin: 0.6em 0; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.platform summary { cursor: pointer; font-weight: 600; color: var(--text); }
.platform p { margin: 0.65em 0 0; color: #c9d6de; }
.caution { margin: 1.4em 0 0; padding: 12px 16px; border-left: 3px solid var(--amber); background: rgba(242, 166, 90, 0.08); border-radius: 0 10px 10px 0; color: #e9d3bd; }
.caution b { margin-right: 8px; color: var(--amber); font: 700 0.76rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- feedback (templates/feedback.html) ---------- */
.form { max-width: 640px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; }
.row { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.opt { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: #0a1016; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
textarea { resize: vertical; }
#f-log { font-family: var(--mono); font-size: 0.82rem; }
input:focus, select:focus, textarea:focus { border-color: var(--mint); outline: none; }
[aria-invalid="true"] { border-color: var(--red); }
.err { color: var(--red); font-size: 0.86rem; margin: 4px 0 0; }
.err:empty { display: none; }
details.log summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { min-height: 65px; max-width: 100%; overflow: hidden; }
.actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.actions .note { margin: 0; }
.status { margin: 6px 0 0; font-weight: 600; }
.status.ok { color: var(--mint); }
.status.bad { color: var(--red); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); text-align: center; padding: 26px 20px 40px; color: var(--muted); font-size: 0.92rem; }
.footer p { margin: 0.3em auto; }
.footer a { color: var(--text); }

@media (max-width: 700px) {
  .stills { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  main > section, .bar { padding-left: 16px; padding-right: 16px; }
  .bar { gap: 12px; }
  .bar nav { gap: 10px; }
  .bar nav a { font-size: 0.72rem; letter-spacing: 0.04em; }
  .hero { padding-top: 28px; }
  :root { --gap: 3px; }
  .steps-row i { height: 16px; }
  .form { padding: 18px 14px; }
}
