@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
:root {
  --bg: #0b0b14;
  --panel: #14142a;
  --panel-2: #1b1b38;
  --line: #2a2a52;
  --text: #ecebff;
  --muted: #9a98c4;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --good: #34d399;
  --warn: #fbbf24;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100vh; background: radial-gradient(1200px 600px at 80% -10%, #2b1b5a55, transparent), radial-gradient(900px 500px at -10% 10%, #0e4a6a44, transparent), var(--bg); }
a { color: var(--accent-2); text-decoration: none; }

.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 12px 20px; background: #0b0b14d9; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 800; letter-spacing: .5px; margin-right: auto; font-size: 18px; color: var(--text); }
.brand span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav a.link { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 14px; }
.nav a.link:hover { color: var(--text); background: var(--panel); }
.nav a.link.active { color: var(--text); background: var(--panel-2); border: 1px solid var(--line); }
.nav a.link.soon { opacity: .55; cursor: default; }
.nav .tag { font-size: 10px; margin-left: 6px; padding: 2px 6px; border-radius: 6px; background: var(--panel-2); color: var(--warn); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }
h1 { font-size: clamp(28px, 5vw, 48px); margin: 0 0 10px; line-height: 1.1; }
h2 { margin: 0 0 12px; font-size: 22px; }
p.lead { color: var(--muted); font-size: 17px; max-width: 640px; line-height: 1.5; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 24px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--text); transition: transform .15s, border-color .15s; }
a.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card h3 { margin: 0; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.card .emoji { font-size: 30px; }
.card.disabled { opacity: .55; }
.badge { align-self: flex-start; font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--good); }
.badge.soon { color: var(--warn); }

.btn { appearance: none; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); padding: 9px 14px; border-radius: 10px; font-size: 14px; cursor: pointer; font-family: inherit; }
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: linear-gradient(90deg, var(--accent), #6d4de0); border-color: transparent; font-weight: 600; }
.btn.danger { color: #fb7185; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
label.ctl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 140px; }
input[type=range] { accent-color: var(--accent); width: 100%; }
input[type=text], input[type=url], .ctl input[type=number] { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 9px 12px; border-radius: 10px; font-size: 14px; width: 100%; } .ctl input[type=number] { width: auto; }

.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 40px 20px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; }
.drop.over, .drop:hover { border-color: var(--accent); color: var(--text); background: #8b5cf611; }
canvas.wave { width: 100%; height: 180px; display: block; background: #07070f; border-radius: 10px; border: 1px solid var(--line); cursor: crosshair; touch-action: none; }
.time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.status { color: var(--muted); font-size: 13px; min-height: 18px; }
.hidden { display: none !important; }

.modal { position: fixed; inset: 0; background: #000b; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal .box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; width: min(760px, 100%); max-height: 94vh; overflow: auto; }
.modal canvas { background: #07070f; border-radius: 10px; max-width: 100%; display: block; margin: 8px auto; touch-action: none; }
.modal iframe { width: 100%; height: 70vh; border: 0; border-radius: 10px; background: #000; }
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 420px; margin: 12px auto; }
.mem-card { aspect-ratio: 1; font-size: 34px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; }
.mem-card.up { background: #8b5cf633; }
.mem-card.done { background: #34d39933; cursor: default; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 0; }

/* ---- DJ mixer ---- */
.djgrid { display: grid; grid-template-columns: 1fr 260px 1fr; gap: 16px; align-items: start; margin-top: 8px; }
@media (max-width: 900px) { .djgrid { grid-template-columns: 1fr; } .mixer { order: -1; } }
.deck { margin-top: 0; }
.deck h2 { display: flex; justify-content: space-between; align-items: center; }
.deck .bpm { font-size: 13px; color: var(--accent-2); font-weight: 600; }
.deck .tname { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px; }
.deck canvas { height: 90px; }
.deck .eq { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.deck .eq label.ctl { min-width: 0; align-items: center; text-align: center; }
.pads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pad { height: 54px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; font-size: 13px; font-family: inherit; }
.pad:active { background: var(--accent); }
.on { border-color: var(--good) !important; color: var(--good); }
.rec-on { background: #be123c !important; }

/* ---- polish: accessibility, branding, legal pages, mobile ---- */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand img { display: block; border-radius: 6px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.wrap:focus { outline: none; }
footer a { color: var(--muted); text-decoration: underline; }
footer a:hover { color: var(--text); }
.fnav { display: inline; }
.prose h2 { margin-top: 28px; }
.prose p, .prose li { color: var(--muted); line-height: 1.65; }
.prose ul { padding-left: 22px; }
.prose b { color: var(--text); }
.prose code { background: var(--panel-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (max-width: 700px) {
  .nav { padding: 10px 12px; gap: 4px; }
  .brand { width: 100%; margin-bottom: 4px; }
  .nav a.link { padding: 8px 11px; }
  .wrap { padding: 20px 14px 60px; }
  .btn { min-height: 42px; padding: 10px 14px; }
  .btn.sm { min-height: 36px; }
  input[type=range] { min-height: 28px; }
  .grid { grid-template-columns: 1fr; }
  label.ctl { min-width: 0; }
}

/* contrast + heading fixes (white text needs >= 4.5:1) */
.btn.primary { background: linear-gradient(90deg, #7547ea, #6d4de0); }
.key.sel, .pad:active { background: #6d4de0; }
.skip { background: #6d4de0; }
.card h2 { margin: 0; font-size: 18px; }

/* beat maker */
.bgrid { display: grid; gap: 6px; }
.brow { display: grid; grid-template-columns: 64px repeat(16, 1fr); gap: 4px; align-items: center; }
.brow > span { font-size: 13px; color: var(--muted, #a8a8c0); }
.bstep { height: 36px; min-width: 0; padding: 0; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; }
.bstep:nth-of-type(4n+1) { border-color: #5a5a80; }
.bstep[aria-pressed="true"] { background: #6d4de0; border-color: #6d4de0; }
.bstep.now { outline: 2px solid #22d3ee; outline-offset: 1px; }
@media (max-width: 700px) { .brow { grid-template-columns: 44px repeat(16, 1fr); gap: 2px; } .bstep { height: 32px; border-radius: 5px; } }

/* DJ extras */
.mini { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 8px; border-radius: 10px; font: inherit; }
.btn.hot.on { background: #6d4de0; border-color: #6d4de0; }
.btn.on { background: #0f766e; border-color: #0f766e; }
.km.same\ key, .km.compatible { color: #34d399; } .km.clash { color: #fbbf24; }
.amlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.amlist li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); font-size: 14px; }
.amlist li.now { border-color: #22d3ee; } .amlist li .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amlist li { flex-wrap: wrap; } .amlist li .ammp { font-size: 12px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; } .amlist li .ammp input { width: 56px; padding: 3px 6px; font-size: 12px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; }
.amlist li .meta { color: var(--muted); font-size: 12px; } .amlist li button { padding: 4px 10px; }

.btn.stem[aria-pressed="false"] { background: transparent; color: var(--muted); text-decoration: line-through; }
.btn.stem[aria-pressed="true"] { background: #6d4de0; border-color: #6d4de0; }

canvas.zoom { width: 100%; height: 84px; display: block; margin-top: 8px; background: #07070f; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; touch-action: none; }
.gridtools { margin-top: 8px; font-size: 13px; color: var(--muted); } .gridtools summary { cursor: pointer; }

canvas.meter { width: 100%; height: 40px; display: block; background: #07070f; border-radius: 8px; border: 1px solid var(--line); margin-top: 10px; }
canvas.dmeter { width: 100%; height: 8px; display: block; background: #07070f; border-radius: 4px; margin-bottom: 8px; }
.keytbl { width: 100%; border-collapse: collapse; font-size: 14px; } .keytbl td { padding: 4px 8px; border-bottom: 1px solid var(--line); }
kbd { background: var(--panel-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; font: 13px ui-monospace, monospace; }

/* tables and selects on tool pages (converter, BPM finder) */
.tblwrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; letter-spacing: .6px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 10px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; word-break: break-word; }
.tbl td.bad { color: #fda4af; }
select { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 9px 12px; border-radius: 10px; font-size: 14px; }
/* recorder */
.meterbox { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; height: 18px; overflow: hidden; }
.lvlbar { height: 100%; width: 0; background: linear-gradient(90deg, #22d3ee, #34d399); transition: width .05s linear; }
.lvlbar.hot { background: linear-gradient(90deg, #34d399, #fbbf24); } .lvlbar.clip { background: #f43f5e; }
.recbig { min-width: 150px; height: 56px; font-size: 18px; } .rec-on { background: #be123c !important; border-color: #fb7185 !important; color: #fff !important; }
.bigtime { font: 700 34px ui-monospace, monospace; min-width: 130px; }
.countnum { font-size: 72px; font-weight: 800; text-align: center; color: var(--accent); }
.takes { list-style: none; padding: 0; margin: 0; } .take { border-top: 1px solid var(--line); padding: 12px 0; } .take audio { width: 100%; margin-top: 8px; }
.seg { display: inline-flex; gap: 0; } .seg .btn { border-radius: 0; } .seg .btn:first-child { border-radius: 10px 0 0 10px; } .seg .btn:last-child { border-radius: 0 10px 10px 0; }
.seg .btn[aria-pressed="true"] { background: #6d4de0; border-color: #6d4de0; color: #fff; }
#meters td { font-variant-numeric: tabular-nums; } #meters .bad { color: #fbbf24; font-weight: 600; } #meters .good { color: #34d399; }
.kb { margin-top: 12px; user-select: none; overflow-x: auto; max-width: 100%; } .kbin { position: relative; height: 154px; }
.kb .wk, .kb .bk { position: absolute; top: 0; border: 1px solid #222; cursor: pointer; padding: 0; }
.kb .wk { height: 150px; background: #f1f1f6; border-radius: 0 0 6px 6px; } .kb .wk.in { background: #c9b8ff; } .kb .wk.root { background: #8b6cf0; }
.kb .bk { height: 92px; background: #15151f; z-index: 2; border-radius: 0 0 4px 4px; } .kb .bk.in { background: #5b43b8; } .kb .bk.root { background: #8b6cf0; }
.kb .wk:focus-visible, .kb .bk:focus-visible { outline: 3px solid #fbbf24; z-index: 3; }
.found { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.loopgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.loopcard { background: var(--panel, #14151f); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; } .loopcard h3 { margin: 0 0 4px; font-size: 16px; } .loopcard p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.loopcard .row { gap: 6px; flex-wrap: wrap; }

/* ---- premium polish shared by every page ---- */
.nav { padding: 10px 24px; background: rgba(8, 8, 15, .72); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.brand { display: inline-flex; align-items: center; gap: 0; font-weight: 700; letter-spacing: -.01em; font-size: 19px; }
.nav a.link { transition: color .2s, background-color .2s; font-weight: 500; }
.nav a.link.active { background: rgba(139, 92, 246, .16); border-color: rgba(139, 92, 246, .45); }
:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; border-radius: 6px; }
.btn { transition: border-color .2s, background-color .2s, transform .15s; } .btn:active:not(:disabled) { transform: translateY(1px); }
.panel, .card { box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset; }
h1, h2 { letter-spacing: -.02em; }
footer { border-top: 1px solid rgba(255, 255, 255, .06); margin-top: 20px; padding: 34px 20px; }
.brand img { margin-right: 9px; }
.brand span { margin-right: .26em; }
#tools { scroll-margin-top: 70px; } html { scroll-behavior: smooth; } @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }


/* ---- metronome ---- */
.metro { text-align: center; }
.beats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.dot { width: 26px; height: 26px; border-radius: 50%; background: var(--panel-2); border: 2px solid var(--line); transition: transform .06s, background .06s; }
.dot[data-l="3"] { border-color: var(--warn); } .dot[data-l="0"] { opacity: .35; border-style: dashed; } .dot[data-l="1"] { transform: scale(.8); }
.dot.on { background: var(--accent-2); border-color: var(--accent-2); transform: scale(1.25); } .dot.on[data-l="3"] { background: var(--warn); border-color: var(--warn); }
.mtempo { display: flex; align-items: center; justify-content: center; gap: 18px; }
.mtempo .btn { width: 52px; height: 52px; font-size: 26px; padding: 0; }
.mbpm { display: flex; flex-direction: column; align-items: center; }
.mbpm input { width: 150px; background: transparent; border: 0; color: var(--text); font: 800 72px "Bricolage Grotesque", system-ui, sans-serif; text-align: center; padding: 0; -moz-appearance: textfield; }
.mbpm input::-webkit-inner-spin-button { display: none; }
.mbpm span { color: var(--muted); font-weight: 700; letter-spacing: 2px; font-size: 13px; }
.mname { color: var(--accent-2); font-weight: 700; margin: 4px 0 10px; font-size: 18px; }
.beatpick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.beatpick .bp { min-width: 46px; font-weight: 700; } .beatpick .bp[data-l="3"] { border-color: var(--warn); color: var(--warn); } .beatpick .bp[data-l="2"] { border-color: var(--accent-2); } .beatpick .bp[data-l="1"] { opacity: .75; } .beatpick .bp[data-l="0"] { opacity: .45; text-decoration: line-through; }

/* ---- looper ---- */
.lpbar { height: 14px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line); margin-top: 14px; overflow: hidden; position: relative; }
#lpfill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); } .lpbar.rec #lpfill { background: #e11d48; } .lpbar.count #lpfill { background: var(--warn); }
.layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.layers li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.layers canvas { width: 160px; height: 36px; background: var(--bg); border-radius: 6px; } .layers li.muted { opacity: .55; }
.layers .nm { font-weight: 700; min-width: 70px; } .layers input[type=range] { width: 120px; }

/* ---- chord tools ---- */
[hidden] { display: none !important; }
.ttabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 14px; }
.ttab { appearance: none; background: var(--panel); border: 1px solid var(--line); color: var(--muted); padding: 10px 16px; border-radius: 999px; font: 600 14px inherit; font-family: inherit; cursor: pointer; }
.ttab:hover { color: var(--text); } .ttab[aria-selected="true"] { background: #6d4de0; border-color: #6d4de0; color: #fff; } .ttab:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }
.pcs { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.pcs button { padding: 14px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: 700 15px inherit; font-family: inherit; cursor: pointer; }
.pcs button.blk { background: #0e0e1c; } .pcs button[aria-pressed="true"] { background: #6d4de0; border-color: #a78bfa; color: #fff; }
.fres { margin-top: 14px; min-height: 60px; } .fres .big { font-size: 34px; font-weight: 800; margin-right: 12px; } .fres .alt { display: inline-block; margin: 4px 8px 4px 0; padding: 4px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.shapes { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; } .shape { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; } .shape svg { width: 140px; height: auto; display: block; }
.lpiano svg { width: min(100%, 520px); height: auto; }
.fbwrap { overflow-x: auto; margin-top: 12px; } #fb { min-width: 760px; width: 100%; height: auto; }
.circlewrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; } #circle { width: min(100%, 460px); height: auto; } .cinfo { flex: 1; min-width: 240px; line-height: 1.6; }
#circle g.seg { cursor: pointer; } #circle path { fill: var(--panel-2); stroke: var(--bg); stroke-width: 2; } #circle .min path { fill: #17172e; } #circle g.seg:hover path { fill: #2d2860; } #circle g.on path { fill: #6d4de0; } #circle g.nb path { fill: #3a3278; } #circle g.rel path { fill: #4a3d96; } #circle g.seg:focus-visible path { stroke: var(--warn); stroke-width: 4; }
#circle text { fill: var(--text); font: 700 20px inherit; font-family: inherit; text-anchor: middle; dominant-baseline: central; pointer-events: none; } #circle .min text { font-size: 15px; fill: var(--muted); } #circle g.on text { fill: #fff; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; } @media (max-width: 700px) { .twocol { grid-template-columns: 1fr; } .pcs { grid-template-columns: repeat(6, 1fr); } }
textarea { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: 14px ui-monospace, monospace; width: 100%; }
#mmplan:empty { display: none; }

.jrow { display: flex; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); } .jrow span { flex: 1; overflow-wrap: anywhere; }

.rstep { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); } .ropt { display: flex; gap: 10px; flex-wrap: wrap; }

.tplgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 8px 0; }
.tpl { appearance: none; text-align: left; background: var(--panel); border: 2px solid var(--line); color: var(--text); border-radius: 12px; padding: 12px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.tpl span { color: var(--muted); font-size: 13px; } .tpl:hover { border-color: #6d4de0; } .tpl[aria-pressed="true"] { border-color: #6d4de0; background: rgba(109,77,224,.14); } .tpl:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }
.fine summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.tmeter { margin: 18px 0 6px; text-align: center; } .tnote { font-size: 88px; line-height: 1; font-weight: 800; letter-spacing: -2px; }
.tmeter[data-state="ok"] .tnote { color: #46e08a; } .tmeter[data-state="off"] .tnote { color: var(--text); } .tmeter[data-state="idle"] .tnote { color: var(--muted); }
.tbar { position: relative; height: 14px; border-radius: 999px; background: linear-gradient(90deg, #ff6b8a55, #ffffff14 42%, #46e08a55 50%, #ffffff14 58%, #ff6b8a55); margin: 14px auto 4px; max-width: 520px; }
.tmark { position: absolute; top: -6px; width: 2px; height: 26px; background: #46e08a; transform: translateX(-1px); }
.tneedle { position: absolute; top: -4px; width: 12px; height: 22px; border-radius: 6px; background: #fff; transform: translateX(-6px); transition: left .12s ease-out; box-shadow: 0 0 10px #0008; }
.tscale { display: flex; justify-content: space-between; max-width: 520px; margin: 0 auto; font-size: 12px; color: var(--muted); } .thz { margin-top: 10px; font-size: 18px; } .tcents { color: var(--muted); min-height: 1.4em; }
#strings button.near { border-color: #46e08a; } #strings button[aria-pressed="true"] { background: #6d4de0; }

/* synthesizer */
.kb .wk.on { background: #22d3ee; } .kb .bk.on { background: #0e7490; }
.fs { border: 1px solid #ffffff1c; border-radius: 12px; margin: 12px 0 0; padding: 4px 12px 12px; } .fs legend { padding: 0 6px; font-weight: 600; }
.fs .mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px; }

/* ---- themes: Dark neon is the default above. Light and High contrast switch on html[data-theme]. ---- */
.nav button.link { font: inherit; font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 999px; color: var(--muted); background: transparent; border: 1px solid transparent; cursor: pointer; margin-left: auto; }
.nav button.link:hover { color: var(--text); background: var(--panel); }

html[data-theme=contrast] { --bg: #000000; --panel: #000000; --panel-2: #121212; --line: #ffffff; --text: #ffffff; --muted: #f0f0f0; --accent: #ffe14d; --accent-2: #7dd3fc; --good: #6ee7b7; --warn: #fde047; color-scheme: dark; }
html[data-theme=contrast] body { background: #000; }
html[data-theme=contrast] .nav { background: #000; border-bottom: 2px solid #fff; }
html[data-theme=contrast] .panel, html[data-theme=contrast] .card, html[data-theme=contrast] .btn, html[data-theme=contrast] input, html[data-theme=contrast] select, html[data-theme=contrast] textarea { border-color: #fff; }
html[data-theme=contrast] a { text-decoration: underline; }
html[data-theme=contrast] .nav a, html[data-theme=contrast] .brand, html[data-theme=contrast] .cta, html[data-theme=contrast] a.card, html[data-theme=contrast] .chips a { text-decoration: none; }
html[data-theme=contrast] .home { --line2: #ffffff; --amber: #ffe14d; }
html[data-theme=contrast] .cta { box-shadow: none; } html[data-theme=contrast] .cta:hover { background: #fff; }
html[data-theme=contrast] .hero::before { display: none; }
html[data-theme=contrast] .cta.ghost { border-color: #fff; }
html[data-theme=contrast] .deck, html[data-theme=contrast] .facts p { background: #000; }
html[data-theme=contrast] .st { background: #1a1a1a; border-color: #fff; }
html[data-theme=contrast] .hero .lead { color: #fff; }
html[data-theme=contrast] .hero h1 .l2 { color: #ffe14d; }
html[data-theme=contrast] .deckhead select { background: #000; border-color: #fff; }

/* Light theme: warm paper. Cream surfaces, ink text, burnt orange accent with a teal second colour; waveforms turn into ink on paper. */
html[data-theme=light] { --bg: #f4f6fb; --panel: #ffffff; --panel-2: #e9edf5; --line: #d0d7e5; --text: #0f172a; --muted: #475569; --accent: #0f766e; --accent-2: #4f46e5; --good: #166534; --warn: #92400e; color-scheme: light; }
html[data-theme=light] body { background: radial-gradient(1200px 600px at 80% -10%, #dbe4ff80, transparent), radial-gradient(900px 500px at -10% 10%, #d9ecff80, transparent), var(--bg); }
html[data-theme=light] .nav { background: rgba(255, 255, 255, .88); border-bottom-color: var(--line); }
html[data-theme=light] .nav a.link.active { background: rgba(15, 118, 110, .12); border-color: rgba(15, 118, 110, .4); }
html[data-theme=light] footer { border-top-color: var(--line); }
html[data-theme=light] .panel, html[data-theme=light] .card { box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
html[data-theme=light] .drop.over, html[data-theme=light] .drop:hover { background: #0f766e14; }
html[data-theme=light] .tbl td.bad { color: #b91c1c; }
html[data-theme=light] .btn.primary, html[data-theme=light] .seg .btn[aria-pressed="true"], html[data-theme=light] .ttab[aria-selected="true"], html[data-theme=light] .pcs button[aria-pressed="true"], html[data-theme=light] .key.sel, html[data-theme=light] .pad:active { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme=light] .tpl:hover, html[data-theme=light] .tpl[aria-pressed="true"] { border-color: var(--accent); }
html[data-theme=light] .tpl[aria-pressed="true"] { background: rgba(15, 118, 110, .1); }
html[data-theme=light] .pcs button.blk { color: #ecebff; }
html[data-theme=light] .fs { border-color: var(--line); }
html[data-theme=light] canvas.wave, html[data-theme=light] canvas.zoom { filter: invert(1) hue-rotate(180deg); }   /* dark screen with a cyan wave becomes paper with an ink wave */
html[data-theme=light] .home { --line2: rgba(15, 23, 42, .16); --amber: #0f766e; }
html[data-theme=light] .hero::before { background: radial-gradient(closest-side, rgba(20, 184, 166, .22), transparent); }
html[data-theme=light] .hero h1 .l2 { color: #0f766e; }
html[data-theme=light] .hero .lead { color: #334155; }
html[data-theme=light] .cta.ghost { border-color: rgba(15, 23, 42, .4); color: var(--text); }
html[data-theme=light] .cta.ghost:hover { border-color: var(--text); background: rgba(15, 23, 42, .06); }
html[data-theme=light] .cta:not(.ghost) { color: #fff; box-shadow: 0 14px 34px -14px rgba(15, 118, 110, .7); } html[data-theme=light] .cta:not(.ghost):hover { background: #115e59; }
html[data-theme=light] .cta:focus-visible, html[data-theme=light] a.tool:focus-visible { outline-color: var(--text); }
html[data-theme=light] .deck { background: #ffffffcc; box-shadow: 0 20px 50px -30px rgba(15, 23, 42, .35); }
html[data-theme=light] .deckhead select { background: var(--panel-2); color: var(--text); }
html[data-theme=light] .playbtn { background: var(--text); color: #fff; }
html[data-theme=light] .st { background: rgba(15, 23, 42, .07); }
html[data-theme=light] .st.b { background: rgba(15, 23, 42, .14); }
html[data-theme=light] .st.now { border-color: var(--text); }
html[data-theme=light] .st:hover { border-color: rgba(15, 23, 42, .5); }
html[data-theme=light] .st[aria-pressed="true"] { box-shadow: 0 2px 6px -2px var(--sc, #0f766e); }
html[data-theme=light] .facts p { background: #ffffffaa; }
html[data-theme=light] .chips a:hover { background: rgba(15, 23, 42, .07); }
