/* Copyright (C) 2026 Pierre Arnaud GUYOT (OktoPierre)
   SPDX-License-Identifier: GPL-3.0-or-later */
/* Okto MultiWave Synth — user manuals (shared stylesheet).
   Light theme, system fonts only, no external resources.
   Engine accent is set by the body class: .eng-a (teal) or .eng-b (amber). */

:root {
  color-scheme: light;
  --text: #1d2430;
  --muted: #5b6573;
  --faint: #8b95a2;
  --line: #e3e7ec;
  --line-2: #d3d9e0;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --bg-side: #f8f9fb;
  --chip: #eef1f4;
  --dark: #14171c;
  --a-acc: #2fd4c6; --a-ink: #0f9e93; --a-link: #0b7a72; --a-tint: #e3f7f5;
  --b-acc: #ffae42; --b-ink: #c97a0a; --b-link: #95580a; --b-tint: #fff2de;
  --acc: var(--a-acc); --ink: var(--a-ink); --link: var(--a-link); --tint: var(--a-tint);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, Menlo, monospace;
}
body.eng-a { --acc: var(--a-acc); --ink: var(--a-ink); --link: var(--a-link); --tint: var(--a-tint); }
body.eng-b { --acc: var(--b-acc); --ink: var(--b-ink); --link: var(--b-link); --tint: var(--b-tint); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16.5px/1.68 var(--font);
  font-kerning: normal; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--tint); }

/* ---------------------------------------------------------------- layout */
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.toc {
  position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
  padding: 26px 18px 40px 24px; background: var(--bg-side); border-right: 1px solid var(--line);
  font-size: 14px; line-height: 1.45;
}
main { padding: 34px 48px 90px; min-width: 0; }
.content { max-width: 860px; margin: 0 auto; }

/* ---------------------------------------------------------------- sidebar */
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; text-decoration: none; color: var(--text); }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--dark); display: grid; place-items: center; flex: none; }
.brand b { display: block; font-size: 12.5px; letter-spacing: .18em; font-weight: 800; }
.brand span { display: block; font-size: 11px; letter-spacing: .14em; color: var(--ink); font-weight: 700; }
.switch {
  display: block; margin: 0 0 18px; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line-2);
  background: #fff; text-decoration: none; font-size: 13px; color: var(--muted);
}
.switch strong { display: block; font-size: 13.5px; }
.switch.to-a strong { color: var(--a-link); }
.switch.to-b strong { color: var(--b-link); }
.switch:hover { border-color: var(--faint); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc > nav > ol > li { margin: 1px 0; }
.toc a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--text); text-decoration: none; }
.toc a:hover { background: #eef1f4; }
.toc a.active { background: var(--tint); color: var(--text); box-shadow: inset 3px 0 0 var(--ink); }
.toc .n { display: inline-block; min-width: 1.6em; color: var(--faint); font-variant-numeric: tabular-nums; }
.toc ol ol { margin: 0 0 4px 1.6em; }
.toc ol ol a { font-size: 13px; color: var(--muted); padding: 2px 8px; }
.toc .toc-title { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--faint); margin: 6px 0 6px 8px; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding: 6px 0 26px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; left: 0; top: -34px; width: 120px; height: 5px; background: var(--acc); border-radius: 0 0 4px 4px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .16em; color: var(--muted); margin: 0 0 6px; }
.hero h1 { font-size: 40px; line-height: 1.12; margin: 0 0 14px; letter-spacing: -.01em; font-weight: 750; }
.hero h1 .tag {
  display: inline-block; vertical-align: middle; font-size: 15px; letter-spacing: .1em; font-weight: 800;
  padding: 4px 10px; border-radius: 8px; background: var(--acc); color: #10151a; margin-right: 10px; position: relative; top: -4px;
}
.lead { font-size: 18.5px; line-height: 1.6; color: #2b3340; margin: 0 0 16px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; color: var(--muted); }
.hero-meta a { font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); }
.pill.other-a::before { background: var(--a-acc); }
.pill.other-b::before { background: var(--b-acc); }

/* ---------------------------------------------------------------- headings & text */
h2 {
  font-size: 28px; line-height: 1.2; margin: 64px 0 16px; padding-top: 22px; border-top: 1px solid var(--line);
  letter-spacing: -.005em; font-weight: 750;
}
h2 .num { color: var(--ink); margin-right: 12px; font-variant-numeric: tabular-nums; }
h3 { font-size: 20.5px; line-height: 1.3; margin: 38px 0 10px; font-weight: 700; }
h4 { font-size: 16.5px; margin: 26px 0 6px; font-weight: 700; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 1.4em; }
li { margin: 4px 0; }
li::marker { color: var(--faint); }
strong { font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
code { font-family: var(--mono); font-size: .88em; background: var(--chip); padding: .1em .35em; border-radius: 4px; }
pre { font-family: var(--mono); font-size: 14px; background: var(--bg-soft); border: 1px solid var(--line); padding: 12px 14px; border-radius: 8px; overflow-x: auto; }
.formula { font-family: var(--mono); font-size: 14px; line-height: 1.6; background: #fff; border: 1px dashed var(--line-2); border-radius: 8px; padding: 9px 13px; margin: 10px 0 14px; overflow-x: auto; }

/* panel labels, keys */
.ctl {
  display: inline-block; font-size: .74em; line-height: 1.5; font-weight: 750; letter-spacing: .07em; white-space: nowrap;
  padding: 0 .5em; border-radius: 4px; background: var(--chip); color: #2a313b; border: 1px solid #dbe0e6; vertical-align: .08em;
}
kbd {
  display: inline-block; min-width: 1.7em; text-align: center; font: 700 .78em/1.55 var(--font); padding: 0 .42em; border-radius: 5px;
  background: #fff; border: 1px solid #c9d0d8; box-shadow: 0 1.5px 0 #c9d0d8; color: #2a313b; vertical-align: .08em;
}
.val { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }

/* ---------------------------------------------------------------- callouts */
.callout { position: relative; margin: 18px 0 20px; padding: 14px 18px 14px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); }
.callout > :last-child { margin-bottom: 0; }
.callout .ttl { display: block; font-size: 12px; font-weight: 800; letter-spacing: .12em; margin-bottom: 4px; color: var(--muted); }
.callout.tip { background: var(--tint); border-color: transparent; }
.callout.tip .ttl { color: var(--link); }
.callout.warn { background: #fff6e8; border-color: #f6dfb6; }
.callout.warn .ttl { color: #9a5b00; }
.callout.deep { background: #fff; border: 1px dashed var(--line-2); }
.callout.deep .ttl { color: var(--faint); }
.callout.feature { background: linear-gradient(180deg, var(--tint), #fff 70%); border: 1px solid var(--line); padding: 18px 22px 20px; }
.callout.feature .ttl { color: var(--link); font-size: 12.5px; }
.callout.feature h3 { margin-top: 2px; }

/* ---------------------------------------------------------------- figures */
figure { margin: 22px 0 26px; }
figure > img, figure > svg, figure > .annot { display: block; width: 100%; height: auto; }
figure.frame > img, figure.frame > svg { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; }
figure.shot > img { border-radius: 10px; box-shadow: 0 6px 22px rgba(20, 26, 34, .18); background: var(--dark); }
figcaption { font-size: 14px; line-height: 1.55; color: var(--muted); margin-top: 10px; }
figcaption b { color: var(--text); font-weight: 650; }
.fig-svg { display: block; width: 100%; height: auto; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pair figure { margin: 0; }
.narrow-fig { max-width: 520px; }

/* annotated screenshot */
.annot { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 22px rgba(20, 26, 34, .18); background: var(--dark); }
.annot img { display: block; width: 100%; height: auto; }
.pin {
  position: absolute; transform: translate(-50%, -50%); width: clamp(15px, 2.1vw, 22px); height: clamp(15px, 2.1vw, 22px);
  border-radius: 50%; background: #fff; color: #10151a; font: 800 clamp(8.5px, 1.1vw, 11.5px)/1 var(--font);
  display: grid; place-items: center; box-shadow: 0 0 0 2.5px var(--acc), 0 2px 8px rgba(0, 0, 0, .55); text-decoration: none;
}
.pin:hover { background: var(--acc); }
ol.legend { list-style: none; padding: 0; margin: 18px 0 8px; columns: 2; column-gap: 28px; font-size: 14.5px; line-height: 1.5; }
ol.legend li { break-inside: avoid; display: grid; grid-template-columns: 30px 1fr; margin: 0 0 9px; }
ol.legend .no {
  width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--acc); display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; margin-top: 1px;
}
ol.legend b { font-weight: 700; }

/* ---------------------------------------------------------------- tables */
.tbl { overflow-x: auto; margin: 16px 0 22px; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
th { text-align: left; font-size: 12px; letter-spacing: .08em; font-weight: 800; color: var(--muted); background: var(--bg-soft); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td p { margin: 0 0 6px; }
td p:last-child { margin: 0; }
.controls td:first-child { width: 132px; }
.controls td:nth-child(2) { width: 132px; }
.controls td:last-child { width: 30%; color: #3a4350; }
.host { display: block; font-size: 12px; color: var(--faint); margin-top: 3px; }
.rng { display: block; white-space: nowrap; font-variant-numeric: tabular-nums; }
.def { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.def b { color: var(--text); font-weight: 650; }
table.compact td { padding: 7px 12px; }
table.num td, .num { font-variant-numeric: tabular-nums; }
td.na { color: var(--faint); }
table.presets td:first-child { white-space: nowrap; font-weight: 650; }

/* ---------------------------------------------------------------- steps & recipes */
ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 10px 0 16px; }
ol.steps > li { counter-increment: s; position: relative; padding-left: 40px; margin: 0 0 10px; }
ol.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--tint); color: var(--link); font-weight: 800; font-size: 13.5px; display: grid; place-items: center;
}
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 14px 0 20px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 6px; background: #fff; }
.card h4 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.card h4 .badge { font-size: 11px; letter-spacing: .1em; font-weight: 800; color: var(--muted); background: var(--chip); padding: 1px 8px; border-radius: 20px; }
.recipe { border: 1px solid var(--line); border-radius: 12px; margin: 22px 0; overflow: hidden; }
.recipe header { padding: 13px 18px 11px; background: var(--bg-soft); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.recipe header h3 { margin: 0; font-size: 18.5px; }
.recipe header .from { font-size: 13.5px; color: var(--muted); }
.recipe .body { padding: 14px 18px 6px; }
.recipe .listen { border-top: 1px dashed var(--line-2); padding-top: 10px; font-size: 15px; }
.recipe .listen b { color: var(--link); }

/* glossary */
dl.gloss { margin: 10px 0; }
dl.gloss dt { font-weight: 700; margin-top: 14px; }
dl.gloss dd { margin: 2px 0 0; color: #333c48; }

/* FAQ */
.faq h4 { margin-top: 22px; }

/* footer */
.foot { margin-top: 70px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  main { padding: 28px 28px 80px; }
  .layout { grid-template-columns: 230px minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .layout { display: block; }
  .toc { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 16px; }
  .toc > nav > ol { columns: 2; column-gap: 18px; }
  .toc ol ol { display: none; }
  main { padding: 24px 16px 70px; }
  .hero h1 { font-size: 31px; }
  .hero::before { display: none; }
  .cols2, .pair { grid-template-columns: 1fr; }
  ol.legend { columns: 1; }
  .controls td:first-child, .controls td:nth-child(2) { width: auto; }
}
@media print {
  .toc { display: none; }
  .layout { display: block; }
  main { padding: 0; }
  h2 { break-after: avoid; }
  figure, .recipe, .callout, tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* fixed column layout for parameter and preset tables */
table.controls { table-layout: fixed; min-width: 640px; }
table.controls th:nth-child(1) { width: 17%; }
table.controls th:nth-child(2) { width: 19%; }
table.controls th:nth-child(3) { width: 39%; }
table.controls th:nth-child(4) { width: 25%; }
.controls td:first-child, .controls td:nth-child(2), .controls td:last-child { width: auto; }
.rng.wrap { white-space: normal; font-size: 13px; letter-spacing: .02em; }
table.presets { table-layout: fixed; min-width: 640px; }
table.presets th:nth-child(1) { width: 18%; }
table.presets th:nth-child(2) { width: 44%; }
table.presets th:nth-child(3) { width: 38%; }

/* preset table: effect strength (beta 0.1) */
.fxl { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; padding: 0 .55em; border-radius: 20px; line-height: 1.7; white-space: nowrap; }
.fxl-none { background: #eef1f4; color: #5b6573; }
.fxl-light { background: #e3f6ea; color: #23784a; }
.fxl-medium { background: #fff1d6; color: #8a5a00; }
.fxl-heavy { background: #ffe1cc; color: #a44a12; }
.fxl-extreme { background: #ffd9dc; color: #a3202c; }
table.presets th:nth-child(1) { width: 17%; }
table.presets th:nth-child(2) { width: 10%; }
table.presets th:nth-child(3) { width: 40%; }
table.presets th:nth-child(4) { width: 33%; }
.callout.release h4 { margin-top: 4px; }
.callout.release p { margin: 8px 0 4px; }

/* preset table: category rows and favourites (beta 0.2) */
table.presets tr.cat td { background: #f1f3f6; color: #4b5563; font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; padding: 7px 12px; }
table.presets .fav { color: #c98a00; }
