:is(
  [data-study-lab="screen-time"],
  [data-study-lab="rhythm-attention"],
  [data-study-lab="meaning-between-shots"],
  [data-study-lab="sound-across-cuts"]
) {
  background: #f7f5ef;
}

.lab-time {
  --lab-ink: #263d32;
  --lab-muted: #4e6155;
  --lab-green: #466354;
  --lab-rust: #8d4736;
  --lab-paper: #f7f5ef;
  color: var(--lab-ink);
  font: .875rem/1.3 var(--sans, system-ui, sans-serif);
  font-variant-numeric: tabular-nums;
}

.lab-time .lab-time-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lab-time .lab-time-shot {
  min-width: 0;
  margin: 0;
}

.lab-time .lab-time-shot figcaption {
  display: block;
  margin: .4rem 0 0;
  padding: 0;
  color: var(--lab-ink);
  font: 1rem/1.16 var(--serif, Georgia, serif);
  overflow-wrap: break-word;
}

.lab-time .lab-time-shot small {
  display: block;
  margin-top: .15rem;
  color: var(--lab-muted);
  font: .8rem/1.3 var(--sans, system-ui, sans-serif);
}

.lab-time-art {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  overflow: hidden;
  border: 1px solid #839082;
  border-radius: 2px;
}

.lab-time-current .lab-time-art {
  border-color: var(--lab-rust);
  outline: 2px solid var(--lab-rust);
  outline-offset: -2px;
}

.lab-time .lab-time-current figcaption {
  font-weight: 700;
}

.lab-time-omitted .lab-time-art {
  filter: grayscale(1);
  opacity: .5;
}

.lab-time-meter {
  margin: 0 0 1rem;
}

.lab-time-track-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .1rem .75rem;
  margin-bottom: .3rem;
}

.lab-time-track-title :first-child {
  font-weight: 600;
}

.lab-time-track {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 1.8rem;
  overflow: visible;
  border: 1px solid #9b9c88;
  background: repeating-linear-gradient(135deg, #eeebe0 0 5px, #e7e2d5 5px 6px, #eeebe0 6px 9px);
}

.lab-time-segment {
  stroke: var(--lab-paper);
  stroke-width: 1px;
}

.lab-time-first, .lab-time-stage-pack { fill: var(--lab-green); }
.lab-time-second, .lab-time-stage-mark { fill: var(--lab-rust); }
.lab-time-stage-find { fill: #757759; }
.lab-time-stage-seal { fill: #806d50; }
.lab-time-stage-send { fill: #385049; }

.lab-time-rhythm-track {
  position: relative;
  margin-bottom: .7rem;
}

.lab-time-track-captions {
  pointer-events: none;
  position: absolute;
  inset: 0 .4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff8e6;
}

.lab-time-axis {
  display: flex;
  justify-content: space-between;
  gap: .15rem;
  margin-top: .32rem;
  color: var(--lab-muted);
  font-size: .78rem;
}

.lab-time-boundary, .lab-time-cursor {
  stroke: var(--lab-ink);
  stroke-width: 2px;
}

.lab-time-cursor-outline {
  stroke: var(--lab-paper);
  stroke-width: 4px;
}

.lab-time-wait {
  height: .8rem;
}

.lab-time-wait-span {
  fill: #c79e6b;
}

.lab-time .lab-time-sequence {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .58rem;
}

.lab-time .lab-time-sequence:has(> li:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lab-time-sequence li {
  position: relative;
  min-width: 0;
}

.lab-time-sequence li + li::before {
  content: "";
  position: absolute;
  width: .38rem;
  height: .38rem;
  inset-block-start: .65rem;
  inset-inline-start: -.55rem;
  border-block-start: 1px solid var(--lab-rust);
  border-inline-end: 1px solid var(--lab-rust);
  transform: rotate(45deg);
}

.lab-time-key {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .9rem;
  margin: .4rem 0 .7rem;
  color: var(--lab-muted);
}

.lab-time-key span {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.lab-time-key i {
  display: inline-block;
  width: .68rem;
  height: .68rem;
}

.lab-time-key .lab-time-first { background: var(--lab-green); }
.lab-time-key .lab-time-second { background: var(--lab-rust); }

.lab-time-waveform {
  color: #fff8e6;
}

.lab-time-overlap {
  height: .7rem;
  border-block: 0;
  border-inline-color: transparent;
  background: none;
}

.lab-time-overlap-span {
  fill: #d6ba8a;
}

@container (min-width: 34rem) {
  .lab-time-screen .lab-time-shots {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@container (max-width: 18rem) {
  .lab-time .lab-time-sequence figcaption {
    font-size: .88rem;
  }

  .lab-time-track-title {
    gap: .15rem .45rem;
  }
}
