/* ─────────────────────────────────────────────────────────────────────────
   rusty-amp · GitHub Pages
   A terminal / TUI-inspired theme that mirrors the app's livery.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* surfaces */
  --bg:          #0a0806;
  --bg-soft:     #100b08;
  --panel:       #0d0a07;
  --panel-soft:  #120d09;

  /* borders */
  --border:        #5a3f28;
  --border-dim:    #3a2a1c;
  --border-bright: #ff7b3d;

  /* rust / brand */
  --rust:        #ff7b3d;
  --rust-light:  #ffb070;
  --rust-dark:   #d9531f;
  --tube:        #ffe6c4;

  /* text */
  --text:   #d8cfc4;
  --muted:  #9c8979;
  --faint:  #6b5d50;

  /* signal colours (mirrors the TUI pedal livery) */
  --green:   #7ec96f;
  --meter:   #6cc04a;
  --amber:   #d4a73a;
  --gold:    #d4b24a;
  --blue:    #5b9bd5;
  --purple:  #b07cd6;
  --teal:    #4ec9c0;
  --gray:    #9aa0a6;
  --lime:    #b6d44a;
  --magenta: #e06b9c;
  --indigo:  #7a7ce0;
  --pink:    #eb78be;
  --cyan:    #3cd2eb;
  --yellow:  #e6cd41;
  --steel:   #7e97b3;
  --orchid:  #c355cd;

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;

  --maxw: 1120px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(120% 90% at 50% 0%, #1a130e 0%, #100b08 45%, #070605 100%) fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint CRT scanlines over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.018) 0px,
    rgba(255, 255, 255, 0.018) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

a { color: var(--rust); text-decoration: none; }
a:hover { color: var(--rust-light); text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; }

::selection { background: rgba(255, 123, 61, 0.3); color: #fff; }

/* ── layout ─────────────────────────────────────────────────────────────── */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

main { padding: 40px 0 80px; }

section { margin: 0 0 56px; }

/* ── top navigation ─────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 8, 6, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-dim);
}
.nav .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 56px;
}
.nav__brand {
  font-weight: 700;
  color: var(--rust);
  font-size: 16px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.nav__brand:hover { text-decoration: none; color: var(--rust-light); }
.nav__brand::before { content: "🎸 "; }
.nav__links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}
.nav__links a {
  color: var(--muted);
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 13.5px;
  white-space: nowrap;
}
.nav__links a:hover { color: var(--text); background: rgba(255, 123, 61, 0.08); text-decoration: none; }
.nav__links a.is-active { color: var(--rust); background: rgba(255, 123, 61, 0.1); }
.nav__gh {
  border: 1px solid var(--border);
  color: var(--text) !important;
}
.nav__burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 18px;
  border-radius: 6px;
  padding: 2px 10px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav__burger { display: block; }
  .nav__links {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border-dim);
    padding: 8px 16px 16px;
    margin: 0;
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 10px 8px; font-size: 15px; }
}

/* ── panels (the boxed TUI look) ────────────────────────────────────────── */

.panel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-soft), var(--panel));
  padding: 26px 26px 22px;
  margin: 22px 0;
}
/* label that rides the top border, like ┤ TITLE ├ */
.panel > .panel__label {
  position: absolute;
  top: -0.72em;
  left: 18px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--rust);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.panel--accent { border-color: var(--accent, var(--rust)); }
.panel--accent > .panel__label { color: var(--accent, var(--rust)); }

/* ── headings ───────────────────────────────────────────────────────────── */

h1, h2, h3, h4 { line-height: 1.25; color: #fff; font-weight: 700; }
h1 { font-size: 30px; margin: 0 0 10px; }
h2 {
  font-size: 23px;
  margin: 36px 0 18px;
  color: var(--rust-light);
}
/* Markdown `## Heading` → terminal-style "## " prefix (matches the app's vibe). */
main h2::before { content: "## "; color: var(--faint); font-weight: 400; }
h2 .pfx { color: var(--faint); font-weight: 400; }
h3 { font-size: 18px; margin: 28px 0 10px; color: var(--text); }
h4 { font-size: 15px; margin: 18px 0 6px; color: var(--muted); }

.eyebrow {
  color: var(--rust);
  font-size: 12.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.lead { font-size: 17px; color: var(--muted); max-width: 64ch; }

p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ── hero ───────────────────────────────────────────────────────────────── */

.hero { padding: 56px 0 24px; text-align: center; }
.hero h1 {
  font-size: clamp(38px, 7vw, 72px);
  background: linear-gradient(180deg, var(--rust-light) 0%, var(--rust) 55%, var(--rust-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 38px rgba(255, 123, 61, 0.25);
  margin-bottom: 6px;
}
.hero .tagline { font-size: clamp(15px, 2.6vw, 21px); color: var(--muted); margin-bottom: 8px; }
.hero .tagline .term { color: var(--rust); }
.hero .blurb { max-width: 70ch; margin: 18px auto 26px; color: var(--text); }

.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 20px;
  color: var(--text);
  font-weight: 600;
  font-size: 14.5px;
  background: var(--panel-soft);
  transition: border-color .15s, transform .1s, color .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary {
  border-color: var(--rust);
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 123, 61, 0.22), rgba(255, 123, 61, 0.06));
}
.btn--primary:hover { border-color: var(--rust-light); color: #fff; box-shadow: 0 0 24px rgba(255, 123, 61, 0.25); }

/* power LED dot */
.led {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--meter);
  box-shadow: 0 0 8px var(--meter);
  vertical-align: middle;
}

/* screenshot frame */
.shot {
  margin: 30px auto 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 123, 61, 0.06);
}
.shot img { display: block; border-radius: 6px; }
.shot__bar { display: flex; gap: 6px; padding: 4px 6px 10px; }
.shot__bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.shot__bar i:nth-child(1) { background: #ff5f56; }
.shot__bar i:nth-child(2) { background: #ffbd2e; }
.shot__bar i:nth-child(3) { background: #27c93f; }

/* ── feature grid ───────────────────────────────────────────────────────── */

.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.card {
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
  transition: border-color .15s, transform .12s;
}
.card:hover { border-color: var(--border); transform: translateY(-2px); }
.card .ico { font-size: 22px; }
.card h3 { margin: 8px 0 6px; font-size: 16px; color: #fff; }
.card p { font-size: 13.5px; color: var(--muted); margin: 0; }

/* ── pedal chips ────────────────────────────────────────────────────────── */

.chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  font-size: 13px;
  color: var(--muted);
  justify-content: center;
  margin: 0 auto;
  max-width: 80ch;
}
.chain b { color: var(--rust); font-weight: 600; }
.chain .arr { color: var(--faint); }

.pedalgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .pedalgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .pedalgrid { grid-template-columns: 1fr; } }

.pedal {
  --c: var(--rust);
  border: 1px solid color-mix(in srgb, var(--c) 55%, #000);
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, var(--panel)), var(--panel));
  padding: 14px 16px;
}
.pedal__name {
  color: var(--c);
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.pedal__name .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.pedal__knobs { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.pedal__desc { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ── audio samples ──────────────────────────────────────────────────────── */

.samplegrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 18px; }
@media (max-width: 680px) { .samplegrid { grid-template-columns: 1fr; } }

.sample {
  --c: var(--rust);
  border: 1px solid color-mix(in srgb, var(--c) 40%, var(--border-dim));
  border-radius: 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 8%, var(--panel)), var(--panel));
  padding: 16px 18px;
}
.sample__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.sample__name { color: var(--c); font-weight: 700; font-size: 15px; letter-spacing: 0.3px; }
.sample__rig { color: var(--faint); font-size: 11.5px; }
.sample__desc { color: var(--muted); font-size: 12.5px; margin: 4px 0 12px; }

.sample audio {
  width: 100%;
  height: 34px;
  accent-color: var(--c);
  border-radius: 6px;
}

.sample--soon {
  border-style: dashed;
  border-color: var(--border-dim);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 92px;
}
.sample--soon .sample__name { color: var(--faint); }
.sample--soon .sample__desc { margin-bottom: 0; }

/* ── tables ─────────────────────────────────────────────────────────────── */

.tbl-wrap { overflow-x: auto; margin: 14px 0; border-radius: 8px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 460px;
}
th, td {
  text-align: left;
  padding: 9px 13px;
  border-bottom: 1px solid var(--border-dim);
  vertical-align: top;
}
thead th {
  color: var(--rust);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 123, 61, 0.04);
}
tbody tr:hover { background: rgba(255, 255, 255, 0.018); }
td code, th code { white-space: nowrap; }

/* keycap */
kbd, .key {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
  color: var(--tube);
  background: #1c140f;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 7px;
  white-space: nowrap;
}

/* ── code blocks ────────────────────────────────────────────────────────── */

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(255, 123, 61, 0.09);
  color: var(--rust-light);
  padding: 1px 6px;
  border-radius: 4px;
}
pre {
  position: relative;
  background: #060504;
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.6;
}
pre::before {
  content: attr(data-lang);
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--faint);
}
pre code { background: none; color: #cbb9a8; padding: 0; font-size: 13px; }

/* ── callouts ───────────────────────────────────────────────────────────── */

.note {
  border-left: 3px solid var(--rust);
  background: rgba(255, 123, 61, 0.06);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  font-size: 13.5px;
  color: var(--text);
}
.note b { color: var(--rust-light); }
.note--info { border-left-color: var(--blue); background: rgba(91, 155, 213, 0.07); }
.note--info b { color: var(--blue); }

/* ── knob illustration ──────────────────────────────────────────────────── */

.knobrow { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; margin: 8px 0 6px; }
.knob { text-align: center; width: 92px; }
.knob__dial {
  width: 56px; height: 56px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #2a201a, #120c09 70%);
  border: 1px solid var(--border);
  position: relative;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.05);
}
.knob__dial::after {
  content: "";
  position: absolute;
  width: 2.5px; height: 18px;
  background: var(--rust);
  border-radius: 2px;
  top: 6px; left: 50%;
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(var(--r, 0deg));
  box-shadow: 0 0 6px var(--rust);
}
.knob__lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.knob__val { color: var(--rust); font-weight: 700; font-size: 14px; }

/* ── definition list / steps ────────────────────────────────────────────── */

ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 14px 0; }
ol.steps li {
  position: relative;
  padding: 4px 0 14px 42px;
  border-left: 1px solid var(--border-dim);
  margin-left: 14px;
}
ol.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -14px; top: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--rust);
  color: var(--rust);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
}
ol.steps li:last-child { border-left-color: transparent; }

ul.clean { list-style: none; padding: 0; margin: 12px 0; }
ul.clean li { padding: 5px 0 5px 22px; position: relative; }
ul.clean li::before { content: "▸"; position: absolute; left: 0; color: var(--rust); }

/* ── page header / toc on inner pages ───────────────────────────────────── */

.page-head { padding: 22px 0 14px; border-bottom: 1px solid var(--border-dim); margin-bottom: 30px; }
.page-head .eyebrow { margin-bottom: 6px; }

.toc {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.toc a {
  font-size: 12.5px;
  color: var(--muted);
  border: 1px solid var(--border-dim);
  border-radius: 20px;
  padding: 4px 13px;
}
.toc a:hover { color: var(--rust); border-color: var(--border); text-decoration: none; }

/* next / prev */
.pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 50px; flex-wrap: wrap; }
.pager a {
  flex: 1 1 240px;
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 14px 18px;
  background: var(--panel);
}
.pager a:hover { border-color: var(--border); text-decoration: none; }
.pager .dir { font-size: 11px; color: var(--faint); letter-spacing: 1px; text-transform: uppercase; }
.pager .ttl { color: var(--text); font-weight: 600; }
.pager .next { text-align: right; }

/* ── footer ─────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border-dim);
  padding: 30px 0 50px;
  color: var(--muted);
  font-size: 13px;
}
footer .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
footer a { color: var(--muted); }
footer a:hover { color: var(--rust); }

/* meter strip decoration */
.meter {
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg,
    var(--meter) 0%, var(--meter) 68%, var(--amber) 68%, var(--amber) 86%, var(--border-dim) 86%);
  margin: 18px 0;
  opacity: 0.85;
}

hr { border: none; border-top: 1px solid var(--border-dim); margin: 36px 0; }

/* ── signal-chain flow (the "Full signal chain" diagram) ─────────────────── */

.flow { margin: 26px 0 10px; }

.flow__stage {
  --c: var(--rust);
  position: relative;
  padding: 0 0 16px 40px;
  margin-left: 9px;
  border-left: 2px solid var(--border-dim);
}
.flow__stage:last-child { border-left-color: transparent; padding-bottom: 0; }

/* the node sitting on the rail */
.flow__stage::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 14px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--c);
  box-shadow: 0 0 10px color-mix(in srgb, var(--c) 70%, transparent);
  z-index: 1;
}
/* little down-arrow on the rail between nodes — centered on the node/rail axis */
.flow__stage::after {
  content: "▼";
  position: absolute;
  left: -9px;
  width: 16px;
  text-align: center;
  bottom: -4px;
  font-size: 9px;
  line-height: 1;
  color: var(--border);
}
.flow__stage:last-child::after { content: none; }

.flow__card {
  border: 1px solid color-mix(in srgb, var(--c) 38%, var(--border-dim));
  border-radius: 9px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 8%, var(--panel)), var(--panel));
  padding: 12px 16px;
  transition: border-color .15s, transform .12s;
}
.flow__card:hover { border-color: color-mix(in srgb, var(--c) 65%, #000); transform: translateX(2px); }

.flow__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.flow__name {
  color: var(--c);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.4px;
}
.flow__tag { color: var(--faint); font-size: 12px; font-weight: 400; }

.flow__badge {
  font-size: 9.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid currentColor;
  opacity: 0.85;
}
.flow__badge--bypass { color: var(--faint); }
.flow__badge--live   { color: var(--green); }
.flow__badge--mono   { color: var(--amber); }
.flow__badge--stereo { color: var(--blue); }

/* the DSP detail line(s) — a faint monospace "signal path" */
.flow__sig {
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.flow__sig .op { color: color-mix(in srgb, var(--c) 75%, var(--faint)); padding: 0 1px; }
.flow__sig .os { color: var(--c); font-weight: 600; }

.flow__sub {
  margin-top: 7px;
  padding-left: 12px;
  border-left: 2px solid color-mix(in srgb, var(--c) 30%, var(--border-dim));
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.flow__sub b { color: var(--c); font-weight: 600; }

/* endpoints (Guitar in, Output out) read as solid pills, not effects */
.flow__stage--io { --c: var(--rust-light); }
.flow__stage--io .flow__card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, var(--panel)), var(--panel));
  border-color: color-mix(in srgb, var(--c) 55%, #000);
}

@media (max-width: 520px) {
  .flow__stage { padding-left: 30px; }
}

/* ── tabbed selectors (amps & cabinets) ──────────────────────────────────── */

.selector { --c: var(--rust); margin: 18px 0 8px; }

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 620px) { .tiles { grid-template-columns: 1fr; } }

.tile {
  appearance: none;
  text-align: left;
  font-family: var(--mono);
  cursor: pointer;
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--panel-soft), var(--panel));
  padding: 14px 16px;
  color: var(--text);
  transition: border-color .15s, transform .12s, box-shadow .15s;
}
.tile:hover { transform: translateY(-2px); border-color: var(--border); }
.tile:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.tile.is-active {
  border-color: var(--c);
  box-shadow: 0 0 0 1px var(--c), 0 0 26px color-mix(in srgb, var(--c) 26%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 12%, var(--panel)), var(--panel));
}
.tile__name { font-weight: 700; font-size: 15px; color: #fff; letter-spacing: 0.3px; }
.tile.is-active .tile__name { color: var(--c); }
.tile__sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.tile__dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
  margin-right: 8px;
  vertical-align: middle;
}

/* faux amp-head control strip */
.tile__amp { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.tile__amp i {
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #2a201a, #100b08 72%);
  border: 1px solid var(--border);
  position: relative;
}
.tile__amp i::after {
  content: ""; position: absolute; left: 50%; top: 1px;
  width: 1.5px; height: 5px; background: var(--c); border-radius: 2px;
  transform: translateX(-50%) rotate(var(--r, 0deg)); transform-origin: bottom center;
}

/* faux 4×12 grille */
.tile__cab {
  margin-top: 12px; height: 30px; border-radius: 5px;
  border: 1px solid var(--border-dim);
  background:
    repeating-linear-gradient(90deg, transparent 0 4px, rgba(0,0,0,.45) 4px 6px),
    linear-gradient(180deg, #161009, #0c0805);
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* spec grid inside a panel */
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 18px;
}
@media (max-width: 620px) { .specs { grid-template-columns: 1fr; } }
.spec {
  border: 1px solid var(--border-dim);
  border-left: 2px solid var(--c);
  border-radius: 0 8px 8px 0;
  padding: 9px 13px;
  background: var(--panel);
}
.spec__k { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--c); }
.spec__v { font-size: 13px; color: var(--text); margin-top: 2px; }

/* knob / value rows */
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 6px 14px; padding: 8px 0; border-bottom: 1px solid var(--border-dim); }
.kv:last-child { border-bottom: none; }
.kv__k { color: var(--c); font-weight: 700; font-size: 13px; }
.kv__v { color: var(--muted); font-size: 13px; }
.kv__r {
  display: inline-block;
  font-size: 10.5px;
  color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 40%, var(--border-dim));
  border-radius: 20px;
  padding: 0 8px;
  margin-right: 8px;
  white-space: nowrap;
}

/* frequency chips for cabinets */
.freqs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.freq {
  font-size: 12px;
  border: 1px solid color-mix(in srgb, var(--c) 40%, var(--border-dim));
  background: color-mix(in srgb, var(--c) 8%, var(--panel));
  color: var(--text);
  border-radius: 20px;
  padding: 4px 12px;
}
.freq b { color: var(--c); }

/* ── mic knob cards ──────────────────────────────────────────────────────── */

.miccards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0 8px;
}
@media (max-width: 680px) { .miccards { grid-template-columns: 1fr; } }

.miccard {
  --c: var(--teal);
  border: 1px solid color-mix(in srgb, var(--c) 32%, var(--border-dim));
  border-radius: 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, var(--panel)), var(--panel));
  padding: 18px 16px 16px;
}
.miccard__top { display: flex; align-items: center; gap: 14px; }
.miccard .knob__dial { margin: 0; flex: none; }
.miccard .knob__dial::after { background: var(--c); box-shadow: 0 0 6px var(--c); }
.miccard__id { text-align: left; }
.miccard__name { color: var(--c); font-weight: 700; font-size: 15px; letter-spacing: 0.4px; }
.miccard__range { font-size: 11px; color: var(--faint); margin-top: 2px; }

.miccard__bar {
  position: relative;
  height: 6px;
  border-radius: 4px;
  margin: 16px 0 6px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--c) 20%, var(--bg)),
    var(--c));
  opacity: 0.9;
}
/* marker showing the ship-default position — matches the dial's arrow */
.miccard__mark {
  position: absolute;
  top: 50%;
  left: var(--at, 50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid var(--panel);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px var(--c);
}
.miccard__ends {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.miccard__def { font-size: 10.5px; color: var(--faint); margin-top: 7px; letter-spacing: 0.5px; }
.miccard__def b { color: var(--c); }
.miccard__desc { font-size: 12.5px; color: var(--muted); margin-top: 11px; line-height: 1.55; }

/* ── interactive widgets (tuner, recorder) ───────────────────────────────── */

.widget {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #0a0705, #060504);
  padding: 24px 22px 20px;
  margin: 18px 0 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.widget__demo {
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.5px;
  margin: 12px 0 0;
  text-align: center;
}
.widget__demo b { color: var(--rust); }

/* ── recorder ────────────────────────────────────────────────────────────── */

.rec__header { display: flex; align-items: center; gap: 14px; justify-content: center; font-size: 13px; letter-spacing: 1px; color: var(--muted); }
.rec__air { font-weight: 700; color: var(--faint); }
.rec.is-rec .rec__air { color: #e06b6b; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: .25; } }

.rec__wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 62px; margin: 18px 0; }
.rec__wave i { width: 4px; height: 8px; background: var(--faint); border-radius: 2px; transition: background .2s; }
.rec.is-rec .rec__wave i {
  background: linear-gradient(180deg, var(--rust-light), var(--rust-dark));
  animation: wv .9s ease-in-out infinite;
}
@keyframes wv { 0%, 100% { height: 8px; } 50% { height: var(--h, 30px); } }

.rec__time { text-align: center; font-size: 26px; font-weight: 700; letter-spacing: 2px; color: var(--muted); }
.rec.is-rec .rec__time { color: var(--rust); }

.rec__controls { text-align: center; margin-top: 16px; }
.rec__btn {
  font-family: var(--mono);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 22px;
  font-weight: 700;
}
.rec__btn .dot { color: #e06b6b; margin-right: 6px; }
.rec.is-rec .rec__btn { border-color: #e06b6b; color: #e06b6b; }
.rec__file { text-align: center; margin-top: 14px; font-size: 12.5px; color: var(--muted); min-height: 1.3em; }

/* ── TUI overlay mockups (preset browser, save dialog) ───────────────────── */

.overlay {
  border: 1px solid var(--rust);
  border-radius: 10px;
  background: #0a0705;
  box-shadow: 0 0 0 1px rgba(255, 123, 61, 0.12), 0 22px 54px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  margin: 18px 0 6px;
}
.overlay--narrow { max-width: 460px; }

.overlay__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-dim);
  background: linear-gradient(180deg, rgba(255, 123, 61, 0.08), transparent);
}
.overlay__bar .dots { display: flex; gap: 5px; }
.overlay__bar .dots i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.overlay__bar .dots i:nth-child(1) { background: #ff5f56; }
.overlay__bar .dots i:nth-child(2) { background: #ffbd2e; }
.overlay__bar .dots i:nth-child(3) { background: #27c93f; }
.overlay__bar .ttl {
  color: var(--rust);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* preset rows */
.plist { padding: 6px 0; }
.prow {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 16px;
  border-left: 2px solid transparent;
}
.prow.is-sel { background: rgba(255, 123, 61, 0.12); border-left-color: var(--rust); }
.prow__name { color: var(--text); font-weight: 700; min-width: 9.5em; }
.prow.is-sel .prow__name { color: var(--rust); }
.prow__meta { color: var(--muted); font-size: 12.5px; flex: 1; }
.prow__tag {
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid color-mix(in srgb, var(--teal) 45%, var(--border-dim));
  border-radius: 20px;
  padding: 1px 7px;
}

/* save-dialog fields */
.dform { padding: 16px; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field__label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.field__box {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #060504;
  padding: 8px 11px;
  font-size: 13.5px;
  color: var(--text);
  min-height: 1.4em;
}
.field--focus .field__box { border-color: var(--rust); box-shadow: 0 0 0 1px rgba(255, 123, 61, 0.3); }
.field--focus .field__label { color: var(--rust); }
.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--rust);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: blink 1.1s steps(2, start) infinite;
}
.field__ph { color: var(--faint); }

/* footer hint bar shared by overlays */
.overlay__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 9px 14px;
  border-top: 1px solid var(--border-dim);
  font-size: 12px;
  color: var(--muted);
}
.overlay__foot span { white-space: nowrap; }

/* keycap legend (replaces key tables) */
.keymap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 22px;
  margin: 16px 0;
}
.keymap > div { display: flex; gap: 10px; align-items: baseline; font-size: 13px; color: var(--muted); }
.keymap kbd { flex: none; }
