.lab {
  max-width: 820px;
  margin: auto;
  padding: clamp(28px, 4vw, 52px) 18px 64px;
  color: #193e35;
}
.lab h1 {
  max-width: 14ch;
  margin: 0 0 12px;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 1.02;
}
.lab h1 em {
  color: #3f6d4c;
  font-style: italic;
}
.lab .description,
.lab .fixed,
.lab .scope,
.lab-result p {
  color: #4e6358;
}
.lab .description {
  max-width: 62ch;
  font-size: 18px;
}
.bench {
  margin-top: 22px;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid #c6cfc2;
  border-radius: 16px;
  background: #fff;
}
.benchhead,
.labcounts,
.lablinks,
.lab-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.benchhead h2 {
  font-size: clamp(24px, 3vw, 32px);
}
#phase {
  border: 1px solid #cad6c5;
  border-radius: 999px;
  background: #f1f5ec;
  color: #36553f;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
#phase[data-state="working"] {
  background: #fff4d8;
  border-color: #e2c98a;
}
#phase[data-state="done"] {
  background: #dbecbc;
  border-color: #97ba78;
}
#phase[data-state="failed"] {
  background: #ffead1;
  border-color: #d5a564;
  color: #664621;
}
.households {
  list-style: none;
  margin: 16px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.households li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #d7e0d1;
  border-radius: 12px;
  background: #f7f8f3;
}
.households li:first-child {
  background: #f3f8e4;
  border-color: #c5d7a4;
}
.households span,
.households code {
  color: #52675b;
  font-size: 14px;
}
.households code:empty::before {
  content: "Wallet not created";
}
.households code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
}
.fixed {
  margin: 0 0 14px;
}
.options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 52px;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid #b9c7b4;
  border-radius: 999px;
  font-weight: 750;
  cursor: pointer;
}
.choice:has(input:checked) {
  background: #204e41;
  border-color: #204e41;
  color: #f7fff4;
}
.choice input {
  accent-color: #d2ef8a;
}
#lab-status {
  min-height: 1.5em;
  margin: 14px 0 0;
  font-weight: 650;
}
.lab-result {
  display: block;
  margin-top: 8px;
}
.labcounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 8px 0 14px;
}
.labcounts div {
  padding: 14px 16px 16px;
  border-radius: 14px;
  background: #193f37;
  color: #e7f0df;
}
.labcounts strong {
  display: block;
  margin-top: 4px;
  color: #f8fff4;
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: clamp(52px, 8vw, 76px);
  font-weight: 560;
  letter-spacing: -0.05em;
  line-height: 0.95;
}
.download {
  font-weight: 750;
}
.masks {
  width: 100%;
  margin: 8px 0 14px;
  border-collapse: collapse;
  font: 0.82rem/1.45 ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.masks th,
.masks td {
  padding: 7px 6px;
  border-bottom: 1px solid #dae1d5;
  text-align: right;
  white-space: nowrap;
}
.masks th:first-child,
.masks td:first-child {
  text-align: left;
}
.masks tfoot {
  background: #e8f1da;
  color: #284e31;
  font-weight: 750;
}
.tablewrap {
  max-width: 100%;
  overflow-x: auto;
}
#reset {
  margin-left: 8px;
}
.scope {
  margin-top: 16px;
  font-size: 14px;
}
.lablinks {
  justify-content: flex-start;
  gap: 18px;
  margin-top: 10px;
  font-weight: 650;
}
@media (max-width: 640px) {
  .lab h1 {
    max-width: none;
  }
  .households li,
  .benchhead,
  .lablinks {
    align-items: flex-start;
  }
  .households code {
    grid-column: 1 / -1;
  }
}
#inference {
  margin: 16px 0;
}
#inference summary {
  cursor: pointer;
  font-weight: 650;
}
#inferred-answers {
  font-variant-numeric: tabular-nums;
}
