:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #222b29;
  background: #fafbf9;
  --ink: #222b29;
  --muted: #4f5d58;
  --line: #d4dad4;
  --accent: #98442d;
}
* { box-sizing: border-box; }
body, figure, h1, h2, p, dl, dd { margin: 0; }
body { line-height: 1.5; }
a { color: inherit; text-underline-offset: .2em; }
button, select, input { font: inherit; }
button, select, input[type=range] { cursor: pointer; }
button, select { color: inherit; }
:focus-visible { outline: 3px solid #286da2; outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: -6rem; background: white; padding: .5rem 1rem; }
.skip:focus { top: .5rem; }
.wrap { width: min(65rem, calc(100% - 3rem)); margin-inline: auto; }
.bar { border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; min-height: 3.8rem; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.38rem; font-weight: 680; letter-spacing: -.045em; text-decoration: none; }
.github-link { display: grid; place-items: center; width: 44px; height: 44px; border-radius: .35rem; }
.github-link:hover { background: #e9ede8; }
main.wrap { padding-block: clamp(2rem, 5vw, 4.2rem); }
.overview, .mixer, .setup { display: grid; gap: clamp(1.5rem, 4vw, 3.25rem); }
.overview, .setup { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.overview, .mixer { align-items: center; }
h1 { font-size: clamp(2.35rem, 4.2vw, 3.5rem); line-height: 1.04; letter-spacing: -.052em; font-weight: 680; text-wrap: balance; }
h2 { font-size: clamp(1.45rem, 2.5vw, 1.85rem); line-height: 1.16; letter-spacing: -.035em; font-weight: 650; }
.intro p { margin: 1rem 0 1.25rem; max-width: 44ch; color: var(--muted); line-height: 1.6; }
.install-link { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .4rem 1rem; border: 1px solid #a5b0aa; border-radius: .45rem; font-weight: 620; text-decoration: none; }
.install-link:hover { border-color: var(--ink); background: white; }
section[id] { scroll-margin-top: 1rem; }
.player { padding: clamp(1rem, 2.2vw, 1.6rem); border: 1px solid var(--line); border-radius: .8rem; background: white; }
.player h2 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); }
.player-head, .transport { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.player-head { flex-wrap: wrap; }
.background { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .9rem; }
.background select { max-width: 100%; appearance: none; background: #fafbf9 url("media/chevron-down.svg") right .55rem center / 1rem no-repeat; padding: .45rem 1.9rem .45rem .65rem; border: 1px solid #a9b4ad; border-radius: .35rem; font-size: .94rem; }
.modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #b6bfb8; border-radius: .4rem; margin-top: 1.15rem; }
.modes button { position: relative; min-height: 2.65rem; border: 0; border-left: 1px solid var(--line); background: transparent; padding: .35rem .2rem; font-size: .97rem; font-weight: 540; }
.modes button:first-child { border: 0; border-radius: .32rem 0 0 .32rem; }
.modes button:last-child { border-radius: 0 .32rem .32rem 0; }
.modes button:hover { background: #f3f5f1; }
.modes button[aria-pressed=true] { background: #fbe3d7; color: #793820; font-weight: 680; }
.modes button[aria-pressed=true]::after { content: ""; position: absolute; height: 2px; background: var(--accent); bottom: 0; left: 0; right: 0; }
.wave { position: relative; height: clamp(4rem, 7vw, 5.4rem); margin: 1rem 0 .75rem; background-color: #f3f6f3; background-image: linear-gradient(to right, #e0e7e1 1px, transparent 1px); background-size: calc(100% / 7) 100%; }
.wave canvas, .wave input { width: 100%; height: 100%; display: block; }
.wave input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.wave:focus-within { outline: 2px solid #286da2; }
.transport { justify-content: flex-start; flex-wrap: wrap; gap: .45rem; }
.play { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-width: 5.4rem; min-height: 2.55rem; background: var(--ink); color: white; font-weight: 640; border: 0; border-radius: .4rem; padding: .4rem .8rem; }
.play:hover { background: #384440; }
.play svg { fill: currentColor; width: .9rem; height: .9rem; }
.transport output { margin-left: .3rem; color: var(--muted); font-size: .91rem; font-variant-numeric: tabular-nums; }
.sample-credits { margin-left: auto; padding: .45rem 0; border: 0; background: transparent; color: var(--muted); font-size: .875rem; text-decoration: underline; text-underline-offset: .2em; }
.credits-panel { width: min(23rem, calc(100% - 2rem)); max-height: 80vh; overflow: auto; padding: 1.25rem; border: 1px solid var(--line); border-radius: .7rem; color: var(--ink); background: white; box-shadow: 0 .6rem 2rem #222b2929; }
.credits-panel::backdrop { background: #222b2940; }
.credits-head { display: flex; align-items: center; justify-content: space-between; }
.credits-head button { display: grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; border: 0; border-radius: .35rem; background: transparent; }
.credits-head button:hover { background: #e9ede8; }
.credits-panel dl { margin-top: .75rem; }
.credits-panel p { margin-top: 1rem; color: var(--muted); font-size: .9rem; }
#notice:not(:empty) { margin-top: .7rem; color: var(--accent); }
video { width: 100%; }
.mixer, .setup { margin-top: clamp(2rem, 5vw, 4rem); padding-top: clamp(2rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.mixer { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); grid-template-areas: "screen controls"; }
.mixer-controls { grid-area: controls; }
dl { margin-top: 1.35rem; }
dt { font-weight: 650; }
.mixer dt { display: flex; align-items: center; gap: .55rem; }
.mixer dd { margin-left: calc(20px + .55rem); }
dd { color: var(--muted); margin-top: .12rem; max-width: 40ch; }
dd + dt { margin-top: 1rem; }
.screen { display: block; grid-area: screen; width: 100%; height: auto; border: 1px solid #bfc8c2; border-radius: .45rem; }
.routing p { margin-top: .7rem; color: var(--muted); }
.routes { display: grid; gap: .6rem; margin-top: 1.25rem; }
.route { display: grid; align-items: center; grid-template-columns: 1.7rem 6.2rem 1.4rem auto; gap: .5rem; }
.route > img { width: 1.6rem; height: 1.6rem; }
.route > span { color: var(--muted); }
.route strong { font-weight: 620; }
.install table { width: 100%; margin-top: 1rem; border-collapse: collapse; text-align: left; }
.install th, .install td { border-bottom: 1px solid var(--line); padding: .55rem .65rem .55rem 0; }
.install th { font-weight: 620; }
.install thead { color: var(--muted); font-size: .875rem; }
.install td { color: var(--muted); }
.install tr > :last-child { padding-right: 0; }
@media (max-width: 52rem) {
  .overview { grid-template-columns: 1fr; }
  .intro p { max-width: 60ch; margin-block: .7rem; }
  .mixer, .setup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 2rem); }
  .bar .wrap { min-height: 3.25rem; }
  .brand img { width: 26px; height: 26px; }
  .mixer, .setup { grid-template-columns: 1fr; }
  .mixer { grid-template-areas: "controls" "screen"; }
  .player-head { align-items: flex-start; flex-direction: column; }
  .background { width: 100%; justify-content: space-between; }
  .modes { margin-top: .85rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modes button:nth-child(3) { border-left: 0; }
  .modes button:nth-child(n+3) { border-top: 1px solid var(--line); }
  .modes button { min-height: 2.65rem; }
  .modes button:first-child { border-radius: .32rem 0 0 0; }
  .modes button:last-child { border-radius: 0 0 .32rem 0; }
  .wave { margin-top: .7rem; }
}
