html {
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fffdf6;
  color: #16130f;
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.45;
}

main {
  max-width: 28rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

h1,
p,
fieldset,
legend,
label {
  margin: 0;
}

h1 {
  margin-top: 0.35rem;
  font-size: 2.25rem;
  line-height: 1.1;
}

.lede,
.hint,
.brand-note,
.reason,
.fit {
  margin-top: 0.75rem;
}

fieldset {
  margin-top: 1.25rem;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.choices {
  display: grid;
  gap: 0.6rem;
}

.choices-half {
  grid-template-columns: 1fr 1fr;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.55rem 0.85rem;
  border: 2px solid #16130f;
  border-radius: 0.75rem;
  background: #ffffff;
  font-size: 1.125rem;
}

.choice input {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  accent-color: #102e28;
  flex: 0 0 auto;
}

.choice:has(input:checked) {
  background: #102e28;
  color: #ffffff;
  accent-color: #f5c518;
}

.field {
  margin-top: 1.25rem;
}

.field label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.125rem;
  font-weight: 700;
}

input[type="text"] {
  width: 100%;
  min-height: 3.5rem;
  padding: 0.55rem 0.85rem;
  border: 2px solid #16130f;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #16130f;
  font: inherit;
  font-size: 1.5rem;
}

button {
  width: 100%;
  min-height: 3.75rem;
  margin-top: 1.35rem;
  padding: 0.75rem 1rem;
  border: 3px solid #16130f;
  border-radius: 0.85rem;
  background: #102e28;
  color: #ffffff;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  touch-action: manipulation;
}

button:active {
  transform: translateY(1px);
}

#result {
  margin-top: 1.25rem;
}

#result:not(:empty) {
  padding: 1rem;
  border: 3px solid #16130f;
  border-radius: 0.85rem;
  background: #ffffff;
}

.eyebrow {
  font-size: 1rem;
  font-weight: 700;
}

.size {
  margin-top: 0.15rem;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.units {
  margin-top: 0.2rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.error {
  font-size: 1.125rem;
  font-weight: 700;
}

.fit {
  padding-top: 0.75rem;
  border-top: 2px solid #16130f;
}

:focus-visible {
  outline: 3px solid #102e28;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}
