.listening-lab {
  --lab-rule: #bfaa80;
  --lab-panel: #efeadf;
}

.lab-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  grid-template-areas: "intro illustration" "instrument illustration" "profile illustration";
  align-content: start;
  align-items: start;
  column-gap: clamp(2rem, 5vw, 5.5rem);
  padding-block: clamp(2.1rem, 5.4vw, 5rem) 1.5rem;
}

.lab-intro { grid-area: intro; }
.lab-intro h1 {
  font-size: clamp(3.45rem, 6.75vw, 6.6rem);
  line-height: .86;
  margin-block: 0 1.45rem;
}
.lab-intro h1 em { color: var(--olive); }
.lab-intro p {
  max-width: 53ch;
  color: var(--dim);
  margin-bottom: .85rem;
}

.lab-instrument {
  grid-area: instrument;
  margin-top: clamp(.5rem, 2vw, 1.3rem);
}

.lab-instrument-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: .35rem;
}
.lab-instrument-heading p {
  margin: 0;
  font: 500 1.5rem/1.2 var(--serif);
}
#lab-mute {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .3rem .5rem;
  border: 0;
  background: transparent;
  color: var(--forest);
  font-size: .875rem;
  cursor: pointer;
}
#lab-mute::before {
  content: "";
  width: .6rem;
  height: .6rem;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}
#lab-mute[aria-pressed="true"]::before { background: var(--gold); }

.lab-keybed {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  grid-template-rows: 1fr;
  min-height: 146px;
  height: clamp(146px, 14vw, 186px);
  padding: 3px;
  gap: 0;
  border: 1px solid #6d634d;
  border-radius: 3px 3px .65rem .65rem;
  background: #343a35;
  isolation: isolate;
}
.lab-key {
  grid-row: 1;
  grid-column: var(--key-start) / span 2;
  display: grid;
  place-items: end center;
  align-self: stretch;
  margin: 0 1px;
  padding: 0 .12rem .7rem;
  border: 1px solid #bcad91;
  border-radius: 1px 1px .38rem .38rem;
  background: linear-gradient(#e9e0cd, #fffaf0 67%);
  color: #2f322c;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.lab-key[data-column="1"] { --key-start: 1; }
.lab-key[data-column="2"] { --key-start: 2; }
.lab-key[data-column="3"] { --key-start: 3; }
.lab-key[data-column="4"] { --key-start: 4; }
.lab-key[data-column="5"] { --key-start: 5; }
.lab-key[data-column="7"] { --key-start: 7; }
.lab-key[data-column="8"] { --key-start: 8; }
.lab-key[data-column="9"] { --key-start: 9; }
.lab-key[data-column="10"] { --key-start: 10; }
.lab-key[data-column="11"] { --key-start: 11; }
.lab-key[data-column="12"] { --key-start: 12; }
.lab-key[data-column="13"] { --key-start: 13; }
.lab-key.accidental {
  align-self: start;
  justify-self: center;
  z-index: 1;
  width: clamp(36px, 72%, 54px);
  height: 62%;
  margin: 0;
  padding-bottom: .6rem;
  border-color: #141f1c;
  background: linear-gradient(#243631, #182522);
  color: #fff6df;
  font-size: .82rem;
}
.lab-key:hover { box-shadow: inset 0 -4px #bc9b5b; }
.lab-key[aria-pressed="true"] {
  border-color: #8a6434;
  box-shadow: inset 0 -5px #94703d;
  background: #e6ca93;
  color: #211b15;
}
.lab-key.accidental[aria-pressed="true"] { box-shadow: inset 0 -5px #6b4c28; }
.lab-key:focus-visible {
  z-index: 2;
  outline: 2px solid #98612c;
  outline-offset: -4px;
}
.lab-key.accidental:focus-visible { outline-color: #f2d397; }
.lab-key.accidental[aria-pressed="true"]:focus-visible { outline-color: #4c351f; }

#lab-key-hint, .lab-audio-status {
  color: var(--dim);
  font-size: .875rem;
  margin: .55rem 0 0;
}
.lab-audio-status:empty { display: none; }

.lab-artwork {
  grid-area: illustration;
  position: relative;
  width: min(100%, 34rem);
  aspect-ratio: 3 / 4;
  justify-self: end;
  margin: .1rem 0 0;
  background: var(--lab-panel);
  box-shadow: 0 0 0 1px #b9aa8b, 0 20px 42px rgb(47 36 20 / .13);
}
.lab-picture {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lab-profile {
  grid-area: profile;
  min-height: 22.5rem;
  margin-top: 1.45rem;
  padding-block: 1.05rem 1.5rem;
  border-top: 1px solid var(--lab-rule);
}
.lab-pitch-title h2 { font-size: clamp(2.8rem, 5vw, 4.25rem); }
.lab-color {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  color: var(--dim);
  font-size: .875rem;
  margin: .48rem 0 .55rem;
}
.lab-swatch {
  width: .92rem;
  height: .92rem;
  border: 1px solid #605b50;
  border-radius: 50%;
  background: var(--pitch-color);
}
.lab-descriptors {
  color: var(--forest);
  font: 500 clamp(1.35rem, 2.3vw, 1.8rem)/1.11 var(--serif);
  margin-bottom: .46rem;
}
.lab-description { color: var(--dim); max-width: 48ch; }
.lab-compositions {
  border-top: 1px solid var(--line);
  padding-top: .8rem;
  margin-top: 1rem;
}
.lab-compositions h3 { font-size: clamp(1.65rem, 3vw, 2.25rem); }
.lab-compositions p { color: var(--dim); font-size: .875rem; margin: .4rem 0 .3rem; }
.lab-compositions ul { margin: 0; padding: 0; list-style: none; }
.lab-compositions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--forest);
  text-decoration-color: var(--gold);
}
.lab-compositions a:hover { text-decoration-thickness: 2px; }

.lab-credit {
  border-top: 1px solid var(--line);
  color: var(--dim);
  padding-block: 1rem 2rem;
  font-size: .875rem;
}
.lab-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .lab-stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "instrument" "illustration" "profile";
  }
  .lab-artwork { justify-self: center; margin-top: 1.35rem; }
  .lab-profile { min-height: 22rem; }
}
