.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.mode-switch legend {
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 8px;
  padding: 0;
  overflow: visible;
  clip: auto;
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 750;
}

.mode-switch label {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.mode-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mode-switch span {
  position: relative;
  display: block;
  justify-content: initial;
  min-height: 66px;
  padding: 10px 12px 10px 45px;
  border: 1px solid #b9c6cc;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.mode-switch span::before {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 16px;
  height: 16px;
  border: 1.5px solid #809097;
  border-radius: 50%;
  background: #fff;
  content: "";
  transform: translateY(-50%);
}

.mode-switch strong,
.mode-switch small {
  display: block;
  line-height: 1.3;
}

.mode-switch strong {
  font-size: .91rem;
}

.mode-switch small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 500;
}

.mode-switch input:checked + span {
  border-color: var(--brand);
  background: #eff7f5;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.mode-switch input:checked + span::before {
  border: 5px solid var(--brand);
}

.mode-switch input:focus-visible + span {
  outline: 3px solid #66a89f;
  outline-offset: 2px;
}

.mode-switch label:hover span {
  border-color: #7fa9a2;
}

@media (max-width: 480px) {
  .mode-switch {
    grid-template-columns: 1fr;
  }

  .mode-switch span {
    min-height: 58px;
  }
}
