/* SPDX-License-Identifier: GPL-3.0-only */
:root {
  --bg: #0b0b10; --panel: #15151d; --panel2: #1e1e28; --line: #2c2c3a; --dim: #8a8a9a; --txt: #ececf2;
  --acc: #00a0e8; --accd: #344c84; --ok: #d8c05c; --rec: #c43e30;
  /* the J-6's blue leads; the rest are the Juno-60 panel's section and button colours */
  --jblue: #4a6298; --jred: #c43e30; --jyel: #d8c05c; --jorg: #d88010; --jcream: #d8d0a8; --key-w: #d8d8de; --key-b: #16161c;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--txt); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--acc); }
button { font: inherit; color: inherit; }
header.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
header.top h1 { font-size: 22px; margin: 0; letter-spacing: 1px; }
header.top .sub { color: var(--dim); font-size: 12px; }
header.top .spacer { flex: 1; }
.btn { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.btn:hover { border-color: var(--acc); }
.btn.acc { background: var(--acc); color: #111; border-color: var(--acc); font-weight: 600; }
.btn.small { padding: 3px 8px; font-size: 12px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 9px; background: var(--panel2); color: var(--dim); font-size: 12px; }
.pill.on { background: var(--ok); color: #111; }

/* ---- the editor ---- */
.editor { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-height: 600px; }
.tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab { padding: 8px 14px; cursor: pointer; border-radius: 8px 8px 0 0; color: var(--dim); }
.tab.on { background: var(--panel2); color: var(--txt); }
.pane { display: none; padding: 16px; }
.pane.on { display: block; }
.pane h2 { margin: 0 0 4px; font-size: 16px; }
.pane p.hint { color: var(--dim); margin: 0 0 12px; font-size: 13px; }
.grid8 { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.cell { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 6px; cursor: pointer; font-size: 12px; min-height: 34px; }
.cell:hover { border-color: var(--acc); }
.cell.on { background: var(--acc); color: #111; border-color: var(--acc); }
.cell.play { box-shadow: inset 0 0 0 2px var(--ok); }
.cell.off { opacity: .35; }
.cell .n { color: var(--dim); font-size: 10px; }
.cell.on .n { color: #06324a; }
.knobs8 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 16px; margin-top: 14px; }
.knobs8 label { font-size: 12px; color: var(--dim); display: block; }
.knobs8 input { width: 100%; accent-color: var(--acc); }
.chordcards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 12px; }
.ccard { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; cursor: pointer; text-align: center; }
.ccard.black { background: #101016; }
.ccard.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.ccard .k { font-size: 11px; color: var(--dim); }
.ccard .c { font-size: 15px; font-weight: 600; margin: 2px 0; }
.ccard .nn { font-size: 10px; color: var(--dim); }
select, input[type=number] { background: var(--panel2); color: var(--txt); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font: inherit; }
.roll { background: var(--panel2); border-radius: 8px; height: 110px; position: relative; overflow: hidden; margin-top: 10px; }
.roll .ev { position: absolute; height: 18px; border-radius: 3px; background: var(--txt); }
.roll .ev.acc { background: var(--jorg); }
.roll .beat { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.stylelist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.varlist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.steps { display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; margin-top: 10px; }
.steps .cell { min-height: 46px; padding: 3px; text-align: center; font-size: 11px; }
.setlist { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; max-width: 520px; }
.setlist .grp { grid-column: 1 / -1; color: var(--jcream); font-size: 12px; letter-spacing: 1px; margin-top: 10px; }
.setlist .val { display: flex; gap: 6px; align-items: center; }
.setlist .val b { min-width: 120px; text-align: right; font-weight: 500; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.log { font: 12px ui-monospace, Menlo, monospace; color: var(--dim); background: var(--panel2); border-radius: 6px; padding: 8px; max-height: 140px; overflow: auto; }

/* ---- the tour ---- */
.tour { margin: 12px 0; background: var(--panel); border: 1px solid var(--acc); border-left-width: 5px; border-radius: 10px; box-shadow: 0 10px 28px #0009; display: none; }
.tour.on { display: block; }
.tour .th { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tour .th b { flex: 1; }
.tour .tb { padding: 12px; }
.tour .tb h3 { margin: 0 0 6px; font-size: 15px; }
.tour .tb p { margin: 6px 0; }
.tour .tb kbd { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: 12px; }
.tour .tf { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); }
.tour .tf .prog { flex: 1; height: 4px; background: var(--panel2); border-radius: 2px; overflow: hidden; }
.tour .tf .prog i { display: block; height: 100%; background: var(--acc); }
.tour .done { color: var(--jyel); font-weight: 600; }
.chapters { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 8px; }
.chapters button { text-align: left; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font-size: 12px; cursor: pointer; }
.chapters button.ok { border-color: var(--jyel); }
table.ref { border-collapse: collapse; width: 100%; font-size: 13px; }
table.ref td, table.ref th { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
table.ref th { color: var(--acc); font-weight: 600; }

/* Juno-60 section bars over the panel knobs: VCF/ENV red for the filter and envelope, chorus blue for the effects */
#enc2 .label, #enc3 .label { border-top: 3px solid var(--jred); padding-top: 2px; }
#enc4 .label, #enc5 .label { border-top: 3px solid var(--jblue); padding-top: 2px; }
.ccard.on { border-color: var(--acc); }

/* ---- the Workbench page ---- */
main.wb { max-width: 1040px; margin: 0 auto; padding: 16px 16px 48px; }
header.site { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; margin: 0 0 14px; }
header.site .brand { display: flex; align-items: center; gap: 12px; }
header.site h1 { margin: 0; letter-spacing: .04em; }
header.site p { margin: 0; color: var(--dim); font-size: .95rem; }
header.site nav { margin-left: auto; display: flex; gap: 1.2rem; }
header.site nav a { color: var(--dim); text-decoration: none; font-weight: 500; }
header.site nav a:hover { color: var(--acc); }
.hint-banner { display: flex; align-items: center; gap: .8rem; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--acc); border-radius: 10px; padding: 11px 16px; margin: 12px 0; height: calc(3 * 1.45em + 22px); overflow: hidden; }   /* a fixed height: three lines, so a longer hint never moves the page */
.hint-icon { font-size: 1.25rem; flex-shrink: 0; }
.bar { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; color: var(--dim); font-size: .92rem; }
.bar .chk { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.bar #devStatus { margin-left: auto; font-variant-numeric: tabular-nums; }
.btn[aria-pressed="true"] { background: var(--acc); color: #06324a; border-color: var(--acc); font-weight: 600; }
.keys-help { color: var(--dim); font-size: 12px; margin: 10px 0 18px; }
@media (max-width: 700px) { header.site nav { margin-left: 0; } }
@media (max-width: 700px) { .hint-banner { height: calc(6 * 1.45em + 22px); } }

/* the name: a bold serif, in one colour */
header.site h1, header.top h1 { font-family: "Playfair Display", Georgia, "Times New Roman", serif; font-weight: 900; color: var(--acc); }
header.site h1 { font-size: 2.3rem; line-height: 1.1; }
