/* Kandecksky user guide — self-contained, offline. Mirrors the app's dark
   canvas + Kandinsky triad without importing the app stylesheet, so the help
   window renders identically no matter what skin the app is wearing. */

:root {
  --bg:      #0d0d0d;
  --bg2:     #161616;
  --bg3:     #1f1f1f;
  --border:  #2e2e2e;
  --text:    #e4e2dc;
  --muted:   #8f8d86;
  --k-blue:   #1255b8;
  --k-yellow: #e8c020;
  --k-red:    #cc2b14;
  --accent:   #2a6fd4;
  --code-bg:  #191919;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  display: flex;
}

/* ── Sidebar TOC ─────────────────────────────────────────── */
nav {
  width: 230px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--bg2);
  padding: 18px 0 24px;
  /* blue / yellow / red — same order as the app's brand rail */
  border-right: 3px solid transparent;
  border-image: linear-gradient(to bottom,
    var(--k-blue)   0%, var(--k-blue)   33.3%,
    var(--k-yellow) 33.3%, var(--k-yellow) 66.6%,
    var(--k-red)    66.6%, var(--k-red)   100%
  ) 1;
}

nav .nav-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 14px;
  font-weight: 900;
  letter-spacing: 2px;
  font-size: 13px;
  text-transform: uppercase;
}

nav a {
  display: block;
  padding: 4px 16px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12.5px;
}
nav a:hover { color: var(--text); background: var(--bg3); }
nav .nav-group {
  margin-top: 12px;
  padding: 0 16px 2px;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
}

/* ── Content ─────────────────────────────────────────────── */
main {
  flex: 1;
  min-width: 0;
  max-width: 780px;
  padding: 28px 40px 80px;
}

h1 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.subtitle { color: var(--muted); margin-bottom: 30px; }

section { margin-bottom: 44px; }

h2 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 12px;
  padding-top: 18px;
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(to right,
    var(--k-blue) 0%, var(--k-blue) 33.3%,
    var(--k-yellow) 33.3%, var(--k-yellow) 66.6%,
    var(--k-red) 66.6%, var(--k-red) 100%
  ) 1;
}

h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 18px 0 6px;
  color: var(--k-yellow);
}

p, ul, ol { margin-bottom: 10px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 4px; }

a { color: var(--accent); }

kbd {
  display: inline-block;
  padding: 1px 6px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 14px;
  font-size: 13px;
}
th, td {
  text-align: left;
  padding: 6px 10px;
  border: 1px solid var(--border);
  vertical-align: top;
}
th {
  background: var(--bg3);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
tbody tr:nth-child(even) { background: var(--bg2); }

.callout {
  border-left: 3px solid var(--k-yellow);
  background: var(--bg2);
  padding: 10px 14px;
  border-radius: 0 4px 4px 0;
  margin: 12px 0;
}
.callout.warn { border-left-color: var(--k-red); }
.callout.tip  { border-left-color: var(--k-blue); }
.callout .label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

/* State-colour swatches used when describing pad/LED feedback */
.state {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: baseline;
}
.state.green { background: #3fae4a; }
.state.amber { background: #e8a020; }
.state.red   { background: #cc2b14; }

@media print {
  nav { display: none; }
  body { background: #fff; color: #111; }
  main { max-width: none; }
}
