.goat-lab {
  padding-top: 100px;
  padding-bottom: 110px;
}

.lab-heading { max-width: 830px; margin-bottom: 45px; }
.lab-heading>p:last-child { max-width: 730px; color: #49635e; font-size: 1.18rem; line-height: 1.6; }
.lab-layout { display: grid; grid-template-columns: 1.12fr .88fr; gap: 42px; align-items: start; }
.lab-visual { background: #f1f6ed; border: 1px solid #cfddd3; box-shadow: 12px 12px 0 #e4ece5; }
.lab-visual-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 17px 22px; border-bottom: 1px solid #cfddd3; color: #35544c; font-size: .93rem; }
.lab-visual-top strong { color: #a65736; }
#goat-map { display: block; width: 100%; height: auto; }
#goat-map [hidden], .goat-lab [hidden] { display: none !important; }
#goat-map text { font-family: Inter, ui-sans-serif, system-ui, sans-serif; fill: #294441; }
#goat-map .house-label { font-size: 19px; font-weight: 800; letter-spacing: .12em; }
#goat-map .dimension-label { font-size: 20px; font-weight: 700; }
#goat-map .point-label { font-size: 21px; font-weight: 800; }
#goat-map .region { stroke-width: 3; }
#goat-map .direct { fill: #9ecfbc; fill-opacity: .52; stroke: #519b7a; }
#goat-map .top { fill: #75b4b6; fill-opacity: .55; stroke: #41868b; }
#goat-map .right { fill: #e4ac70; fill-opacity: .61; stroke: #ac7043; }
#goat-map .overlap { fill: #795b9f; fill-opacity: .8; stroke: #5d3a88; stroke-width: 4; }
.construction-labels text { font-size: 23px; font-weight: 850; paint-order: stroke; stroke: #f1f6ed; stroke-width: 5px; }
.map-point { cursor: pointer; }
.map-point .point-hit { fill: transparent; }
.map-point .point-dot { fill: #fff; stroke: #2f5d55; stroke-width: 3; }
.map-point text { font-size: 18px; font-weight: 850; pointer-events: none; }
.map-point.selected .point-dot { fill: #e3ad78; stroke: #99582e; }
.map-point.correct .point-dot { fill: #d3efdf; stroke: #246f4f; }
.map-point.incorrect .point-dot { fill: #f8d9cb; stroke: #9b4c36; }
.map-point:focus-visible { outline: none; }
.map-point:focus-visible .point-dot { stroke-width: 6; stroke: #101f20; }
.lab-map-caption { padding: 0 22px 18px; margin: 0; min-height: 64px; color: #49635e; line-height: 1.5; font-size: .93rem; }
.map-view-toggle { display: block; margin: 0 22px 22px; padding: 0; border: 0; background: none; color: #165f5b; font-weight: 800; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
.map-view-toggle:focus-visible { outline: 3px solid #a65736; outline-offset: 4px; }
.lab-panel { border-top: 3px solid #174e48; padding-top: 20px; }
.lab-progress { display: flex; gap: 9px; margin-bottom: 32px; }
.lab-progress span { padding: 8px 12px; background: #e9f0ec; color: #49635e; font-size: .875rem; font-weight: 750; }
.lab-progress span.active { background: #174e48; color: #fff; }
.lab-stage-label { color: #ad613e; font-size: .875rem; font-weight: 800; letter-spacing: .1em; }
.lab-stage h3 { max-width: 480px; font-size: clamp(1.8rem, 2.7vw, 2.8rem); letter-spacing: -.04em; line-height: 1.12; margin-bottom: 18px; }
.lab-stage h3:focus { outline: none; }
.lab-stage>p:not(.lab-stage-label) { max-width: 520px; color: #49635e; line-height: 1.65; }
.point-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 28px 0 22px; }
.point-choice { min-height: 48px; border: 1px solid #9dbbb1; background: #f5f9f4; color: #244b42; font-weight: 750; cursor: pointer; }
.point-choice:hover, .point-choice.selected { background: #e3ad78; border-color: #a65736; }
.point-choice:focus-visible, .lab-stage button:focus-visible, .lab-inputs input:focus-visible { outline: 3px solid #a65736; outline-offset: 3px; }
.lab-button { border: 0; cursor: pointer; }
.lab-feedback { margin: 17px 0 0; font-weight: 650; color: #244b42 !important; min-height: 1.4em; }
.lab-next, .lab-hint { display: inline-block; padding: 0; border: 0; background: none; color: #165f5b; font-weight: 800; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
.lab-next { margin-top: 18px; }
.lab-hint { margin: 18px 0 0 18px; }
.lab-inputs { display: grid; gap: 14px; margin: 27px 0 20px; }
.lab-inputs label { display: flex; align-items: center; gap: 10px; font-weight: 750; }
.lab-inputs input { width: 85px; padding: 10px; border: 1px solid #9dbbb1; border-radius: 3px; background: #fff; }
.lab-formula { padding: 20px; background: #e9f0ec; color: #244b42 !important; font-size: 1.16rem; line-height: 1.7; }
.lab-formula strong { font-size: 1.24rem; }
.lab-final { padding: 20px; background: #174e48; color: #fff !important; font-size: 1.22rem; }
.lab-takeaway { border-left: 3px solid #e3ad78; padding-left: 17px; }
.calculation-detail { margin: 20px 0; border-top: 1px solid #cfddd3; border-bottom: 1px solid #cfddd3; padding: 15px 0; }
.calculation-detail summary { cursor: pointer; color: #165f5b; font-weight: 800; text-decoration: underline; text-underline-offset: 5px; }
.calculation-detail summary:focus-visible { outline: 3px solid #a65736; outline-offset: 3px; }
.calculation-detail p, .calculation-detail li { color: #49635e; line-height: 1.6; }
.calculation-detail ul { padding-left: 22px; }
.calculation-detail li { margin-bottom: 10px; }

@media (max-width: 900px) {
  .lab-layout { grid-template-columns: 1fr; gap: 48px; }
  .lab-visual { max-width: 700px; }
}

@media (max-width: 520px) {
  .goat-lab { padding-top: 74px; padding-bottom: 80px; }
  .lab-visual-top { padding: 14px 17px; }
  .lab-map-caption { padding: 0 17px 17px; }
  .lab-layout { gap: 38px; }
  .point-choices { grid-template-columns: repeat(2, 1fr); }
  .lab-hint { display: block; margin-left: 0; }
}
