.lab-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 18px;
  padding: clamp(18px, 3.3vw, 43px);
  border: 1px solid #9da781;
  background:
    linear-gradient(90deg, #e7e6cdee 0%, #d9dfbaaf 55%, #c4d2a5a6 100%),
    url('assets/riverbend.svg') 50% 39% / cover;
}
.lab-hero-copy {
  min-width: 0;
}
.lab-hero h1 {
  font: 700 clamp(39px, 6vw, 76px)/0.95 var(--serif);
  letter-spacing: -0.06em;
  margin: 5px 0 8px;
}
.lab-hero p {
  max-width: 57ch;
}
.lab-hero .eyebrow {
  color: #694b1f;
}
.lab-hero .calendar {
  flex: 0 1 auto;
}
.lab-stations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: #eae5d4;
  margin: 13px 0;
}
.lab-stations button {
  min-height: 57px;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 3px;
  padding: 7px 11px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
  line-height: 1.2;
}
.lab-stations button + button {
  border-left: 1px solid var(--line);
}
.lab-stations button[aria-pressed='true'] {
  background: var(--sheet);
  border-bottom-color: var(--pine);
}
.lab-stations small,
.lab-tile span {
  font: 700 11px/1.25 var(--mono);
  color: var(--muted);
}
.lab-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.lab-desk,
.lab-plan {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--sheet);
}
.lab-desk {
  padding: clamp(12px, 1.8vw, 22px);
}
.lab-plan {
  border-top: 3px solid #62856b;
  padding: clamp(11px, 1.6vw, 17px);
}
.lab-section-head h2 {
  font: 700 clamp(25px, 3vw, 38px)/1.05 var(--serif);
  letter-spacing: -0.04em;
  margin: 2px 0 5px;
}
.lab-section-head .eyebrow {
  color: var(--ochre);
}
.lab-section-head p {
  color: var(--muted);
  max-width: 65ch;
}
.lab-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 6px;
  margin: 12px 0;
}
.lab-tile {
  display: grid;
  align-content: center;
  gap: 4px;
  text-align: left;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 6px 8px;
  color: var(--ink);
  background: #f0ebdd;
}
.lab-tile[aria-pressed='true'] {
  background: #e4ebd7;
  border-color: #7c9b76;
  box-shadow: inset 0 -2px #6a8d67;
}
.lab-tile:not([aria-pressed='true']):hover {
  background: #eae7d4;
}
.lab-tile strong {
  font-size: 14px;
  line-height: 1.15;
}
.lab-brief {
  padding: 9px 11px;
  background: #e9ecd9;
  border-left: 3px solid #6b906a;
}
.lab-brief h3 {
  font: 700 21px/1.2 var(--serif);
  margin-bottom: 3px;
}
.lab-sources {
  margin-top: 4px;
  font-size: 12px;
}
.recipe-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 11px 0;
}
.recipe-field {
  padding: 8px;
  border: 1px solid var(--line);
  background: #fbf6ea;
  min-width: 0;
}
.recipe-field label {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}
.recipe-field select,
.recipe-field input {
  color: var(--ink);
  background: #fffdf5;
  border: 1px solid #a3ae93;
  border-radius: 3px;
  width: 100%;
  min-height: 39px;
  padding: 5px;
  font: inherit;
}
.recipe-field p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.lab-model-estimate {
  border: 1px solid var(--line);
  border-top: 2px solid #889f7f;
  padding: 8px;
  background: #f3efdf;
}
.lab-model-estimate > .button {
  margin-top: 7px;
}
.lab-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(118px, 100%), 1fr));
  gap: 6px 10px;
  margin: 3px 0 8px;
}
.lab-numbers dt {
  font-size: 12px;
  color: var(--muted);
}
.lab-numbers dd {
  font: 700 clamp(14px, 1.6vw, 19px)/1.15 var(--mono);
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.lab-pipeline {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 14px;
}
.lab-pipeline h3 {
  font: 700 23px/1.1 var(--serif);
}
.lab-empty {
  margin: 5px 0;
  color: var(--muted);
  font-size: 14px;
}
.lab-registry {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}
.lab-record {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px 10px;
  border: 1px solid var(--line);
  padding: 7px;
}
.lab-record h4 {
  margin: 3px 0 1px;
}
.lab-record p {
  color: var(--muted);
  font-size: 13px;
}
.lab-active {
  margin-top: 5px;
  padding-left: 18px;
}
.lab-offers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.lab-offer {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 5px;
  border: 1px solid var(--line);
  padding: 9px;
}
.lab-offer h3 {
  font: 700 23px/1.1 var(--serif);
}
.lab-offer > p {
  color: var(--muted);
  font-size: 13px;
}
.lab-offer .eyebrow {
  color: var(--ochre);
}
.deal-terms {
  background: #f1ecd9;
  padding: 6px 7px;
  font-size: 13px;
  width: 100%;
}
.deal-terms b {
  display: block;
  margin-bottom: 2px;
}
.lab-plan-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.lab-plan-slot b,
.lab-plan-slot small {
  display: block;
}
.lab-plan-slot small {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.lab-plan-slot .button {
  min-height: 34px;
  padding-inline: 8px;
}
.plan-numbers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 9px;
}
#lab-advance {
  width: 100%;
  margin-top: 8px;
}
.lab-disclosure {
  margin-top: 6px;
}
.lab-plan .cash-table td,
.lab-plan .cash-table th {
  font-size: 12px;
}
.lab-plan .cash-table small {
  overflow-wrap: anywhere;
}
.lab-outcome {
  margin: 12px 0;
  padding: 10px 12px;
}
.lab-outcome h2 {
  font: 700 27px/1.1 var(--serif);
  margin-bottom: 3px;
}
.lab-ledger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
#lab-history {
  padding: 0 13px 6px;
}
#lab-history h3 {
  margin: 8px 0 3px;
  font: 700 23px/1.1 var(--serif);
}

@media (max-width: 800px) {
  .lab-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 525px) {
  .lab-builder .masthead-values {
    justify-content: flex-start;
    gap: 7px 10px;
  }
  .lab-builder .masthead-values .button {
    min-height: 35px;
  }
  .lab-stations button {
    padding-inline: 5px;
  }
  .lab-stations strong {
    font-size: 13px;
  }
  .lab-hero {
    padding: 11px;
  }
  .lab-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lab-offers,
  .recipe-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (pointer: coarse) {
  .lab-builder .lab-plan-slot .button,
  .lab-builder .masthead-values .button,
  .recipe-field select,
  .recipe-field input {
    min-height: 44px;
  }
}
