* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 1.5rem;
  background: #f2f5f3;
  color: #17251d;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: #14532d;
}

a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid #d97706;
  outline-offset: 3px;
}

.page {
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
}

nav {
  margin: 0 0 1.5rem;
  padding: 0.75rem;
  background: #dce8df;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  border: 1px solid #a9bdaf;
  border-radius: 0.75rem;
}

nav a {
  flex: 1 1 10rem;
  padding: 0.65rem 0.8rem;
  background: #ffffff;
  border: 1px solid #789383;
  border-radius: 0.5rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

nav a:hover {
  background: #174f2d;
  color: #ffffff;
}

header {
  margin: 0 0 1.5rem;
  padding: 2rem;
  background: #174f2d;
  border-radius: 1rem;
  color: #ffffff;
  text-align: center;
}

header h1,
header p {
  margin: 0;
}

header p {
  margin-top: 0.5rem;
  color: #dceade;
}

.panel,
.panel-alt,
.form-card {
  margin: 0 0 1.25rem;
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid #c5d2c8;
  border-radius: 0.875rem;
}

.panel-alt {
  background: #e5ede7;
}

.panel h2,
.panel-alt h2,
.form-card h2 {
  margin: 0 0 0.5rem;
  color: #174f2d;
}

.panel p,
.panel-alt p {
  margin: 0 0 0.75rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.form-row {
  margin: 0;
}

label,
legend {
  color: #173d29;
  font-weight: 700;
}

label {
  display: block;
  margin: 0 0 0.35rem;
}

input,
select,
textarea {
  width: 100%;
  margin: 0;
  padding: 0.75rem;
  background: #ffffff;
  border: 2px solid #789383;
  border-radius: 0.5rem;
  color: #17251d;
  font: inherit;
}

textarea {
  min-height: 8rem;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  margin: 0.2rem 0 0;
}

.choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  margin: 0 0 0.65rem;
}

.choice label {
  margin: 0;
  font-weight: 400;
}

fieldset {
  min-width: 0;
  margin: 0 0 1rem;
  padding: 1rem;
  border: 2px solid #a9bdaf;
  border-radius: 0.75rem;
}

legend {
  padding: 0 0.35rem;
}

.help,
.required-note {
  margin: 0.35rem 0 0;
  color: #495b50;
  font-size: 0.9rem;
}

.required-mark {
  color: #9a3412;
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

button {
  flex: 1 1 11rem;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  background: #174f2d;
  border: 2px solid #0e351d;
  border-radius: 0.5rem;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #0e351d;
}

button.secondary {
  background: #ffffff;
  border-color: #789383;
  color: #174f2d;
}

button.secondary:hover {
  background: #e5ede7;
}

.example {
  padding: 1rem;
  background: #f8faf8;
  border-left: 0.35rem solid #d97706;
}

.example code {
  font-family: "Courier New", Courier, monospace;
}

input[type="color"] {
  width: 5rem;
  min-height: 3rem;
  padding: 0.25rem;
}

input[type="range"] {
  padding-right: 0;
  padding-left: 0;
  border-color: transparent;
}

input[type="file"] {
  padding: 0.55rem;
}

output {
  display: block;
  min-height: 2.75rem;
  padding: 0.7rem;
  background: #e5ede7;
  border: 2px solid #789383;
  border-radius: 0.5rem;
  color: #173d29;
  font-weight: 700;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.status-card {
  padding: 1rem;
  background: #f8faf8;
  border: 1px solid #c5d2c8;
  border-radius: 0.75rem;
}

.status-card label {
  margin-bottom: 0.5rem;
}

progress,
meter {
  width: 100%;
  height: 1.5rem;
}

.value-text {
  display: block;
  margin-top: 0.45rem;
  color: #495b50;
  font-size: 0.9rem;
}

.field-label {
  display: block;
  margin: 0 0 0.35rem;
  color: #173d29;
  font-weight: 700;
}

.input-group {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  align-items: stretch;
}

.input-group-nowrap {
  flex-wrap: nowrap;
}

.input-group > .form-control,
.input-group > input,
.input-group > textarea,
.input-group > select {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  margin: 0;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.9rem;
  background: #e5ede7;
  border: 2px solid #789383;
  color: #173d29;
  font-weight: 700;
  white-space: nowrap;
}

.input-group > .input-group-text:first-child,
.input-group > div.input-group-text:first-child {
  border-radius: 0.5rem 0 0 0.5rem;
  border-right-width: 0;
}

.input-group > :not(:first-child):not(:last-child) {
  border-radius: 0;
}

.input-group > input:not(:first-child),
.input-group > textarea:not(:first-child),
.input-group > select:not(:first-child) {
  border-left-width: 0;
  border-radius: 0;
}

.input-group > input:last-child,
.input-group > textarea:last-child,
.input-group > select:last-child {
  border-radius: 0 0.5rem 0.5rem 0;
}

.input-group > .input-group-text:last-child {
  border-radius: 0 0.5rem 0.5rem 0;
  border-left-width: 0;
}

.input-group > input:first-child:not(:last-child),
.input-group > textarea:first-child:not(:last-child) {
  border-radius: 0.5rem 0 0 0.5rem;
  border-right-width: 0;
}

.input-group > input + input {
  border-left-width: 0;
  border-radius: 0;
}

.input-group > input + input:last-child {
  border-radius: 0 0.5rem 0.5rem 0;
}

.input-group > div.input-group-text {
  padding: 0.55rem 0.75rem;
}

.input-group > div.input-group-text input {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.input-group-sm .input-group-text,
.input-group-sm input {
  padding: 0.45rem 0.65rem;
  font-size: 0.9rem;
}

.input-group-lg .input-group-text,
.input-group-lg input {
  padding: 0.95rem 1.1rem;
  font-size: 1.1rem;
}

.input-group-textarea {
  align-items: stretch;
}

.input-group-textarea .input-group-text {
  align-items: flex-start;
}

.choice-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.choice-inline .choice {
  margin: 0;
  align-items: center;
}

.choice input:disabled + label,
.switch-input:disabled + .switch-label {
  color: #6b7a70;
}

.switch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

.switch-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.switch-label::before {
  content: "";
  width: 2.75rem;
  height: 1.5rem;
  flex: 0 0 auto;
  background: #a9bdaf;
  border: 2px solid #789383;
  border-radius: 999px;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.switch-label::after {
  content: "";
  position: absolute;
  left: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  background: #ffffff;
  border: 2px solid #789383;
  border-radius: 50%;
  transition: transform 160ms ease;
}

.switch-input:checked + .switch-label::before {
  background: #174f2d;
  border-color: #0e351d;
}

.switch-input:checked + .switch-label::after {
  transform: translateX(1.25rem);
  border-color: #0e351d;
}

.switch-input:focus-visible + .switch-label::before {
  outline: 3px solid #d97706;
  outline-offset: 3px;
}

.switch-input:disabled + .switch-label {
  cursor: not-allowed;
}

.switch-input:disabled + .switch-label::before,
.switch-input:disabled + .switch-label::after {
  opacity: 0.55;
}

@media (min-width: 44rem) {
  .form-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-row.full {
    grid-column: 1 / -1;
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
