/* Modular Modeling website: the app's one look, "concept A" (web/styles.css).
   Neutral charcoal surfaces step up a short ramp (--surface-0..3) and read as
   depth through soft shadows and a 1px top light (--elev-1..3), not borders.
   Soft corners (--radius-s controls, --radius-m cards, --radius-l the hero),
   big confident type. Amber marks only the one primary action, the active
   tab or language, and value readouts; each pedal kind is a small accent (its
   LED and label), never a coloured border. Dark only, like the app: there is
   no light theme. The tokens below are copied from the app's; keep them in
   step with web/styles.css. */

/* The app's fonts (web/fonts, copied into assets/fonts by build.mjs), served
   from this site: no request to Google Fonts. */
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --control-edge: #707378; /* edge of a control: 3.18:1 or more on every surface (also defined in home.css) */
  color-scheme: dark;
  /* Surfaces, lines and text (web/styles.css). */
  --bg: #0c0c0d; /* sunken wells: code, fields (below --surface-0) */
  --surface-0: #101112; /* the page */
  --surface-1: #17181a; /* panels */
  --surface-2: #1d1e21; /* raised cards */
  --surface-3: #24262a; /* hover */
  --panel: var(--surface-2);
  --sunk: var(--bg);
  --border: #2a2b2e;
  --line-strong: #3a3c40;
  --text: #e8e8e6;
  --muted: #a6a8ab;
  --accent: #ff7a1a;
  --accent-hover: #ff8f3d;
  --accent-ink: #0c0c0d;
  --amber: #f0a040;
  --amber-soft: rgba(240, 160, 64, 0.16);
  --ok: #7fa889;
  --err: #e08577;
  /* Corners and elevation: soft shadows with a 1px top light. */
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 14px;
  --elev-1:
    inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.22);
  --elev-2:
    inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 2px 4px rgba(0, 0, 0, 0.4), 0 10px 24px rgba(0, 0, 0, 0.3);
  --elev-3:
    inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 4px 8px rgba(0, 0, 0, 0.45), 0 18px 40px rgba(0, 0, 0, 0.38);
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --page: 1180px;
  /* The page's side gutters: 16px, or the notch / rounded-corner inset when a
     phone in landscape has a bigger one (viewport-fit=cover). */
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));

  /* One colour per pedal kind, as the app's cards: --k the bright arc/LED and
     label colour (readable on the charcoal), --kb the card fill, --ke its edge. */
  --ca-compressor: #62acd9;
  --ca-drive: #8fcf6a;
  --ca-modulation: #b38ae6;
  --ca-delay: #5fc4b4;
  --ca-reverb: #7a9ae6;
  --ca-cabinet: #ec6a5e; /* the app's #e0564a, lifted to reach AA as small text on its card fill */
  --ca-amp: #f0a040;
  --ca-amp-cab: #e07a5a;
  --ca-compressor-bg: #1e3040;
  --ca-compressor-edge: #2b4459;
  --ca-drive-bg: #2b3a24;
  --ca-drive-edge: #3d5233;
  --ca-modulation-bg: #33243f;
  --ca-modulation-edge: #483359;
  --ca-delay-bg: #1d3634;
  --ca-delay-edge: #2a4b48;
  --ca-reverb-bg: #222a40;
  --ca-reverb-edge: #313c5a;
  --ca-cabinet-bg: #3f1d1b;
  --ca-cabinet-edge: #582926;
  --ca-amp-bg: #2c2a26;
  --ca-amp-edge: #3e3b35;
  --ca-amp-cab-bg: #2e2522;
  --ca-amp-cab-edge: #423430;
}

:root[data-lang="en"] .es,
:root[data-lang="es"] .en {
  display: none !important;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--surface-0);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  -webkit-font-smoothing: antialiased;
}
/* Touch: no double-tap-to-zoom delay on controls. */
a,
button,
summary,
label,
select,
[role="tab"] {
  touch-action: manipulation;
}
/* The skip link's target takes focus (tabindex="-1") so Safari moves the
   reading position there; it is not a control, so it gets no focus ring. */
#content:focus {
  outline: none;
}
img {
  max-width: 100%;
}
a {
  color: var(--text);
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: var(--accent);
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter-l);
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  z-index: 20;
  background: var(--surface-3);
  padding: 6px 10px;
  border-radius: var(--radius-s);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  margin-left: calc(-1 * var(--gutter-l));
  margin-right: calc(-1 * var(--gutter-r));
  padding: 10px var(--gutter-r) 10px var(--gutter-l);
  background: color-mix(in srgb, var(--surface-0) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: var(--page);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px 22px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
}
/* The logo (assets/logo.svg: "MM" as a guitar cable with a 1/4" jack), used
   as a mask so it is painted in one solid colour. */
.mark {
  display: inline-block;
  flex: none;
  width: 30px;
  height: 30px;
  background: var(--text);
  -webkit-mask: url("/assets/logo.svg") center / contain no-repeat;
  mask: url("/assets/logo.svg") center / contain no-repeat;
}
.brand b {
  font-family: var(--display);
  font-variation-settings: "wdth" 112;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.beta-pill {
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 7px;
}
.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  padding: 6px 10px;
  border-radius: var(--radius-s);
}
.site-nav a:hover {
  background: var(--surface-2);
}
.site-nav a[aria-current="page"] {
  color: var(--amber);
}
/* Beta access: the one call to action in the nav (login, then the download). */
.site-nav a.nav-cta {
  margin-inline-start: 6px;
  padding: 6px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
}
.site-nav a.nav-cta:hover {
  background: var(--accent-hover);
}
/* A lock beside a page that needs the beta password; the words for screen
   readers are in .sr-only next to it. */
.lock {
  display: inline-block;
  width: 0.78em;
  height: 0.78em;
  margin-inline-start: 0.4em;
  vertical-align: -0.06em;
  fill: currentColor;
  opacity: 0.7;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.lang-switch {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px;
  background: var(--surface-2);
  box-shadow: var(--elev-1);
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  font: 600 13px/1 var(--body);
  color: var(--muted);
  background: none;
  border: 0;
  padding: 6px 11px;
  min-height: 28px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}
.lang-switch a:hover {
  background: var(--surface-3);
  color: var(--text);
}
.lang-switch a[aria-current] {
  background: var(--amber-soft);
  color: var(--amber);
}

/* The wrapper around the nav and the language switch adds no box of its own:
   its children lay out in the header exactly as if it were not there. On
   phones with JS it becomes the dropdown menu (see the 1000px block). The menu
   button and the second Beta access link are for that case only. */
.site-menu {
  display: contents;
}
.nav-toggle,
.nav-cta-bar {
  display: none;
}

/* ---------- Page scaffolding ---------- */
.page {
  max-width: var(--page);
  margin: 0 auto;
  padding-block: 48px 96px;
}
.prose {
  max-width: 68ch;
}
.eyebrow {
  font: 700 12px/1.2 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  font-family: var(--display);
  font-variation-settings: "wdth" 118;
  font-weight: 850;
  font-size: clamp(38px, 6.6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 10px 0 16px;
  text-wrap: balance;
}
h1.page-title {
  font-size: clamp(34px, 5vw, 54px);
}
.lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 18px;
}
h2.sec {
  font-family: var(--display);
  font-variation-settings: "wdth" 112;
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 38px);
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
h3 {
  font-family: var(--display);
  font-variation-settings: "wdth" 104;
  font-weight: 750;
  font-size: 21px;
  line-height: 1.25;
  margin: 36px 0 8px;
  text-wrap: balance;
}
p {
  margin: 0 0 14px;
}
ul.list,
ol.list {
  margin: 0 0 16px;
  padding-left: 1.3em;
  display: grid;
  gap: 6px;
}
section.doc {
  padding-top: 24px;
  margin-bottom: 64px;
  scroll-margin-top: 80px;
}
section.doc > header {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}
.updated {
  font: 500 13px/1.4 var(--mono);
  color: var(--muted);
  margin-bottom: 28px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 16px/1 var(--body);
  text-decoration: none;
  padding: 14px 20px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: background 140ms;
}
.btn:hover {
  background: var(--surface-3);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn small {
  font: 500 12px/1 var(--mono);
  opacity: 0.8;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 0;
}

/* ---------- Home ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 40%);
  align-items: center;
  column-gap: 32px;
  padding-block: 24px 40px;
  /* The spotlight behind the picture (.hero-art::before) reaches past the
     column; clip it sideways so it never widens the page. */
  overflow-x: clip;
}
.hero-copy {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 8px;
}
.hero > .shot {
  grid-column: 1 / -1;
}
/* The app's own amp drawing (a head on its 4x12) as the home's picture:
   decoration, so it is hidden from assistive tech. A faint neutral spotlight
   (the page's own light, no new colour) and a soft floor shadow sit behind it. */
.hero-art {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  pointer-events: none;
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: -12% -22% -6%;
  background: radial-gradient(
    ellipse 50% 50% at 50% 46%,
    rgb(255 255 255 / 0.07) 0%,
    rgb(255 255 255 / 0.055) 20%,
    rgb(255 255 255 / 0.035) 40%,
    rgb(255 255 255 / 0.015) 62%,
    rgb(255 255 255 / 0) 100%
  );
}
.hero-art img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.5));
}
@media (prefers-reduced-motion: no-preference) {
  .hero-art img {
    animation: hero-art-in 600ms ease-out both;
  }
}
@keyframes hero-art-in {
  from {
    opacity: 0;
  }
}
/* Tablet and phone: one column. The picture comes right after the headline
   (the copy's wrapper dissolves so the order can interleave), centred. */
@media (max-width: 1000px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 8px;
  }
  .hero-copy {
    display: contents;
  }
  .hero-copy > .eyebrow {
    order: 1;
  }
  .hero-copy > h1 {
    order: 2;
  }
  .hero-art {
    order: 3;
    grid-column: 1;
    grid-row: auto;
    width: min(100%, 460px);
    margin: 4px auto 12px;
  }
  .hero-copy > .lede {
    order: 4;
  }
  .hero-copy > .actions {
    order: 5;
  }
  .hero > .shot {
    order: 6;
  }
}
/* A faint neutral light at the top of the home page, on the page background
   (not the hero box) so it has no edges; many small steps keep it from banding. */
body.page-index {
  background:
    radial-gradient(
        ellipse 110vw 70vh at 50% 0%,
        rgb(255 255 255 / 0.05) 0%,
        rgb(255 255 255 / 0.04) 15%,
        rgb(255 255 255 / 0.028) 30%,
        rgb(255 255 255 / 0.016) 50%,
        rgb(255 255 255 / 0.006) 75%,
        rgb(255 255 255 / 0) 100%
      )
      no-repeat,
    var(--surface-0);
}
.hero .eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  margin-right: 10px;
  vertical-align: 1px;
}
.guide-hero {
  display: grid;
  gap: 10px;
  margin-bottom: 56px;
}
.guide-hero h1 {
  margin: 0;
}
.hero .shot {
  margin-top: 32px;
}
/* The hero screenshot: the app window as a raised panel. */
.hero .shot img,
.hero-shot img {
  border-radius: var(--radius-l);
  box-shadow: var(--elev-3);
}
.chain {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0 4px;
  padding: 0;
  list-style: none;
  font: 700 12px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.chain li {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Each stage is a small card in the kind's colours, like the app's pedals. */
.chain li > span {
  background: var(--kb, var(--surface-2));
  border: 1px solid var(--ke, var(--border));
  color: var(--k, var(--text));
  padding: 7px 10px;
  border-radius: var(--radius-s);
}
.chain li + li::before {
  content: "→";
  color: var(--muted);
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 40px;
  align-items: center;
}
.needs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.needs li {
  font-size: 14px;
  background: var(--surface-2);
  box-shadow: var(--elev-1);
  border-radius: 999px;
  padding: 5px 14px;
}
.cta-band {
  background: var(--surface-2);
  box-shadow: var(--elev-2);
  border-radius: var(--radius-l);
  padding: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  align-items: center;
  justify-content: space-between;
}
.cta-band h2 {
  margin: 0 0 4px;
}
.split h2.sec {
  margin-bottom: 12px;
}
.cta-band p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Download ---------- */
.platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0 8px;
}
.platform {
  background: var(--surface-2);
  box-shadow: var(--elev-2);
  border-radius: var(--radius-l);
  padding: 26px;
  display: grid;
  gap: 12px;
  align-content: start;
}
.platform h2 {
  font-family: var(--display);
  font-variation-settings: "wdth" 110;
  font-weight: 800;
  font-size: 28px;
  margin: 0;
}
.platform .meta {
  font: 500 13px/1.5 var(--mono);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.platform ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 15.5px;
}
.checksum {
  font: 500 11.5px/1.5 var(--mono);
  color: var(--muted);
  overflow-wrap: anywhere;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* ---------- ASIO logo and notice (Steinberg usage guidelines) ----------
   The logo is Steinberg's artwork, unaltered: scale it in proportion only (set
   the width, leave the height auto). No filter, opacity, radius, border or crop. */
.asio-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.asio-notice-logo {
  display: block;
  width: 150px;
  height: auto;
}
.asio-notice .fine {
  margin: 0;
  max-width: 44ch;
  font-size: 14px;
  color: var(--muted);
}
.asio-claim {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--muted);
}
.asio-claim-logo {
  display: block;
  width: 110px;
  height: auto;
  flex: none;
}

/* ---------- Shared components ---------- */
.ui {
  font-weight: 700;
  white-space: nowrap;
}
.knob {
  font: 700 0.78em/1 var(--mono);
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--text);
  white-space: nowrap;
}
kbd {
  font: 700 0.8em/1 var(--mono);
  padding: 3px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface-2);
  white-space: nowrap;
}
code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
figure.shot {
  margin: 22px 0 28px;
}
figure.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  box-shadow: var(--elev-2);
  background: var(--surface-0);
}
figcaption {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
  max-width: 68ch;
}
.note {
  background: var(--surface-2);
  box-shadow: var(--elev-1);
  border-radius: var(--radius-m);
  padding: 14px 16px;
  margin: 18px 0;
  max-width: 68ch;
}
.note > b:first-child {
  display: block;
  font: 700 11px/1.3 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.note p:last-child {
  margin-bottom: 0;
}
ol.steps {
  list-style: none;
  counter-reset: s;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 12px;
}
ol.steps > li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
}
ol.steps > li::before {
  content: counter(s);
  font: 700 14px/30px var(--mono);
  text-align: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
}
ol.steps strong {
  display: block;
}
ol.steps.flow strong {
  display: inline;
}
.table-wrap {
  overflow-x: auto;
  margin: 16px 0 24px;
  border-radius: var(--radius-m);
  background: var(--surface-2);
  box-shadow: var(--elev-1);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}
th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tr:last-child td {
  border-bottom: 0;
}
th {
  font: 700 11px/1.3 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-1);
}

/* ---------- Guide ---------- */
.with-toc {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
}
nav.toc {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 80px);
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.toc details > summary {
  display: none;
}
.toc h2 {
  font: 700 11px/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 8px;
}
.toc h2:first-of-type {
  margin-top: 0;
}
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.toc a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  padding: 3px 10px;
  border-left: 2px solid transparent;
}
.toc a:hover {
  border-left-color: var(--amber);
  color: var(--amber);
}
.pedals {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}
.pedal {
  --k: var(--accent);
  background: var(--surface-2);
  box-shadow: var(--elev-1);
  border-radius: var(--radius-m);
  padding: 22px 24px 14px;
}
.compressor {
  --k: var(--ca-compressor);
  --kb: var(--ca-compressor-bg);
  --ke: var(--ca-compressor-edge);
}
.drive {
  --k: var(--ca-drive);
  --kb: var(--ca-drive-bg);
  --ke: var(--ca-drive-edge);
}
.modulation {
  --k: var(--ca-modulation);
  --kb: var(--ca-modulation-bg);
  --ke: var(--ca-modulation-edge);
}
.delay {
  --k: var(--ca-delay);
  --kb: var(--ca-delay-bg);
  --ke: var(--ca-delay-edge);
}
.reverb {
  --k: var(--ca-reverb);
  --kb: var(--ca-reverb-bg);
  --ke: var(--ca-reverb-edge);
}
.cabinet {
  --k: var(--ca-cabinet);
  --kb: var(--ca-cabinet-bg);
  --ke: var(--ca-cabinet-edge);
}
.amp {
  --k: var(--ca-amp);
  --kb: var(--ca-amp-bg);
  --ke: var(--ca-amp-edge);
}
.ampcab {
  --k: var(--ca-amp-cab);
  --kb: var(--ca-amp-cab-bg);
  --ke: var(--ca-amp-cab-edge);
}
.pedal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-bottom: 6px;
}
.pedal-head h3 {
  margin: 0;
  color: var(--k);
  font-variation-settings: "wdth" 112;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
/* The kind's LED, before the name. */
.pedal-head h3::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--k);
  box-shadow: 0 0 8px 0 color-mix(in srgb, var(--k) 70%, transparent);
  vertical-align: 2px;
}
.pedal-head .types {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
}
.pedal p {
  max-width: 68ch;
}
.pedal .controls {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  margin: 10px 0 6px;
  border-top: 1px solid var(--border);
}
.pedal .controls > * {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.pedal .controls > *:nth-last-child(-n + 3) {
  border-bottom: 0;
}
.pedal .controls dt {
  font: 700 12px/1.6 var(--mono);
  letter-spacing: 0.08em;
  padding-right: 18px;
  white-space: nowrap;
  color: var(--k);
}
.pedal .controls dd {
  margin: 0;
  font-size: 15px;
  padding-right: 14px;
}
.pedal .controls .r {
  font: 500 12px/1.9 var(--mono);
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pedal-with-shot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  align-items: start;
}
/* A wide shot goes under the text instead of beside it. */
.pedal-with-shot.wide {
  grid-template-columns: minmax(0, 1fr);
}
.pedal-with-shot.wide img {
  max-width: 640px;
}
.pedal-with-shot img {
  width: 100%;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  box-shadow: var(--elev-2);
  background: var(--surface-0);
  display: block;
}
.presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin: 18px 0 8px;
}
.preset {
  background: var(--surface-2);
  box-shadow: var(--elev-1);
  border-radius: var(--radius-m);
  padding: 12px 14px;
  display: grid;
  gap: 4px;
  align-content: start;
}
.preset b {
  font-family: var(--display);
  font-variation-settings: "wdth" 106;
  font-weight: 750;
  font-size: 17px;
}
.preset span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}
.preset .tag {
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
/* The "Presets made by AI" prompt: a copyable block. */
.ai-prompt {
  margin: 22px 0 8px;
  border-radius: var(--radius-m);
  background: var(--surface-2);
  box-shadow: var(--elev-1);
  overflow: hidden;
}
.ai-prompt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 14px;
  border-bottom: 1px solid var(--border);
}
.ai-prompt-label {
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ai-copy {
  font: 700 14px/1 var(--body);
  padding: 9px 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
.ai-copy:hover {
  background: var(--accent-hover);
}
.ai-prompt pre {
  margin: 0;
  padding: 14px;
  max-height: 340px;
  overflow: auto;
  font: 12.5px/1.55 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--bg);
}
.faq details {
  border-bottom: 1px solid var(--border);
  max-width: 72ch;
}
.faq details:first-of-type {
  border-top: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 32px 14px 0;
  font-weight: 700;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 10px;
  font: 500 22px/1 var(--mono);
  color: var(--muted);
}
.faq details[open] summary::after {
  content: "−";
}
.faq details > div {
  padding: 0 0 14px;
}
.files {
  display: grid;
  max-width: 72ch;
  margin: 12px 0;
}
.files > div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 4px 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.files code {
  display: block;
  margin-top: 2px;
}

/* ---------- Changelog ---------- */
.release {
  background: var(--surface-2);
  box-shadow: var(--elev-1);
  border-radius: var(--radius-m);
  padding: 24px 28px 14px;
  margin-bottom: 20px;
  max-width: 72ch;
}
.release h2 {
  margin: 0;
}
.release .date {
  font: 500 13px/1.4 var(--mono);
  color: var(--muted);
  margin: 4px 0 14px;
}

/* ---------- Credits ---------- */
.credits {
  display: grid;
  max-width: 80ch;
}
.credits details {
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.credits summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
}
.credits summary b {
  font-size: 16px;
}
.credits summary span {
  color: var(--muted);
  font-size: 14px;
}
.credits summary .lic {
  font: 500 12px/1.4 var(--mono);
  color: var(--muted);
}
.credits pre {
  white-space: pre-wrap;
  font: 12px/1.5 var(--mono);
  background: var(--bg);
  border-radius: var(--radius-s);
  padding: 12px;
  max-height: 320px;
  overflow: auto;
}

/* ---------- Login ---------- */
.login {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
  padding-block: 40px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface-2);
  box-shadow: var(--elev-3);
  border-radius: var(--radius-l);
  padding: 32px;
  display: grid;
  gap: 14px;
}
.login-card .mark {
  width: 56px;
  height: 56px;
}
.login-card h1 {
  font-size: 32px;
  margin: 0;
}
.login-card p {
  margin: 0;
  color: var(--muted);
}
.login-card label {
  font-weight: 700;
  font-size: 15px;
}
.login-card input[type="password"] {
  width: 100%;
  font: 16px/1.2 var(--body);
  padding: 12px 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--control-edge); /* WCAG 1.4.11: the field's edge must be 3:1 against the card */
  background: var(--bg);
  color: var(--text);
}
.login-card .err {
  color: var(--err);
  font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--page);
  margin: 0 auto;
  padding-block: 36px calc(48px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 28px;
  font-size: 15px;
}
.site-footer h2 {
  font: 700 11px/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.site-footer a {
  color: var(--text);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
.site-footer a[aria-current="page"] {
  color: var(--amber);
}
.site-footer .fine {
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .with-toc {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  nav.toc {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .toc details {
    border-radius: var(--radius-m);
    background: var(--surface-2);
    box-shadow: var(--elev-1);
    padding: 10px 14px;
  }
  .toc details > summary {
    display: block;
    cursor: pointer;
    font-weight: 700;
  }
  .toc details[open] > summary {
    margin-bottom: 12px;
  }
  .pedal-with-shot,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .pedal-with-shot img {
    max-width: 260px;
  }
  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Touch targets: at least 44px tall for the nav links and the language switch
   on phones, tablets and touch screens. The header keeps its 57px: its vertical
   padding gives way to the taller controls. */
@media (pointer: coarse), (max-width: 1000px) {
  .site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .lang-switch {
    padding: 0;
  }
  .lang-switch a {
    min-height: 44px;
    padding-inline: 16px;
  }
}
@media (pointer: coarse) and (min-width: 1001px) {
  .site-header {
    padding-block: 6px;
  }
}
/* Menu layout (nav-js.js adds .nav-js before the first paint): below 1000px the
   header is one row with the brand, the Beta access link and a menu button; the
   nav and the language switch open in a panel under the bar. Without JS the nav
   just wraps. */
@media (max-width: 1000px) {
  /* Compact header (site.js adds .nav-js): one row with the brand, the Beta
     access link and a menu button; the nav and the language switch open in a
     panel under the bar. Without JS the nav just wraps, as above. */
  .nav-js .site-header {
    /* 6px + the 44px button + 6px + the 1px border = 57px, the height home.css assumes */
    padding-block: 6px;
  }
  .nav-js .site-header-inner {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .nav-js .brand {
    gap: 8px;
    min-width: 0;
  }
  .nav-js .brand b {
    min-width: 0;
    font-size: 15px;
    line-height: 1.1;
  }
  .nav-js .beta-pill {
    flex: none;
  }
  .nav-js .nav-cta-bar {
    display: inline-flex;
    align-items: center;
    flex: none;
    min-height: 44px;
    padding: 0 14px;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
  }
  .nav-js .nav-cta-bar:hover {
    background: var(--accent-hover);
  }
  .nav-js .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--text);
    background: var(--surface-2);
    border: 0;
    border-radius: var(--radius-s);
    box-shadow: var(--elev-1);
    cursor: pointer;
  }
  .nav-toggle-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }
  .nav-toggle-close,
  .nav-toggle[aria-expanded="true"] .nav-toggle-open {
    display: none;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-close {
    display: inline;
  }
  .nav-js .site-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 16px 16px;
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--elev-3);
  }
  .nav-js .nav-toggle[aria-expanded="true"] ~ .site-menu {
    display: flex;
  }
  .nav-js .site-nav {
    order: 0;
    width: 100%;
    margin: 0;
    flex-direction: column;
    gap: 0;
  }
  .nav-js .site-nav a {
    padding: 12px 10px;
    font-size: 16px;
  }
  .nav-js .site-nav a.nav-cta {
    display: none;
  }
}
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  /* Long control names wrap on a phone instead of widening the page. */
  .ui,
  .knob {
    white-space: normal;
  }
  .page {
    padding-block: 28px 72px;
  }
  .site-nav {
    order: 3;
    width: 100%;
    margin-inline: -10px;
  }
  .platforms {
    grid-template-columns: minmax(0, 1fr);
  }
  .pedal {
    padding: 14px 14px 8px;
  }
  .pedal .controls {
    grid-template-columns: minmax(0, 1fr) max-content;
  }
  .pedal .controls dt {
    grid-column: 1 / -1;
    border-bottom: 0 !important;
    padding-bottom: 0;
  }
  .pedal .controls dd {
    grid-column: 1;
  }
  .pedal .controls > *:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--border);
  }
  .pedal .controls > *:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
  .files > div {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-footer {
    grid-template-columns: minmax(0, 1fr);
  }
  .cta-band {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ---------- Rig pages (/rigs/<slug>.html, site/build.mjs) ---------- */
.rig-open {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin: 8px 0 32px;
}
.rig-open .fine {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.rig-section {
  margin-top: 28px;
  max-width: 820px;
}
.rig-section h2 {
  font-family: var(--display);
  font-variation-settings: "wdth" 110;
  font-weight: 800;
  font-size: 26px;
  margin: 0 0 12px;
}
.rig-section .fine {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 68ch;
}
.rig-chain {
  --k: var(--accent); /* each pedal's kind colour (.drive, .amp, ...) overrides it */
}
.rig-chain,
.rig-paths {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.rig-pedal {
  background: var(--surface-2);
  box-shadow: var(--elev-1);
  border-radius: var(--radius-m);
  padding: 12px 16px;
  overflow-wrap: anywhere;
}
/* The kind's LED, before the name. */
.rig-pedal > b::before,
.rig-chip::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--k);
  box-shadow: 0 0 8px 0 color-mix(in srgb, var(--k) 70%, transparent);
  vertical-align: 1px;
}
.rig-pedal > b {
  color: var(--k);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 6px;
}
.rig-pedal.split {
  --k: var(--muted);
}
.rig-off {
  font: 600 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 7px;
  margin-left: 6px;
}
.rig-paths {
  margin-top: 10px;
}
.rig-path-name {
  font: 600 12px/1.4 var(--mono);
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}
.rig-section .table-wrap + .fine,
.rig-section .rig-captures + .fine {
  margin-top: 12px;
}
.rig-captures {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
}
.rig-captures th,
.rig-captures td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.rig-captures td:last-child,
.rig-captures th:last-child {
  white-space: nowrap; /* "From": a source's name never breaks mid-word */
}
.rig-captures th {
  font: 600 12px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.rig-scenes {
  margin: 0;
  padding-left: 1.4em;
  font-size: 16.5px;
}

/* Replaces style="color: var(--ok)": the CSP allows no inline styles. */
.ok-text {
  color: var(--ok);
}

/* ---------- Rigs index (/rigs/, site/build.mjs) ---------- */
.rig-index-note {
  max-width: 68ch;
  color: var(--muted);
}
.rig-list {
  display: grid;
  gap: 20px;
  margin-top: 28px;
  max-width: 820px;
}
.rig-card {
  border-radius: var(--radius-l);
  background: var(--surface-2);
  box-shadow: var(--elev-2);
  padding: 24px 26px;
}
.rig-card h2 {
  font-family: var(--display);
  font-variation-settings: "wdth" 110;
  font-weight: 800;
  font-size: 26px;
  margin: 0 0 8px;
}
.rig-card h2 a {
  color: inherit;
  text-decoration: none;
}
.rig-card h2 a:hover {
  text-decoration: underline;
}
.rig-card h3 {
  font: 600 12px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 18px 0 8px;
}
.rig-card-desc {
  margin: 0;
  max-width: 68ch;
}
.rig-chips,
.rig-assets {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rig-chips {
  --k: var(--accent); /* each chip's kind colour (.drive, .amp, ...) overrides it */
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rig-chip {
  background: var(--surface-3);
  border-radius: var(--radius-s);
  padding: 5px 11px;
  font-size: 15px;
}
.rig-assets {
  display: grid;
  gap: 6px;
  font-size: 15.5px;
}
.rig-assets li {
  overflow-wrap: anywhere;
}
.rig-asset-name {
  font-weight: 600;
}
.rig-detail {
  color: var(--muted);
}
.rig-free {
  font: 600 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 7px;
  margin-left: 6px;
  white-space: nowrap;
}
.rig-free.free {
  color: var(--ok);
  border-color: var(--ok);
}
.rig-clip {
  display: block;
  width: 100%;
  max-width: 460px;
  margin-top: 18px;
}
.rig-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* Very narrow phones: the Beta access link already says it is a beta, so the
   pill next to the name makes way for it. */
@media (max-width: 480px) {
  .nav-js .beta-pill {
    display: none;
  }
}
