/* Cubase Guide (cu-*): lessons, the Project window diagram, key commands, practice quizzes, the first-song
   checklist, fixes, tips and home. Colours only from the style.css tokens, so light and dark both work. */

/* ---------- keys ---------- */
.cu-combo { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; vertical-align: baseline; }
.cu-combo kbd { font-size: 12px; padding: 1px 6px; color: var(--fg); white-space: nowrap; }
.cu-plus { font-size: 11px; color: var(--muted); }
.cu-or { font-size: 12px; color: var(--muted); padding: 0 3px; }

/* ---------- lesson frame ---------- */
.cu-ln-meta { gap: 8px 12px; margin-top: -8px; }
.cu-ln-lesson { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cu-ln-lesson > .prose:first-child p:first-child { margin-top: 0; }
.cu-ln-h { margin-top: 8px; }
.cu-callout-body { display: flex; flex-direction: column; gap: 6px; line-height: 1.6; }
.cu-callout-body a { color: inherit; font-weight: 600; }

.cu-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 68ch; }
.cu-steps li { display: flex; gap: 12px; align-items: flex-start; }
.cu-steps .step-num { width: 28px; height: 28px; font-size: 14px; margin-top: 1px; }
.cu-step-body { flex: 1; min-width: 0; font-size: 16.5px; line-height: 1.6; overflow-wrap: anywhere; }
.cu-list { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; max-width: 68ch; font-size: 16.5px; line-height: 1.6; }

.cu-table { width: 100%; font-size: 15px; }
.cu-table td { vertical-align: top; line-height: 1.5; }
.cu-table td:first-child { min-width: 9em; }
.cu-table code { overflow-wrap: anywhere; }
.cu-os { max-width: 68ch; }
.cu-os-cap { caption-side: top; text-align: left; font: 600 12px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--cool); padding-bottom: 6px; }

.cu-ln-related { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; }
.cu-ln-related h2 { font-size: 20px; }
.cu-ln-complete {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
}
.cu-ln-complete .btn.primary { max-width: 100%; white-space: normal; text-align: left; }

/* ---------- signal flow ---------- */
.cu-flow-fig { gap: 8px; }
.cu-flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; }
.cu-flow li { display: flex; align-items: center; }
.cu-flow li + li::before { content: '→'; color: var(--muted); padding: 0 6px; font-weight: 600; }
.cu-flow-box {
  display: inline-block; padding: 7px 11px; border-radius: 8px; font: 600 14px var(--font-body);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--fg);
}
.cu-flow-box.end { background: var(--cool-soft); border-color: var(--cool); color: var(--cool); }
.cu-flow-box.gap { background: var(--accent-soft); border: 2px dashed var(--accent); color: var(--accent); min-width: 48px; text-align: center; }

/* ---------- Project window diagram ---------- */
.cu-dg-fig { gap: 12px; }
.cu-dg-wrap { width: 100%; max-width: 720px; }
.cu-dg { display: block; width: 100%; height: auto; user-select: none; }
.cu-dg-area { fill: var(--surface-2); stroke: var(--line); stroke-width: 1; transition: fill .15s, stroke .15s; }
.cu-dg-events, .cu-dg-tracks { fill: var(--bg); }
.cu-dg-area.on { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.cu-dg-ink { fill: var(--muted); opacity: 0.35; }
.cu-dg-rec { fill: var(--bad); opacity: 0.7; }
.cu-dg-track { fill: var(--surface); stroke: var(--line); stroke-width: 0.6; }
.cu-dg-tiny { font: 600 7px var(--font-mono); fill: var(--muted); }
.cu-dg-ev { stroke-width: 1; }
.cu-dg-ev.audio { fill: var(--cool-soft); stroke: var(--cool); }
.cu-dg-ev.midi { fill: var(--good-soft); stroke: var(--good); }
.cu-dg-tick { stroke: var(--muted); stroke-width: 0.8; opacity: 0.6; }
.cu-dg-loc { fill: var(--cool); opacity: 0.6; }
.cu-dg-cursor { stroke: var(--fg); stroke-width: 1.2; }
.cu-dg-note { fill: var(--good); opacity: 0.7; }
.cu-dg-dot { cursor: pointer; outline: none; }
.cu-dg-dot circle { fill: var(--accent); stroke: var(--surface); stroke-width: 2; transition: r .15s; }
.cu-dg-dot text { font: 700 10px var(--font-body); fill: var(--accent-ink); pointer-events: none; }
.cu-dg-dot:hover circle, .cu-dg-dot:focus-visible circle { stroke: var(--fg); }
.cu-dg-dot.on circle { fill: var(--fg); stroke: var(--accent); stroke-width: 2.5; }
.cu-dg-dot.on text { fill: var(--bg); }
.cu-dg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cu-dg-chip {
  font: 500 13px var(--font-body); padding: 6px 11px; border-radius: 999px; cursor: pointer; min-height: 34px;
  background: var(--surface-2); color: var(--muted); border: 1px solid transparent;
}
.cu-dg-chip:hover { color: var(--fg); border-color: var(--line); }
.cu-dg-chip.on { background: var(--accent); color: var(--accent-ink); }
.cu-dg-info { display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); border-radius: var(--radius); padding: 14px 16px; min-height: 120px; }
.cu-dg-info p { line-height: 1.6; max-width: 68ch; }

/* ---------- filter chips (key commands, tips) ---------- */
.cu-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cu-chip-btn {
  font: 500 13px var(--font-body); padding: 6px 12px; border-radius: 999px; cursor: pointer; min-height: 34px;
  background: var(--surface-2); color: var(--muted); border: 1px solid transparent;
}
.cu-chip-btn:hover { color: var(--fg); border-color: var(--line); }
.cu-chip-btn.on { background: var(--accent); color: var(--accent-ink); }

/* ---------- key commands ---------- */
.cu-keys-controls { align-items: end; }
.cu-keys-search, .cu-fix-search { flex: 1 1 240px; max-width: 520px; }
.cu-keys-search input, .cu-fix-search input { width: 100%; }
.cu-keys-group h2 { font-size: 20px; }
.cu-keys-table td:first-child { width: 50%; }
.cu-keys-table td { vertical-align: middle; }
.cu-keys-note { display: block; font-size: 12.5px; color: var(--muted); }

/* ---------- practice ---------- */
.cu-pr-stage { gap: 14px; }
.cu-pr-prompt { font-size: clamp(22px, 3.4vw, 30px); overflow-wrap: anywhere; }
.cu-pr-prompt .cu-combo kbd { font-size: 0.7em; padding: 2px 8px; }
.cu-pr-sub:empty, .cu-pr-fig:empty { display: none; }
.cu-pr-fig .figure { box-shadow: none; padding: 12px; }
.cu-pr-answers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.cu-pr-ans { position: relative; min-height: 56px; padding: 10px 26px 10px 14px; text-align: left; justify-content: flex-start; white-space: normal; }
.cu-pr-ans[disabled] { opacity: 1; cursor: default; }
.cu-pr-ans-label { font-weight: 600; line-height: 1.35; }
.cu-pr-ans.good .cu-combo kbd, .cu-pr-ans.bad .cu-combo kbd { border-color: currentColor; }
.cu-pr-key { position: absolute; top: 4px; right: 5px; font-size: 10px; padding: 0 3px; line-height: 1.3; opacity: 0.55; border-bottom-width: 1px; }
@media (hover: none) { .cu-pr-key, .cu-pr-hint { display: none; } }
.cu-pr-why { color: var(--fg); line-height: 1.6; max-width: 68ch; }
.cu-pr-why:empty { display: none; }

/* ---------- first song ---------- */
.cu-walk-progress { gap: 12px; }
.cu-walk-count { font: 700 18px var(--font-display); }
.cu-walk-phase h2 { font-size: 21px; }
.cu-walk-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cu-walk-step {
  display: flex; flex-direction: column; gap: 6px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, background .15s;
}
.cu-walk-step.done { background: var(--good-soft); border-color: var(--good); }
.cu-walk-check { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 36px; }
.cu-walk-check input { flex: none; width: 22px; height: 22px; }
.cu-walk-num { font: 600 13px var(--font-mono); color: var(--muted); min-width: 1.6em; }
.cu-walk-title { font-weight: 650; font-size: 16.5px; line-height: 1.35; }
.cu-walk-step.done .cu-walk-title { color: var(--good); }
.cu-walk-body { padding-left: 32px; display: flex; flex-direction: column; gap: 6px; }
.cu-walk-body p { color: var(--muted); line-height: 1.55; max-width: 68ch; }
.cu-walk-links { gap: 6px 14px; }
.cu-walk-links a { font-weight: 600; text-decoration: none; }
.cu-walk-links a:hover { text-decoration: underline; }
@media (max-width: 480px) { .cu-walk-body { padding-left: 0; } }

/* ---------- fixes ---------- */
.cu-fix {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 14px 18px;
}
.cu-fix > summary h2 { font-size: 19px; }
.cu-fix[open] > * + * { margin-top: 14px; }
.cu-fix[open] > summary + * { margin-top: 8px; }
.cu-fix-intro { color: var(--muted); line-height: 1.6; max-width: 68ch; }
@media (max-width: 600px) { .cu-fix { padding: 12px 14px; } }

/* ---------- tips ---------- */
.cu-totd { display: flex; flex-direction: column; gap: 10px; background: var(--accent-soft); border-radius: var(--radius); padding: 18px; }
.cu-tip { display: flex; flex-direction: column; gap: 8px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.cu-tip p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.cu-tip-link { margin-top: auto; font-size: 14px; font-weight: 600; text-decoration: none; }
.cu-tip-link:hover { text-decoration: underline; }
.cu-tip-featured { border-color: var(--accent); }
.cu-tip-featured h2 { font-size: clamp(24px, 5vw, 32px); }
.cu-tip-featured p { color: var(--fg); font-size: 17px; max-width: 62ch; }
.cu-tip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.cu-tips-empty { grid-column: 1 / -1; padding: 24px 0; text-align: center; }
.cu-about p { color: var(--muted); line-height: 1.6; max-width: 68ch; }

/* ---------- home ---------- */
.cu-hero-figure { width: 100%; }
.cu-hero-art { display: block; width: 100%; height: auto; }
.cu-art-grid { stroke: var(--line); stroke-width: 1; }
.cu-art-name { font: 600 11px var(--font-body); fill: var(--muted); }
.cu-art-part { stroke-width: 1.2; }
.cu-art-part.a { fill: var(--accent-soft); stroke: var(--accent); }
.cu-art-part.b { fill: var(--cool-soft); stroke: var(--cool); }
.cu-art-part.c { fill: var(--good-soft); stroke: var(--good); }
.cu-art-part.d { fill: var(--surface-2); stroke: var(--muted); }
.cu-art-cursor { stroke: var(--fg); stroke-width: 1.5; }

.cu-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.cu-quick-link {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; text-decoration: none; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s;
}
.cu-quick-link:hover { border-color: var(--accent); }
.cu-quick-link span { font-size: 14px; color: var(--muted); }

.cu-course { display: flex; flex-direction: column; gap: 4px; }
.cu-course-row {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(60px, 1fr) auto; gap: 12px; align-items: center;
  padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--fg);
}
.cu-course-row:hover { background: var(--surface-2); }
.cu-course-name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.cu-course-n { font-size: 13px; color: var(--muted); }
.cu-disclaimer { max-width: 68ch; }
