.lab-page {
  --lab-rule: #d6d9cc;
  --lab-card: #eeeee4;
  max-width: 1320px;
}

.lab-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  align-items: end;
  gap: 18px 30px;
  padding: 24px 0 22px;
}
.lab-intro h1 { font-size: clamp(3.8rem, 9vw, 7.4rem); }
.lab-intro > p {
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.15rem);
  padding-bottom: 5px;
}
.lab-steps {
  margin-bottom: clamp(24px, 4vw, 48px);
  border-block: 1px solid var(--lab-rule);
}
.lab-steps ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.lab-steps li { min-width: 0; }
.lab-steps li + li { border-left: 1px solid var(--lab-rule); }
.lab-steps a {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 100%;
  min-height: 50px;
  padding: 8px clamp(8px, 1.8vw, 24px);
  font-weight: 600;
  line-height: 1.28;
}
.lab-steps a span[aria-hidden] {
  flex: 0 0 1.5em;
  color: var(--rust);
  font-variant-numeric: tabular-nums;
}
.lab-steps a:hover, .lab-steps a[aria-current] { background: var(--mint); }
.lab-steps a[aria-current] { box-shadow: inset 0 -2px var(--green); }
.lab-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lab-section-head { margin-bottom: clamp(14px, 2.4vw, 26px); }
.lab-section-head h2 { font-size: clamp(2.3rem, 5vw, 4rem); }
.lab-experiment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 1fr);
  gap: clamp(14px, 3vw, 42px);
  align-items: start;
}
.lab-bench, .lab-art {
  margin: 0;
  min-width: 0;
  padding: clamp(12px, 2.5vw, 28px);
  border: 1px solid var(--lab-rule);
  background: var(--lab-card);
}
.lab-bench-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.lab-bench-header h3 { font-weight: 700; }
.lab-bench-header > span {
  color: var(--muted);
  font-size: .8rem;
  text-align: right;
}
.lab-specimens { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(6px, 1.5vw, 18px); }
.lab-field {
  display: grid;
  place-items: center;
  aspect-ratio: 1.36;
  min-height: 88px;
  background: var(--lab-ground);
  border: 1px solid #202d2826;
}
.lab-field-band { background: var(--lab-field); }
.lab-surround {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: var(--lab-ground);
}
.lab-field-band .lab-surround { width: 57%; height: 66%; }
.lab-bench[data-lab-view="same"] .lab-field:not(.lab-field-band),
.lab-bench[data-lab-view="same"] .lab-surround { background: var(--lab-common); }
.lab-sample {
  width: 34%;
  height: 43%;
  background: var(--lab-sample);
}
.lab-field-band .lab-sample { width: 60%; height: 65.15%; }
.lab-specimen p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .11em;
}
.lab-letter {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  background: var(--ink);
  color: var(--white);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: 0;
}
.lab-bench details {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--lab-rule);
  color: var(--muted);
}
.lab-bench summary { cursor: pointer; width: fit-content; }
.lab-bench details p { margin: 5px 0 0 16px; }
.lab-controls {
  min-width: 0;
  padding: clamp(13px, 2.3vw, 26px);
  border: 1px solid var(--lab-rule);
  background: var(--white);
}
.lab-controls fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.lab-controls legend {
  max-width: 100%;
  padding: 0;
  color: var(--ink);
  font: 400 clamp(1.6rem, 2.7vw, 2.25rem)/1.06 var(--serif);
}
.lab-controls fieldset > p, .lab-note > p {
  margin-top: 6px;
  color: var(--muted);
  font-size: .87rem;
}
.lab-predictions, .lab-answers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.lab-answers { display: grid; }
.lab-predictions button, .lab-answers button {
  min-height: 44px;
  min-width: 44px;
  padding: 7px 10px;
  border: 1px solid var(--lab-rule);
  color: var(--ink);
  background: var(--white);
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
}
.lab-predictions button { text-align: center; }
.lab-predictions button[aria-pressed="true"], .lab-answers button[aria-pressed="true"] {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
  background: var(--mint);
}
.lab-controls button[aria-disabled="true"] { cursor: default; }
.lab-controls .primary-button { min-height: 44px; text-align: center; line-height: 1.3; }
.lab-result {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--green);
  background: var(--mint);
}
.lab-result p { margin-top: 4px; }
.lab-next {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .19em;
}
.lab-art-image { position: relative; }
.lab-art-image img { width: 100%; height: auto; }
.lab-art-image [data-lab-detail] {
  position: absolute;
  left: 83%;
  top: 84%;
  width: 6%;
  height: 11%;
  outline: 2px solid white;
  box-shadow: 0 0 0 4px #1b2925;
  pointer-events: none;
}
.lab-art figcaption { margin-top: 10px; color: var(--muted); }
.lab-art figcaption span { display: block; }
.lab-art figcaption a, .lab-foot a { color: var(--green); text-decoration: underline; text-underline-offset: .18em; }
.lab-art figcaption a { display: inline-block; margin: 7px 12px 0 0; }
.lab-note { margin-top: 16px; }
.lab-note label { display: block; font-weight: 700; }
.lab-note textarea {
  display: block;
  width: 100%;
  margin: 6px 0 8px;
  padding: 8px;
  border: 1px solid var(--muted);
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  resize: vertical;
}
.lab-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid var(--lab-rule);
  color: var(--muted);
  font-size: .84rem;
}
@media (max-width: 720px) {
  .lab-intro { grid-template-columns: 1fr; gap: 8px; padding: 10px 0 14px; }
  .lab-intro h1 { font-size: clamp(3.35rem, 13vw, 5rem); }
  .lab-steps { margin-bottom: 22px; }
  .lab-steps a { font-size: .79rem; gap: 3px; min-height: 47px; }
  .lab-steps a span[aria-hidden] { flex-basis: 1.3em; }
  .lab-experiment-layout { grid-template-columns: 1fr; }
}
@media (max-width: 450px) {
  .lab-steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lab-steps li:nth-child(odd) { border-left: 0; }
  .lab-steps li:nth-child(n + 3) { border-top: 1px solid var(--lab-rule); }
}
