/* ---------- tokens ---------- */
:root {
  --bg: oklch(0.18 0.005 250);
  --bg-1: oklch(0.21 0.005 250);
  --bg-2: oklch(0.24 0.005 250);
  --bg-3: oklch(0.28 0.006 250);
  --line: oklch(0.32 0.006 250);
  --line-strong: oklch(0.42 0.008 250);
  --fg: oklch(0.96 0.002 250);
  --fg-2: oklch(0.78 0.004 250);
  --fg-3: oklch(0.58 0.005 250);
  --fg-4: oklch(0.44 0.005 250);

  --clip-cyan:    oklch(0.78 0.16 200);
  --clip-magenta: oklch(0.72 0.20 340);
  --clip-lime:    oklch(0.86 0.18 130);
  --clip-amber:   oklch(0.82 0.16 75);
  --clip-violet:  oklch(0.72 0.18 290);
  --clip-rose:    oklch(0.76 0.17 20);

  --rec: oklch(0.65 0.22 25);
  --play: oklch(0.82 0.16 140);

  --radius: 3px;
  --radius-clip: 2px;
  --radius-lg: 8px;

  --mixer-h: 300px;

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, sans-serif;
  --serif: "Fraunces", ui-serif, Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

button { font-family: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- shell ---------- */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

/* ---------- title bar ---------- */
.titlebar {
  height: 28px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  gap: 14px;
  user-select: none;
}
.tb-lights { display: flex; gap: 7px; }
.tb-light { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-3); }
.tb-light.r { background: oklch(0.65 0.18 25); }
.tb-light.y { background: oklch(0.80 0.16 85); }
.tb-light.g { background: oklch(0.78 0.16 145); }
.tb-title { flex: 1; text-align: center; color: var(--fg-3); }
.tb-meta { color: var(--fg-4); font-size: 10.5px; }

/* ---------- transport / control bar ---------- */
.transport {
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 11px;
}
.tr-section { display: flex; align-items: center; gap: 8px; }
.tr-divider { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }
.tr-label { color: var(--fg-4); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; }
.tr-value { color: var(--fg); background: var(--bg-2); border: 1px solid var(--line); padding: 3px 8px; border-radius: var(--radius); min-width: 32px; text-align: center; }
.tr-value.big { font-size: 13px; padding: 4px 10px; letter-spacing: 0.02em; }
.tr-btn { width: 26px; height: 22px; display: inline-grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg-2); transition: 0.08s; }
.tr-btn:hover { background: var(--bg-3); color: var(--fg); }
.tr-btn.active { background: var(--play); color: #000; border-color: var(--play); }
.tr-btn.rec.active { background: var(--rec); color: #000; border-color: var(--rec); }
.tr-tap {
  width: auto;
  min-width: 36px;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.tr-tap:active { background: var(--clip-amber); color: #000; border-color: var(--clip-amber); }

.tr-tabs { display: flex; gap: 2px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px; }
.tr-tab { padding: 3px 10px; font-size: 10.5px; color: var(--fg-3); border-radius: 2px; letter-spacing: 0.02em; text-transform: uppercase; font-weight: 500; }
.tr-tab:hover { color: var(--fg); }
.tr-tab.active { background: var(--fg); color: #000; }

/* ---------- main panel ---------- */
.panel { background: var(--bg); min-height: calc(100vh - 28px - 41px - var(--mixer-h)); }

/* ---------- arrangement view (resume timeline) ---------- */
/* On tall displays, fill the leftover panel height so the timeline doesn't
   leave a blank gap: the wrapper stretches to the panel's content box and
   .arrangement grows into the surplus, handing it down to the track rows. */
.arrange-view {
  min-height: calc(100vh - 28px - 41px - var(--mixer-h));
  display: flex;
  flex-direction: column;
}
.arrangement {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: 28px 1fr;
  position: relative; /* anchor for the overview notepad */
}

.arr-tracks-header,
.arr-time-header { background: var(--bg-1); border-bottom: 1px solid var(--line); height: 28px; }
.arr-scroll-header {
  position: absolute;
  top: 0;
  right: 6px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-3);
  background: linear-gradient(90deg, transparent, var(--bg-1) 30%);
  padding: 0 6px 0 24px;
  letter-spacing: 0.04em;
  user-select: none;
  pointer-events: none;
  z-index: 4;
}
.arr-tracks-header { padding: 0 10px; display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--fg-3); border-right: 1px solid var(--line); text-transform: uppercase; letter-spacing: 0.05em;}

.arr-time {
  height: 28px;
  border-bottom: 1px solid var(--line);
  position: relative;
  background: var(--bg-1);
  overflow: hidden;
  touch-action: pan-y; /* vertical = native page scroll; horizontal + pinch handled in JS */
}
.arr-time-inner {
  position: relative;
  height: 100%;
  will-change: transform;
}
.arr-canvas-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.arr-time-tick {
  position: absolute;
  top: 0;
  height: 100%;
  border-left: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-4);
  padding: 7px 0 0 4px;
  user-select: none;
}

.arr-tracks {
  background: var(--bg-1);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.arr-track-row {
  position: relative;
  flex: 64 0 64px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 10px;
}
.arr-track-row.is-sub {
  flex: 44 0 44px;
  padding-left: 22px;
  background: rgba(255,255,255,0.018);
}
.arr-track-row.is-sub .arr-track-color { height: 26px; }
.arr-track-row.is-sub .arr-track-name { font-size: 10.5px; color: var(--fg-2, var(--fg)); }
.arr-track-row.is-sub .arr-track-sub  { font-size: 9.5px; }
.arr-sub-sliver {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  border-radius: 1px;
  opacity: 0.6;
  pointer-events: auto;
  transition: opacity 0.12s, height 0.12s, bottom 0.12s;
}
.arr-sub-sliver.linked { cursor: pointer; }
.arr-sub-sliver.linked:hover { opacity: 1; height: 5px; }
.arr-sub-sliver.fill-cyan    { background: var(--clip-cyan); }
.arr-sub-sliver.fill-magenta { background: var(--clip-magenta); }
.arr-sub-sliver.fill-lime    { background: var(--clip-lime); }
.arr-sub-sliver.fill-amber   { background: var(--clip-amber); }
.arr-sub-sliver.fill-violet  { background: var(--clip-violet); }
.arr-sub-sliver.fill-rose    { background: var(--clip-rose); }
.arr-track-chevron {
  width: 14px;
  height: 14px;
  margin-left: 6px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--fg-4);
  cursor: pointer;
  user-select: none;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.arr-track-chevron:hover { color: var(--fg); border-color: var(--fg-3, var(--fg-4)); }
.arr-track-chevron.open { color: var(--fg); background: var(--bg-2); }
.arr-track-chevron.placeholder { visibility: hidden; cursor: default; pointer-events: none; }
.arr-track-color {
  width: 4px;
  height: 38px;
  border-radius: 2px;
}
.arr-track-info { flex: 1; min-width: 0; }
.arr-track-name { font-family: var(--mono); font-size: 11.5px; color: var(--fg); font-weight: 500; }
.arr-track-sub { font-family: var(--mono); font-size: 10px; color: var(--fg-4); margin-top: 2px; }
.arr-track-iobtns { display: flex; gap: 3px; }
.arr-iobtn {
  width: 16px; height: 16px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 2px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  color: var(--fg-4);
}
.arr-iobtn.s.on { background: oklch(0.82 0.16 75); color: #000; border-color: oklch(0.82 0.16 75); }
.arr-iobtn.m.on { background: oklch(0.78 0.16 145); color: #000; border-color: oklch(0.78 0.16 145); }
.arr-iobtn.a.on { background: var(--rec); color: #000; border-color: var(--rec); }

.arr-canvas {
  position: relative;
  background:
    repeating-linear-gradient(90deg, transparent 0 79px, var(--bg-2) 79px 80px),
    var(--bg);
  overflow: hidden;
  touch-action: pan-y; /* vertical = native page scroll; horizontal + pinch handled in JS */
}
.arr-canvas-row {
  flex: 64 0 64px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.arr-canvas-row.is-sub { flex: 44 0 44px; background: rgba(255,255,255,0.018); }
.arr-canvas-row.is-sub .arr-clip { top: 5px; height: calc(100% - 10px); }
.arr-canvas-row:nth-child(odd) { background: rgba(255,255,255,0.012); }

.arr-clip {
  position: absolute;
  top: 6px;
  height: calc(100% - 12px);
  border-radius: var(--radius-clip);
  padding: 4px 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  cursor: pointer;
  transition: filter 0.1s, transform 0.1s;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.arr-clip:hover { filter: brightness(1.08); transform: translateY(-1px); }
.arr-clip.linked { cursor: pointer; }
.arr-clip.linked::after {
  content: "↗";
  position: absolute;
  top: 3px;
  right: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(0,0,0,0.55);
  font-weight: 700;
  pointer-events: none;
}
.arr-clip.linked .arr-clip-tag { right: 16px; }
.arr-clip-title { font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arr-clip-sub { font-size: 9.5px; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arr-clip-tag { position: absolute; top: 2px; right: 4px; font-size: 8.5px; opacity: 0.6; font-weight: 500; }

.arr-clip.fill-cyan    { background: var(--clip-cyan); }
.arr-clip.fill-magenta { background: var(--clip-magenta); }
.arr-clip.fill-lime    { background: var(--clip-lime); }
.arr-clip.fill-amber   { background: var(--clip-amber); }
.arr-clip.fill-violet  { background: var(--clip-violet); }
.arr-clip.fill-rose    { background: var(--clip-rose); }

.arr-clip-waveform {
  position: absolute;
  left: 6px; right: 6px; bottom: 4px;
  height: 18px;
  display: flex;
  align-items: flex-end;
  gap: 1px;
  opacity: 0.35;
}
.arr-clip-waveform i { display: block; width: 2px; background: #000; border-radius: 1px; }

.arr-playhead {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--fg);
  pointer-events: none;
  z-index: 5;
}
.arr-playhead::before {
  content: "";
  position: absolute;
  top: -4px; left: -4px;
  width: 9px; height: 9px;
  background: var(--fg);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

/* present-day locator — fixed amber marker pinned to today (distinct from the white playhead) */
.arr-today {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--clip-amber);
  box-shadow: 0 0 6px var(--clip-amber);
  pointer-events: none;
  z-index: 4; /* above clips, below the white playhead (5) */
}
.arr-today-flag {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--clip-amber);
  color: #000;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 0 0 3px 3px;
  white-space: nowrap;
  pointer-events: auto;
  cursor: default;
  user-select: none;
}


/* ---------- hero strip (above arrangement) ---------- */
.hero {
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  padding: 24px 14px 18px;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 18px;
  align-items: end;
}
.hero-id {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-4);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero-id .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--play); margin-right: 6px; vertical-align: middle; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero-name {
  font-family: var(--sans);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 4px 0 6px;
}
.hero-name .punct { color: var(--clip-magenta); font-weight: 800; }
.hero-tagline { font-family: var(--mono); font-size: 12px; color: var(--fg-2); }
.hero-tagline .sep { color: var(--fg-4); margin: 0 8px; }
.hero-tagline .accent { color: var(--clip-cyan); }
.hero-meter { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-family: var(--mono); font-size: 10px; color: var(--fg-4); }
.hero-meter-row { display: flex; gap: 6px; align-items: center; }
.hero-meter-bar { width: 96px; height: 6px; background: var(--bg-2); border: 1px solid var(--line); position: relative; overflow: hidden; }
.hero-meter-bar .fill { position: absolute; top: 0; left: 0; bottom: 0; background: linear-gradient(90deg, var(--play) 0 60%, var(--clip-amber) 60% 85%, var(--rec) 85% 100%); }

/* ---------- projects view (category columns) ---------- */
.cat-cyan    { --c: var(--clip-cyan); }
.cat-magenta { --c: var(--clip-magenta); }
.cat-lime    { --c: var(--clip-lime); }

.proj-view { min-height: calc(100vh - 28px - 41px - var(--mixer-h)); }
.proj-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 18px 16px 28px;
}
.proj-col { min-width: 0; }
.proj-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c);
}
.proj-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.proj-col-name { font-weight: 700; font-size: 14px; }
.proj-col-role { font-family: var(--mono); font-size: 10px; color: var(--fg-4); text-transform: uppercase; letter-spacing: 0.05em; margin-left: auto; }

.proj-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-top: 2px solid var(--c);
  border-radius: var(--radius);
  padding: 12px 13px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: 0.12s;
}
.proj-card:hover { border-color: var(--line-strong); background: var(--bg-2); transform: translateY(-1px); }
.proj-card-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 5px;
}
.proj-card-name .d { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.proj-card-blurb { color: var(--fg-3); font-size: 11.5px; line-height: 1.5; margin-bottom: 9px; }
.proj-card-tech { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.proj-chip {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-3);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 2px 6px;
}
.proj-card-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.proj-status {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-right: auto;
}
.proj-status.live { color: var(--play); }
.proj-status.active { color: var(--clip-amber); }
.proj-link {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-3);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 2px 7px;
  text-decoration: none;
}
.proj-link:hover { color: var(--fg); border-color: var(--line-strong); }
.proj-link.live { color: #000; background: var(--play); border-color: var(--play); }
.proj-private { font-family: var(--mono); font-size: 10px; color: var(--fg-4); }

/* ---------- generic section header ---------- */
.section-head {
  padding: 16px 14px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.section-head h2 {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.section-head .sub {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.section-head .right { font-family: var(--mono); font-size: 11px; color: var(--fg-3); display: inline-flex; align-items: center; gap: 16px; }

/* ---------- devblog (midi notes view) ---------- */
.devblog-track {
  display: grid;
  grid-template-columns: 220px 1fr;
  border-bottom: 1px solid var(--line);
  min-height: 124px;
}
.devblog-info {
  padding: 14px;
  border-right: 1px solid var(--line);
  background: var(--bg-1);
  font-family: var(--mono);
}
.devblog-info .num { color: var(--fg-4); font-size: 10px; }
.devblog-info h3 {
  margin: 4px 0 6px;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--fg);
}
.devblog-info .meta { font-size: 10px; color: var(--fg-3); display: flex; gap: 10px; }
.devblog-info .tags { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.devblog-info .tag { font-size: 9.5px; padding: 2px 6px; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--fg-2); }

.midi-clip {
  position: relative;
  background:
    repeating-linear-gradient(0deg, transparent 0 11px, rgba(255,255,255,0.025) 11px 12px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--bg-2) 39px 40px),
    var(--bg);
  cursor: pointer;
  overflow: hidden;
}
.midi-note {
  position: absolute;
  height: 5px;
  border-radius: 1px;
  opacity: 0.95;
}

/* ---------- releases ---------- */
.release-volume { display: inline-flex; align-items: center; gap: 7px; }
.release-volume .vol-label {
  font-size: 10px;
  color: var(--fg-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.release-volume input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 4px;
  margin: 0;
  border-radius: 2px;
  cursor: pointer;
  outline: none;
}
.release-volume input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  background: var(--clip-amber);
  border: 1px solid oklch(0.65 0.14 75);
}
.release-volume input[type='range']:hover::-webkit-slider-thumb { background: var(--fg); border-color: var(--fg-2); }
.release-volume input[type='range']::-moz-range-thumb {
  width: 9px;
  height: 14px;
  border-radius: 2px;
  background: var(--clip-amber);
  border: 1px solid oklch(0.65 0.14 75);
}
.release-volume input[type='range']:hover::-moz-range-thumb { background: var(--fg); border-color: var(--fg-2); }
.release-item { border-bottom: 1px solid var(--line); }
.release-row {
  display: grid;
  grid-template-columns: 90px 220px 1fr 60px 140px;
  gap: 12px;
  padding: 10px 14px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11.5px;
}
.release-row:hover { background: var(--bg-1); }
.release-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--fg-3);
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.release-toggle:hover { color: var(--fg); border-color: var(--fg-3); }
.release-item.expanded .release-toggle { color: var(--fg); transform: rotate(180deg); }
.release-tracklist {
  display: none;
  padding: 4px 14px 14px 116px;
  background: var(--bg-1);
}
.release-item.expanded .release-tracklist { display: block; }
.release-track {
  display: grid;
  grid-template-columns: 24px 30px 1fr 60px 20px;
  gap: 12px;
  padding: 5px 0;
  align-items: center;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-3);
  border-bottom: 1px solid var(--line);
}
.release-track:last-child { border-bottom: 0; }
.release-track:hover { color: var(--fg); }
.release-track .track-num { color: var(--fg-4); }
.release-track .track-len { text-align: right; color: var(--fg-4); }
.release-track-play {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  background: var(--bg-2);
  cursor: pointer;
  transition: 0.1s;
  padding: 0;
}
.release-track-play:hover { background: var(--bg-3); }
.release-track-play::before {
  content: "";
  width: 0; height: 0;
  border-left: 6px solid var(--fg);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-left: 1.5px;
}
.release-track-play.playing::before {
  border: 0;
  width: 5px; height: 7px;
  border-left: 2px solid var(--fg);
  border-right: 2px solid var(--fg);
  margin: 0;
}
.release-cover {
  width: 64px; height: 64px;
  background: var(--bg-2);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.release-cover .stripes {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,255,255,0.04) 6px 7px);
}
.release-cover .label {
  position: absolute; bottom: 4px; left: 4px;
  font-family: var(--mono); font-size: 8.5px; color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
}
.release-cover .geo {
  position: absolute; inset: 6px;
  border-radius: 2px;
  display: grid; place-items: center;
}
.release-cover-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.release-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 8px;
}
.release-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid currentColor;
  line-height: 1;
}
.release-badge.unreleased {
  color: var(--clip-amber);
  background: rgba(255, 174, 92, 0.08);
}
.release-sub { font-size: 10px; color: var(--fg-4); margin-top: 2px; }
.release-wave {
  height: 60px;
  display: flex;
  align-items: center;
  justify-self: start;   /* size to the bars, not the whole grid column */
  width: max-content;
  gap: 1.5px;
  cursor: pointer;
  position: relative;
}
.release-wave i {
  display: block;
  width: 2px;
  background: var(--fg-3);
  border-radius: 1px;
}
.release-wave i.played { background: var(--fg); }
.release-time { color: var(--fg-3); font-size: 11px; }
.release-spotify {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: #1DB954;
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid rgba(29, 185, 84, 0.4);
  border-radius: 999px;
  transition: 0.1s;
}
.release-spotify:hover { background: rgba(29, 185, 84, 0.12); border-color: #1DB954; }
.release-meta { color: var(--fg-3); font-size: 10px; text-align: right; }
.release-play {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  background: var(--bg-2);
  transition: 0.1s;
}
.release-play:hover { background: var(--bg-3); }
.release-play:disabled { opacity: 0.35; cursor: not-allowed; }
.release-play:disabled:hover { background: var(--bg-2); }
.release-play::before {
  content: "";
  width: 0; height: 0;
  border-left: 8px solid var(--fg);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  margin-left: 2px;
}
.release-play.playing::before {
  border: 0;
  width: 7px; height: 9px;
  border-left: 2.5px solid var(--fg);
  border-right: 2.5px solid var(--fg);
  margin: 0;
}
.release-download {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--fg-3);
  text-decoration: none;
  font-size: 13px; line-height: 1;
  display: grid; place-items: center;
  transition: 0.1s;
}
.release-download:hover { background: var(--bg-3); color: var(--fg); }
.release-track-download {
  color: var(--fg-4);
  text-decoration: none;
  font-size: 12px;
  text-align: right;
  transition: 0.1s;
}
.release-track-download:hover { color: var(--fg); }

/* ---------- music blog (sample slices) ---------- */
.musicblog {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
}
.mb-card {
  background: var(--bg-1);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: 0.1s;
}
.mb-card:hover { background: var(--bg-2); }
.mb-card .slice {
  height: 64px;
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.mb-card .slice .wave {
  position: absolute; inset: 8px;
  display: flex; align-items: center; gap: 1.5px;
}
.mb-card .slice .wave i { display: block; width: 2px; background: currentColor; border-radius: 1px; opacity: 0.85; }
.mb-card .slice .marker {
  position: absolute;
  top: 0; bottom: 0;
  border-left: 1px dashed rgba(255,255,255,0.4);
}
.mb-card .slice .marker .lbl {
  position: absolute; top: 2px; left: 3px;
  font-family: var(--mono); font-size: 9px; color: rgba(255,255,255,0.5);
}
.mb-card h3 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0;
  color: var(--fg);
  text-wrap: pretty;
}
.mb-card .excerpt {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.5;
}
.mb-card .meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-4);
  display: flex;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mb-card .meta .tag { color: var(--clip-cyan); }

/* ---------- mixer (footer) ---------- */
.mixer {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
  font-size: 10px;
  height: var(--mixer-h);
}
.mixer-header {
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.02), transparent 40%),
    var(--bg);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  user-select: none;
}
.mixer-header-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clip-amber);
  box-shadow: 0 0 6px var(--clip-amber);
}
.mixer-header-title {
  color: var(--fg);
  font-weight: 600;
  letter-spacing: 0.12em;
}
.mixer-header-sep { color: var(--fg-4); }
.mixer-header-sub { color: var(--fg-4); text-transform: none; letter-spacing: 0.02em; }
.mixer-header-spacer { flex: 1; }
.mixer-header-count {
  color: var(--fg-3);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 9.5px;
  letter-spacing: 0.05em;
}
.mixer-body {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-height: 0;
}
.mixer-master {
  border-right: 1px solid var(--line);
  padding: 10px 16px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-width: 280px;
  max-width: 320px;
}
.mixer-master .links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.mixer-master .links a {
  text-align: center;
  padding: 5px 6px;
}
.mixer-master .lbl { color: var(--fg-4); text-transform: uppercase; letter-spacing: 0.05em; font-size: 10px; }
.mixer-master .name { font-family: var(--sans); font-weight: 700; font-size: 15px; color: var(--fg); letter-spacing: -0.01em; }
.mixer-master .links a {
  font-size: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--fg-2);
}
.mixer-master .links a:hover { background: var(--bg-2); color: var(--fg); }

.mixer-strips {
  display: flex;
  flex: 1;
  overflow: hidden;
}
.mixer-strip {
  flex: 1;
  border-right: 1px solid var(--line);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 60px;
}
.mixer-strip:last-child { border-right: 0; }
.mixer-strip.master { background: var(--bg-2); }
.mixer-strip .strip-name {
  font-size: 9.5px;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mixer-strip .strip-meter {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 1px;
  padding: 2px;
}
.mixer-strip .strip-meter .col {
  flex: 1;
  background: linear-gradient(0deg, var(--play) 0 60%, var(--clip-amber) 60% 85%, var(--rec) 85% 100%);
  height: 100%;
  border-radius: 1px;
  transform-origin: bottom;
  opacity: 0.95;
  transition: transform 0.09s linear;
}
.mixer-strip .strip-fader {
  height: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  position: relative;
  border-radius: 1px;
}
.mixer-strip .strip-fader .knob {
  position: absolute;
  top: -3px;
  width: 8px; height: 10px;
  background: var(--fg-2);
  border-radius: 1px;
  transform: translateX(-50%);
}
.mixer-strip .strip-foot {
  display: flex; justify-content: space-between;
  font-size: 9px; color: var(--fg-4);
}

/* skill-strip extensions */
.mixer-strip.skill-strip {
  position: relative;
  padding: 14px 6px 8px;
  gap: 4px;
  min-width: 72px;
}
.mixer-strip .strip-group-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.mixer-strip .strip-group-label {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 2px;
  text-transform: uppercase;
  height: 10px;
  line-height: 10px;
}
.mixer-strip .strip-readout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 0;
}
.mixer-strip .strip-db {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: 0.02em;
  line-height: 12px;
}
.mixer-strip .strip-tier {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 7px;
  border-radius: 2px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  line-height: 12px;
}
.mixer-strip .strip-tier.tier-high { color: oklch(0.18 0.005 250); background: var(--play); border-color: var(--play); }
.mixer-strip .strip-tier.tier-med  { color: oklch(0.18 0.005 250); background: var(--clip-amber); border-color: var(--clip-amber); }
.mixer-strip .strip-tier.tier-low  { color: var(--fg); background: var(--rec); border-color: var(--rec); }
.mixer-strip.skill-strip .strip-name {
  font-size: 9px;
  letter-spacing: 0.03em;
}
.mixer-group-divider {
  width: 1px;
  background: var(--line-strong);
  margin: 0 2px;
  align-self: stretch;
  opacity: 0.7;
}
.mixer-group-divider.master {
  background: var(--fg-3);
  margin: 0 4px;
  opacity: 0.5;
}

/* ---------- info pane (mixer-replacement style) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.info-cell {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
}
.info-cell:last-child { border-right: 0; }
.info-cell .k { font-size: 10px; color: var(--fg-4); text-transform: uppercase; letter-spacing: 0.05em; }
.info-cell .v { font-family: var(--sans); font-size: 14px; color: var(--fg); margin-top: 4px; letter-spacing: -0.005em; }

/* ---------- about (sidechain) ---------- */
.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.about-text {
  padding: 24px 20px;
  border-right: 1px solid var(--line);
  font-family: var(--serif);
}
.about-text p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg-2);
  margin: 0 0 14px;
  max-width: 58ch;
  text-wrap: pretty;
  font-variation-settings: "opsz" 14;
}
.about-text p.lede {
  font-size: 20px;
  color: var(--fg);
  letter-spacing: -0.005em;
  margin-bottom: 18px;
  font-variation-settings: "opsz" 36;
}
.about-text .accent { color: var(--clip-cyan); }
.about-text .accent-m { color: var(--clip-magenta); }

.about-stack {
  padding: 24px 20px;
  font-family: var(--mono);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.about-stack h4 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-4);
  margin: 0 0 8px;
  font-weight: 500;
}
.about-stack .contact {
  font-family: var(--mono); font-size: 12px; color: var(--fg-2); line-height: 1.7;
}
.chiprow { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  font-size: 11px;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--fg-2);
  background: var(--bg-1);
}
.chip.warm { color: var(--clip-amber); border-color: color-mix(in oklch, var(--clip-amber) 35%, var(--line-strong)); }
.chip.cool { color: var(--clip-cyan); border-color: color-mix(in oklch, var(--clip-cyan) 35%, var(--line-strong)); }
.chip.violet { color: var(--clip-violet); border-color: color-mix(in oklch, var(--clip-violet) 35%, var(--line-strong)); }

/* ---------- article view ---------- */
.article {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.article-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
}
.article-back {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
  transition: 0.1s;
}
.article-back:hover { background: var(--bg-3); color: var(--fg); }
.article-label {
  color: var(--fg-4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-body {
  max-width: 65ch;
  width: 100%;
  margin: 0 auto;
  padding: 40px 28px 80px;
  font-family: var(--sans);
}
.article-body h1 {
  font-family: var(--sans);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 14px;
  text-wrap: balance;
}
.article-body .article-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-4);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 26px;
}
.article-body .article-tag { color: var(--clip-cyan); }
.article-body .article-excerpt-only {
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-3);
  text-wrap: pretty;
}
.article-body .article-stub {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 24px;
}
.article-body p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  margin: 0 0 18px;
  text-wrap: pretty;
}

.article-chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.article-tech-chip {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 3px 9px;
}

.article-linkrow {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}
.article-link-btn {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 6px 12px;
  transition: 0.1s;
}
.article-link-btn:hover { background: var(--bg-3); }
.article-link-btn.disabled {
  color: var(--fg-4);
  background: transparent;
  border-style: dashed;
  border-color: var(--line);
  cursor: not-allowed;
  pointer-events: none;
}
.article-link-btn.disabled:hover { background: transparent; }

.article-next {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
}
.article-next .lbl {
  font-size: 10px;
  color: var(--fg-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.article-next-link {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  transition: 0.1s;
}
.article-next-link:hover { color: var(--clip-cyan); }

/* devblog row hover/cursor when clickable */
.devblog-track.clickable { cursor: pointer; transition: background 0.1s; }
.devblog-track.clickable:hover { background: var(--bg-1); }
.devblog-track.clickable:hover .devblog-info { background: var(--bg-2); }

/* ---------- rich devblog post (HTML body w/ diagrams) ---------- */
.article-body.article-wide { max-width: 880px; }

.rich-article {
  --accent: var(--clip-amber);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
}
.rich-article ::selection { background: var(--accent); color: #0a0c11; }
.rich-article .rich-loading {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 24px 0;
}
.rich-article .rich-error {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--rec, var(--fg));
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rec, var(--accent));
  padding: 14px 16px;
  border-radius: 4px;
}

.rich-article .deck {
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-3);
  margin: 0 0 28px;
  max-width: 640px;
  text-wrap: pretty;
}
.rich-article p { margin: 0 0 16px; text-wrap: pretty; }
.rich-article p code,
.rich-article li code,
.rich-article td code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--bg);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--line);
}
.rich-article a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.rich-article a:hover { border-bottom-color: var(--accent); }
.rich-article em { color: var(--accent); font-style: italic; }

.rich-article h2 {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 56px 0 10px;
  color: var(--fg);
}
.rich-article h2 .num {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.rich-article h3 {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 32px 0 10px;
}
.rich-article ul { padding-left: 18px; }
.rich-article li { margin-bottom: 6px; }

.rich-article hr.divider {
  border: 0;
  border-top: 1px dashed var(--line-strong);
  margin: 48px 0;
}

.rich-article figure {
  margin: 24px 0 32px;
  padding: 22px 18px 14px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.rich-article figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  margin-top: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  line-height: 1.55;
}
.rich-article figcaption b { color: var(--accent); font-weight: 500; }
.rich-article figcaption code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--accent);
}
.rich-article svg { display: block; width: 100%; height: auto; }

.rich-article pre {
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  color: var(--fg-2);
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  margin: 14px 0 22px;
}
.rich-article pre .c  { color: var(--fg-4); font-style: italic; }
.rich-article pre .k  { color: oklch(0.76 0.16 25); }
.rich-article pre .s  { color: oklch(0.82 0.16 145); }
.rich-article pre .n  { color: oklch(0.84 0.13 75); }
.rich-article pre .fn { color: oklch(0.88 0.10 95); }
.rich-article pre .o  { color: var(--fg-3); }

.rich-article .callout {
  border-left: 3px solid oklch(0.82 0.16 75);
  background: linear-gradient(90deg, rgba(255,209,102,0.06), transparent);
  padding: 14px 16px;
  margin: 22px 0;
  font-size: 15px;
  border-radius: 0 4px 4px 0;
}
.rich-article .callout b { color: oklch(0.82 0.16 75); }

.rich-article .stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0 24px;
}
.rich-article .stack .card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 16px;
}
.rich-article .stack .card h4 {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.rich-article .stack .card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-3);
}

.rich-article table {
  border-collapse: collapse;
  width: 100%;
  margin: 14px 0 26px;
  font-size: 13.5px;
}
.rich-article th,
.rich-article td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.rich-article th {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-4);
}
.rich-article td.mono {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
}

@media (max-width: 700px) {
  .rich-article .stack { grid-template-columns: 1fr; }
  .rich-article h2 { font-size: 22px; }
}

/* ---------- clip popover ---------- */
#clip-popover-dismisser {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 90;
}
.clip-popover {
  position: fixed;
  z-index: 100;
  min-width: 280px;
  max-width: 360px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.35);
  padding: 12px 14px 14px;
  font-family: var(--sans);
  animation: clip-pop 0.12s ease-out;
}
@keyframes clip-pop {
  from { opacity: 0; transform: translateY(-4px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
.clip-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.clip-popover-title {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
  line-height: 1.2;
  flex: 1;
}
.clip-popover-close {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--fg-3);
  background: none;
  border: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  line-height: 1;
  margin-top: -2px;
}
.clip-popover-close:hover { color: var(--fg); background: var(--bg-3); }
.clip-popover-blurb {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-2);
  margin-bottom: 12px;
  text-wrap: pretty;
}
.clip-popover-link {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 6px 12px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: 0.1s;
}
.clip-popover-link:hover { background: var(--bg-3); border-color: var(--fg-3); }

/* ---------- responsiveness ---------- */
@media (max-width: 900px) {
  .arrangement { grid-template-columns: 140px 1fr; }
  .overview-box { left: 8px; right: 8px; margin-left: 0; width: auto; max-width: none; top: 34px; }
  .arr-track-name { font-size: 10.5px; }
  .arr-track-sub { font-size: 9px; }
  .proj-cols { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-text { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero { grid-template-columns: 1fr; gap: 8px; }
  .hero-meter { align-items: flex-start; }
  .musicblog { grid-template-columns: 1fr; }
  .release-row { grid-template-columns: 64px 1fr auto; }
  .release-row > :nth-child(3), .release-row > :nth-child(4) { display: none; }
  .transport { grid-template-columns: 1fr; gap: 8px; }
  .tr-tabs { flex-wrap: wrap; }
  .mixer { height: auto; }
  .mixer-body { flex-direction: column; }
  .mixer-master { border-right: 0; border-bottom: 1px solid var(--line); max-width: none; }
  .mixer-strips { overflow-x: auto; }
  .article-body { padding: 24px 16px 60px; }
  .article-body h1 { font-size: 24px; }
}

/* ---------- overview notepad ---------- */
.overview-box {
  position: absolute;
  top: 34px;
  /* Anchor to the right of the *viewport*, not .arrangement: the timeline is wider
     than the viewport, so a plain `right:` offset lands off-screen on smaller windows.
     .arrangement's left edge is at viewport x=0, so this left value is viewport-relative. */
  left: calc(100vw - 380px); /* 332px window + 48px right margin */
  width: 332px;
  max-width: calc(100% - 24px);
  z-index: 6;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--clip-amber);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.35);
  overflow: hidden;
  font-family: var(--sans);
  animation: clip-pop 0.14s ease-out;
}
.overview-box.closed { display: none; }
.ov-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px 7px 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--clip-amber);
  letter-spacing: 0.04em;
  border-bottom: 1px solid color-mix(in oklch, var(--clip-amber) 26%, transparent);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
}
.ov-close {
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  color: var(--fg-3);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 2px;
}
.ov-close:hover { color: var(--fg); background: var(--bg-3); }
.ov-body {
  padding: 8px 12px 12px;
  max-height: 62vh;
  overflow-y: auto;
  /* faint ruled-paper lines */
  background-image: repeating-linear-gradient(180deg, transparent 0 21px, color-mix(in oklch, var(--line) 42%, transparent) 21px 22px);
  background-position: 0 8px;
}
.ov-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-4);
  line-height: 22px;
}
.ov-label.two { margin-top: 7px; }
.ov-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  line-height: 22px;
  min-height: 22px;
}
.ov-name {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg);
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  flex: 0 0 auto;
  white-space: nowrap;
}
button.ov-name { cursor: pointer; }
.ov-name:hover { color: var(--clip-cyan); }
.ov-row.live .ov-name { color: var(--clip-cyan); }
.ov-sub {
  font-size: 10.5px;
  color: var(--fg-3);
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ov-ext { font-family: var(--mono); font-size: 10px; color: var(--fg-4); }
.ov-ext.quiet { margin-left: auto; opacity: 0.55; }
.ov-demo {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--clip-cyan);
  border: 1px solid color-mix(in oklch, var(--clip-cyan) 45%, transparent);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
  transition: 0.1s;
}
.ov-demo:hover { background: color-mix(in oklch, var(--clip-cyan) 16%, transparent); }
.tr-overview-toggle {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px 9px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: 0.1s;
}
.tr-overview-toggle:hover { color: var(--fg); border-color: var(--line-strong); }
.tr-overview-toggle.active {
  color: var(--clip-amber);
  border-color: color-mix(in oklch, var(--clip-amber) 50%, transparent);
  background: color-mix(in oklch, var(--clip-amber) 12%, transparent);
}
