:root {
  --ink: #171717;
  --muted: #646464;
  --paper: #fbf7ed;
  --surface: #ffffff;
  --soft: #f0eadc;
  --line: #ded4bd;
  --teal: #008c95;
  --blue: #1b75bb;
  --pink: #cf1f63;
  --yellow: #f2c84b;
  --green: #75a843;
  --violet: #7857bd;
  --shadow: 0 18px 55px rgba(54, 38, 9, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 247, 237, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.brand span {
  display: grid;
  line-height: 1.15;
}

.brand small,
.muted {
  color: var(--muted);
}

.logo {
  width: 52px;
  height: 52px;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(0, 140, 149, 0.1);
}

.hero {
  padding: 4rem 0 2.4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 2rem;
  align-items: center;
}

.hero-copy {
  max-width: 700px;
}

.eyebrow,
.mini-label {
  margin: 0 0 0.65rem;
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5.8vw, 5.4rem);
  line-height: 0.95;
}

h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  line-height: 1.08;
}

h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.2;
}

.hero-copy > p:not(.eyebrow),
.section-heading > p:last-child {
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0.72rem 1rem;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.06);
}

.btn-secondary {
  background: var(--yellow);
  color: var(--ink);
}

.hero-panel,
.lab-card,
.lesson-card,
.octave-card,
.sampling-summary article,
.philosophy-grid article,
.ableton-shot,
.chord-builder,
.chord-theory,
.progression-card,
.translation-board article,
.accidental-grid article,
.mode-grid article,
.workflow-steps article,
.decision-tool article,
.tuning-grid article,
.chop-grid article,
.warp-grid article,
.video-card,
.ableton-steps article,
.case-card,
.guide-image,
.quiz-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.formula-card {
  padding: 1.2rem;
  border-radius: 8px;
  color: #fff;
}

.formula-card span {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  opacity: 0.9;
}

.formula-card strong {
  display: block;
  margin-top: 0.2rem;
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  line-height: 1;
}

.teal {
  background: var(--teal);
}

.formula-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.formula-grid article {
  min-height: 140px;
  padding: 1rem;
  border-radius: 8px;
  background: var(--soft);
}

.formula-grid strong {
  color: var(--blue);
}

.formula-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.home-hero,
.compact-hero {
  padding-bottom: 3rem;
}

.module-cards,
.resource-grid,
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-bottom: 3rem;
}

.module-card,
.resource-card,
.shortcut-card,
.pattern-card,
.track-plan article,
.house-steps article,
.ableton-actions article,
.velocity-demo article,
.workflow-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.module-card {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  padding: 1.2rem;
}

.resource-card {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  padding: 1.2rem;
}

.module-card > span,
.resource-card > span {
  width: fit-content;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 950;
}

.module-card p,
.resource-card p,
.shortcut-card p,
.workflow-card p {
  color: var(--muted);
}

.links-section,
.house-section,
.shortcuts-section {
  padding-bottom: 3rem;
}

.track-plan,
.house-patterns,
.house-steps,
.ableton-actions,
.velocity-demo,
.velocity-workflow,
.percussion-guide,
.bass-choice,
.hat-lesson {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.track-plan article,
.pattern-card,
.house-steps article,
.ableton-actions article,
.velocity-demo article,
.velocity-workflow article,
.percussion-guide article,
.bass-choice article,
.hat-lesson article {
  padding: 1.1rem;
}

.velocity-workflow article,
.percussion-guide article,
.bass-choice article,
.hat-lesson article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.track-plan span,
.house-steps span {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 950;
}

.bar-grid {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0;
}

.bar-grid.quarters {
  grid-template-columns: repeat(4, 1fr);
}

.bar-grid.eighths {
  grid-template-columns: repeat(8, 1fr);
}

.bar-grid.sixteenths {
  grid-template-columns: repeat(16, 1fr);
}

.bar-grid b {
  display: grid;
  min-height: 54px;
  place-items: center;
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.85rem;
}

.bar-grid .hit,
.bar-grid .soft-hit {
  background: var(--teal);
  color: #fff;
}

.bar-grid .soft-hit {
  opacity: 0.45;
}

.bar-grid .pink {
  background: var(--pink);
}

.bar-grid .yellow {
  background: var(--yellow);
  color: var(--ink);
}

.bass-piano-roll,
.chord-roll {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0;
  padding: 0.6rem;
  border-radius: 8px;
  background:
    linear-gradient(to right, rgba(23, 23, 23, 0.12) 1px, transparent 1px),
    var(--soft);
  background-size: 12.5% 100%;
}

.roll-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.3rem;
  min-height: 34px;
}

.roll-row span,
.chord-roll span {
  border-radius: 6px;
}

.roll-row .note,
.chord-block {
  background: var(--pink);
}

.roll-row .long {
  grid-column: span 2;
}

.chord-roll {
  grid-template-columns: repeat(4, 1fr);
  min-height: 110px;
  align-items: center;
}

.chord-block {
  min-height: 62px;
}

.chord-block.short {
  min-height: 34px;
}

.velocity-bars {
  display: flex;
  align-items: end;
  gap: 0.5rem;
  min-height: 210px;
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--soft);
}

.velocity-bars span {
  display: flex;
  flex: 1;
  align-items: end;
  justify-content: center;
  min-width: 0;
  padding: 0.35rem;
  border-radius: 6px 6px 0 0;
  background: var(--teal);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.reset-flow {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.reset-flow span {
  display: block;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--soft);
  font-weight: 900;
}

.velocity-range-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
  min-height: 150px;
  align-items: end;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--soft);
}

.velocity-range-demo span {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 90px;
  padding: 0.5rem;
  border-radius: 6px 6px 0 0;
  background: var(--teal);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 950;
  text-align: center;
}

.velocity-range-demo .range-vel::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 62%;
  border-radius: 6px 6px 0 0;
  background: rgba(23, 23, 23, 0.28);
}

.velocity-range-demo .range-vel {
  background: var(--pink);
}

.velocity-range-demo span {
  z-index: 0;
}

.velocity-range-demo span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 3px;
  background: rgba(255, 255, 255, 0.85);
}

.notation-help {
  padding: 1.1rem;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.beat-translation {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  margin: 1rem 0;
}

.beat-translation span {
  display: grid;
  gap: 0.2rem;
  min-height: 72px;
  place-items: center;
  padding: 0.5rem;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 850;
}

.beat-translation strong {
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}

.beat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.8rem;
}

.beat-grid div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.2rem;
}

.beat-grid span,
.beat-grid b {
  display: grid;
  min-height: 30px;
  place-items: center;
  border-radius: 5px;
  background: #e0d8c8;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 950;
}

.beat-grid.hits b {
  min-height: 42px;
  color: #514b43;
  background: #ded8cf;
  border: 1px solid #c8beac;
}

.beat-grid .rim {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.beat-grid .soft {
  opacity: 0.55;
}

.beat-grid .ghost {
  background: var(--yellow);
  color: var(--ink);
  border-color: #caa227;
  opacity: 1;
}

.beat-grid .clap-hit {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
  font-size: 0.58rem;
}

.ghost-example {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
}

.ghost-example div {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem;
  border-radius: 8px;
  background: var(--soft);
}

.ghost-example span {
  color: var(--muted);
  font-weight: 900;
}

.hat-steps {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 0.25rem;
  margin: 1rem 0 0.5rem;
}

.hat-steps span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
}

.hat-steps span:nth-child(4n + 3) {
  background: var(--yellow);
  color: var(--ink);
}

.hat-steps .mute-step {
  background: var(--pink);
  color: #fff;
}

.hat-velocities {
  display: flex;
  align-items: end;
  gap: 0.25rem;
  min-height: 160px;
  padding: 0.6rem;
  border-radius: 8px;
  background: var(--soft);
}

.hat-velocities b {
  display: flex;
  flex: 1;
  align-items: end;
  justify-content: center;
  min-width: 0;
  padding: 0.25rem 0.1rem;
  border-radius: 5px 5px 0 0;
  background: var(--teal);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 950;
}

.hat-velocities b:nth-child(4n + 3) {
  background: var(--pink);
}

.arrangement-map {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.55rem;
}

.arrangement-map div {
  min-height: 150px;
  padding: 1rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.arrangement-map span {
  display: block;
  margin: 0.4rem 0;
  color: var(--pink);
  font-weight: 950;
}

.note-card {
  max-width: 760px;
  border-left: 6px solid var(--yellow);
}

.shortcut-card {
  padding: 1rem;
}

.shortcut-card kbd,
.workflow-card kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin: 0 0.22rem 0.65rem 0;
  padding: 0.22rem 0.5rem;
  border: 1px solid #b9b0a0;
  border-bottom-width: 3px;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 950;
  font-family: inherit;
}

.shortcut-card > span {
  display: inline-flex;
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-weight: 900;
}

.workflow-card {
  padding: 1.2rem;
}

.shortcut-flow {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0;
}

.shortcut-flow span {
  padding: 0.8rem;
  border-radius: 8px;
  background: var(--soft);
  font-weight: 850;
}

.learning-path {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-bottom: 2rem;
}

.learning-path article {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
  border-top: 5px solid var(--teal);
  background: transparent;
}

.learning-path span,
.ableton-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 950;
}

.learning-path p,
.octave-card p,
.ableton-steps p,
.case-card p,
.progression-card p,
.lesson-card p {
  color: var(--muted);
}

.section-heading {
  display: grid;
  gap: 0.55rem;
  padding: 3.2rem 0 1.15rem;
}

.octave-section {
  padding-bottom: 2rem;
}

.octave-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.octave-card {
  padding: 1.1rem;
}

.octave-card.wide {
  grid-column: 1 / -1;
}

.wide-keyboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
  overflow-x: auto;
  padding-bottom: 0.4rem;
}

.octave {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(42px, 1fr));
  min-width: 260px;
  min-height: 150px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: #111;
}

.white-key {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.2rem;
  padding: 0.65rem 0.2rem;
  border-right: 1px solid #bdbdbd;
  background: linear-gradient(#fff, #efefef);
  color: var(--ink);
  font-weight: 950;
}

.white-key small {
  color: var(--muted);
  font-size: 0.72rem;
}

.do-key {
  background: linear-gradient(#fff3b5, #f2c84b);
  outline: 4px solid var(--pink);
  outline-offset: -4px;
}

.black-key {
  position: absolute;
  top: 0;
  z-index: 2;
  width: 10%;
  height: 58%;
  border-radius: 0 0 7px 7px;
  background: #080808;
  box-shadow: inset 0 -8px 0 rgba(255, 255, 255, 0.08);
}

.pair-a {
  left: 10.2%;
}

.pair-b {
  left: 24.5%;
}

.trio-a {
  left: 53.2%;
}

.trio-b {
  left: 67.5%;
}

.trio-c {
  left: 81.8%;
}

.octave-mini {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.octave-mini span,
.octave-mini b {
  display: block;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
}

.octave-mini span:first-child {
  font-size: 0.95rem;
}

.octave-mini span:last-child {
  font-size: 1.35rem;
}

.lab-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.keyboard {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  min-height: 240px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: #111;
}

.key {
  cursor: pointer;
  user-select: none;
}

.key.white {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.8rem 0.25rem;
  border: 0;
  border-right: 1px solid #b8b8b8;
  background: linear-gradient(#fff, #eee);
  color: var(--ink);
  font-size: clamp(0.9rem, 2vw, 1.6rem);
  font-weight: 950;
}

.key.white span {
  color: var(--muted);
  font-size: 0.78rem;
}

.key.black {
  position: absolute;
  top: 0;
  z-index: 2;
  width: 8.8%;
  height: 58%;
  border: 0;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(#1a1a1a, #050505);
  color: #fff;
  font-size: clamp(0.7rem, 1.5vw, 1rem);
  font-weight: 900;
}

.black-1 {
  left: 9.4%;
}

.black-2 {
  left: 23.8%;
}

.black-4 {
  left: 52.3%;
}

.black-5 {
  left: 66.6%;
}

.black-6 {
  left: 80.9%;
}

.key.active,
.key.in-scale {
  outline: 4px solid var(--yellow);
  outline-offset: -4px;
}

.key.active {
  background: var(--yellow);
  color: var(--ink);
}

.key.black.active {
  background: var(--pink);
  color: #fff;
}

.now-playing {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 8px;
  background: var(--soft);
}

.now-playing strong {
  display: block;
  font-size: 1.6rem;
}

.now-playing p {
  margin: 0;
  color: var(--muted);
}

.midi-roll {
  display: grid;
  grid-template-columns: 42px 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #e6e0d2;
}

.midi-labels,
.midi-grid {
  display: grid;
  grid-template-rows: repeat(7, 34px);
}

.midi-labels span {
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 900;
}

.midi-grid {
  position: relative;
  background-image:
    linear-gradient(to right, rgba(23, 23, 23, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(23, 23, 23, 0.14) 1px, transparent 1px);
  background-size: 12.5% 100%, 100% 34px;
}

.midi-note {
  position: absolute;
  left: 4%;
  width: 18%;
  height: 22px;
  border: 2px solid rgba(23, 23, 23, 0.3);
  border-radius: 6px;
  background: var(--pink);
}

.interactive-grid,
.progression-grid,
.case-grid,
.ableton-steps,
.philosophy-grid,
.mode-grid,
.workflow-steps,
.tuning-grid,
.chop-grid,
.warp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.lesson-card,
.progression-card,
.case-card {
  padding: 1.1rem;
}

.step-pattern {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  margin: 1rem 0;
}

.step-pattern span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--yellow);
  font-weight: 950;
}

.step-pattern span:nth-child(3),
.step-pattern span:nth-child(7),
.step-pattern.minor span:nth-child(2),
.step-pattern.minor span:nth-child(5) {
  background: var(--pink);
  color: #fff;
}

.callout {
  padding: 0.85rem;
  border-left: 5px solid var(--yellow);
  border-radius: 8px;
  background: #fff7d6;
  color: var(--ink);
  font-weight: 800;
}

.scale-tool label,
.control-row label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 900;
}

select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.note-chips,
.built-chord,
.bass-line,
.progression-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0;
}

.note-chip,
.built-chord span,
.bass-line span,
.progression-steps button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 950;
}

.note-chip:nth-child(2n),
.built-chord span:nth-child(2),
.bass-line span:nth-child(2) {
  background: var(--yellow);
  color: var(--ink);
}

.note-chip:nth-child(3n),
.built-chord span:nth-child(3),
.bass-line span:nth-child(3) {
  background: var(--pink);
  color: #fff;
}

.band {
  margin-top: 1rem;
  background: var(--soft);
  border-block: 1px solid var(--line);
}

.chord-lab {
  padding-bottom: 3rem;
}

.chord-workbench {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1fr);
  gap: 1rem;
}

.chord-builder,
.chord-theory {
  padding: 1.1rem;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 1rem;
}

.rule-list {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
}

.rule-list p {
  margin: 0;
  padding: 0.85rem;
  border-radius: 8px;
  background: var(--soft);
}

.progression-lab,
.video-section,
.ableton-section,
.accidentals-section,
.practice-section,
.guide-section,
.quiz-section,
.sampling-intro,
.sampling-video,
.ableton-visual-section,
.simpler-section,
.decision-section,
.tuning-section,
.chop-section,
.warp-section,
.sampling-practice,
.sampling-quiz-section {
  padding-bottom: 3rem;
}

.module-divider {
  margin-top: 3rem;
  background: var(--ink);
  color: #fff;
}

.module-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: 2rem;
  align-items: center;
  padding: 4rem 0;
}

.module-hero p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.78);
}

.sampling-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.sampling-summary article {
  min-height: 150px;
  padding: 1rem;
  background: #242424;
  border-color: rgba(255, 255, 255, 0.15);
}

.sampling-summary strong {
  color: var(--yellow);
  font-size: 1.3rem;
}

.sampling-summary p {
  color: rgba(255, 255, 255, 0.75);
}

.philosophy-grid {
  grid-template-columns: repeat(2, 1fr);
}

.philosophy-grid article,
.mode-grid article,
.workflow-steps article,
.decision-tool article,
.tuning-grid article,
.chop-grid article,
.warp-grid article {
  padding: 1.1rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 900;
}

.mode-grid article > span,
.workflow-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  min-height: 2.4rem;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 950;
}

.mode-grid article:nth-child(2) > span,
.workflow-steps article:nth-child(2n) span {
  background: var(--pink);
}

.mode-grid article:nth-child(3) > span,
.workflow-steps article:nth-child(3n) span {
  background: var(--yellow);
  color: var(--ink);
}

.sampling-workflow {
  padding-bottom: 3rem;
}

.decision-tool {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
}

.decision-tool label,
.transpose-tool label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 900;
}

.tool-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: var(--soft);
  border-left: 5px solid var(--teal);
  color: var(--ink);
  font-weight: 850;
}

.mini-table {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.mini-table div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 0.8fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--soft);
}

.mini-table span {
  color: var(--pink);
  font-weight: 950;
}

.chop-grid,
.warp-grid {
  grid-template-columns: repeat(4, 1fr);
}

.warp-grid article:last-child,
.chop-grid article:first-child {
  border-top: 5px solid var(--yellow);
}

.translation-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.translation-board article,
.accidental-grid article {
  padding: 1.1rem;
}

.note-map {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.45rem;
  margin-top: 1rem;
}

.note-map span {
  display: grid;
  min-height: 62px;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-weight: 850;
}

.note-map strong {
  display: block;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
}

.plain-list {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.plain-list li + li {
  margin-top: 0.35rem;
}

.progression-steps button {
  cursor: pointer;
}

.progression-steps button:nth-child(2) {
  background: var(--blue);
}

.progression-steps button:nth-child(3) {
  background: var(--violet);
}

.progression-steps button:nth-child(4) {
  background: var(--green);
}

.wide-card {
  grid-column: span 2;
}

.chord-notes-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-top: 1rem;
}

.chord-notes-table div {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  border-radius: 8px;
  background: var(--soft);
}

.chord-notes-table strong {
  color: var(--pink);
  font-size: 1.5rem;
  line-height: 1;
}

.chord-notes-table span,
.chord-notes-table small {
  color: var(--muted);
  font-weight: 800;
}

.chord-notes-table b {
  font-size: 1.05rem;
}

.accidental-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.video-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 1rem;
  padding: 1rem;
}

.video-card video,
.video-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  background: #000;
}

.video-notes {
  display: grid;
  align-content: center;
  gap: 0.7rem;
  padding: 1rem;
  border-radius: 8px;
  background: var(--soft);
}

.video-notes ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.resource-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ableton-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.ableton-shot {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 1rem;
  margin: 0;
  overflow: hidden;
}

.ableton-shot img {
  width: 100%;
  min-height: 210px;
  max-height: 360px;
  object-fit: contain;
  padding: 0.6rem;
  border-radius: 8px;
  background: #e6e6e6;
}

.ableton-shot figcaption {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 0.2rem 0;
}

.ableton-shot figcaption strong {
  font-size: 1.05rem;
}

.ableton-shot figcaption span,
.source-note {
  color: var(--muted);
}

.source-note {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  font-weight: 800;
}

.ableton-steps article {
  padding: 1.1rem;
}

.case-card strong {
  display: block;
  margin: 0.8rem 0 0.35rem;
  color: var(--pink);
}

.guide-image {
  overflow: hidden;
}

.guide-image img {
  width: 100%;
}

.quiz-card {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
}

.quiz-item {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.quiz-item p {
  margin: 0 0 0.7rem;
  font-weight: 950;
}

.quiz-item label {
  display: block;
  width: fit-content;
  margin-bottom: 0.45rem;
  cursor: pointer;
}

.quiz-item input {
  margin-right: 0.55rem;
}

.quiz-result {
  min-height: 3rem;
  padding: 1rem;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-weight: 800;
}

.quiz-result ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.footer-inner {
  color: var(--muted);
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .hero-grid,
  .module-hero,
  .chord-workbench,
  .video-card,
  .decision-tool {
    grid-template-columns: 1fr;
  }

  .learning-path,
  .octave-board,
  .interactive-grid,
  .progression-grid,
  .case-grid,
  .module-cards,
  .resource-grid,
  .shortcut-grid,
  .track-plan,
  .house-patterns,
  .house-steps,
  .ableton-actions,
  .velocity-demo,
  .velocity-workflow,
  .percussion-guide,
  .bass-choice,
  .hat-lesson,
  .ableton-steps,
  .sampling-summary,
  .ableton-visual-grid,
  .philosophy-grid,
  .mode-grid,
  .workflow-steps,
  .tuning-grid,
  .chop-grid,
  .warp-grid,
  .translation-board,
  .accidental-grid {
    grid-template-columns: 1fr 1fr;
  }

  .formula-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding-top: 2.2rem;
  }

  .learning-path,
  .octave-board,
  .interactive-grid,
  .progression-grid,
  .case-grid,
  .module-cards,
  .resource-grid,
  .shortcut-grid,
  .track-plan,
  .house-patterns,
  .house-steps,
  .ableton-actions,
  .velocity-demo,
  .velocity-workflow,
  .percussion-guide,
  .bass-choice,
  .hat-lesson,
  .ableton-steps,
  .sampling-summary,
  .ableton-visual-grid,
  .philosophy-grid,
  .mode-grid,
  .workflow-steps,
  .tuning-grid,
  .chop-grid,
  .warp-grid,
  .translation-board,
  .accidental-grid,
  .control-row,
  .now-playing {
    grid-template-columns: 1fr;
  }

  .wide-card {
    grid-column: auto;
  }

  .note-map,
  .chord-notes-table {
    grid-template-columns: 1fr 1fr;
  }

  .wide-keyboard {
    grid-template-columns: repeat(3, 260px);
  }

  .mini-table div {
    grid-template-columns: 1fr;
  }

  .arrangement-map {
    grid-template-columns: 1fr;
  }

  .bar-grid.sixteenths {
    grid-template-columns: repeat(8, 1fr);
  }

  .hat-steps {
    grid-template-columns: repeat(8, 1fr);
  }

  .beat-translation,
  .beat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .keyboard {
    min-height: 190px;
  }

  .key.black {
    width: 9.8%;
    font-size: 0.68rem;
  }

  .midi-labels,
  .midi-grid {
    grid-template-rows: repeat(7, 28px);
  }
}
