:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f1ea;
  color: #16231d;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(680px, 100%);
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid #c9c1b2;
  border-radius: 24px;
  background: #fffdf8;
  box-shadow: 0 20px 60px rgb(22 35 29 / 10%);
}

.eyebrow {
  color: #376a50;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0.35em 0;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1;
}

p {
  line-height: 1.6;
}

.panel--narrow {
  width: min(520px, 100%);
}

.muted {
  color: #5d665f;
}

form,
label {
  display: grid;
  gap: 8px;
}

form {
  gap: 18px;
}

input,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #8c958f;
  border-radius: 10px;
  font: inherit;
}

textarea {
  resize: vertical;
}

button {
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid #214c38;
  border-radius: 999px;
  background: #214c38;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid #214c38;
  border-radius: 999px;
  background: #214c38;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.button-secondary {
  background: transparent;
  color: #214c38;
}

.notice {
  padding: 12px 14px;
  border-left: 4px solid #a13c2f;
  background: #fff0ed;
}

.health-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #d5cec1;
  border-radius: 14px;
  background: #d5cec1;
}

.health-list div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 16px;
  background: #fffdf8;
}

.health-list dt {
  font-weight: 700;
}

.health-list dd {
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.profile-panel {
  width: min(760px, 100%);
}

.question-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.question-heading h1 {
  flex: 1;
}

.help-trigger {
  flex: 0 0 auto;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.15rem;
}

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

.information-bubble[hidden] {
  display: none;
}

.information-bubble {
  position: relative;
  margin: 8px 0 24px;
  padding: 22px;
  border: 2px solid #376a50;
  border-radius: 14px;
  background: #edf5ef;
}

.information-bubble h2 {
  margin: 0 90px 8px 0;
  font-size: 1.15rem;
}

.information-bubble p {
  margin: 0;
}

.information-bubble__close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 38px;
  padding: 6px 12px;
  background: transparent;
  color: #214c38;
}

.answer-list {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.answer-list legend {
  margin-bottom: 12px;
  font-weight: 700;
}

.answer-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid #8c958f;
  border-radius: 14px;
  background: #fffdf8;
  cursor: pointer;
}

.answer-card:hover {
  border-color: #214c38;
  background: #f4f8f5;
}

.answer-card input[type="radio"] {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #214c38;
}

.radio-choice {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radio-choice input[type="radio"] {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  accent-color: #214c38;
}

.answer-card strong,
.answer-card small {
  display: block;
}

.answer-card small {
  margin-top: 4px;
  color: #5d665f;
  line-height: 1.45;
}

.custom-language-fields {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid #d5cec1;
  border-radius: 14px;
  background: #faf7f0;
}

.field-note {
  margin: 0;
  font-size: 0.92rem;
}

.result-actions {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.text-action {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #214c38;
  text-align: left;
  text-decoration: underline;
}

.profile-metrics,
.language-labels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 28px 0;
  border: 1px solid #d5cec1;
  border-radius: 14px;
  background: #d5cec1;
}

.profile-metrics div,
.language-labels div {
  padding: 16px;
  background: #fffdf8;
}

.profile-metrics dt,
.language-labels dt {
  color: #5d665f;
  font-size: 0.85rem;
  font-weight: 700;
}

.profile-metrics dd,
.language-labels dd {
  margin: 6px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.answer-reasons {
  display: grid;
  gap: 12px;
}

.answer-reason {
  padding: 16px;
  border-left: 4px solid #376a50;
  background: #f4f8f5;
}

.answer-reason h3,
.answer-reason p {
  margin: 0;
}

.answer-reason h3 {
  font-size: 1rem;
}

.answer-reason p {
  margin-top: 6px;
}

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

.saved-action {
  padding: 18px;
  border-left: 4px solid #376a50;
  background: #f4f8f5;
}

.proof-choices {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.proof-choices legend {
  margin-bottom: 12px;
  font-weight: 700;
}

.proof-choice {
  display: grid;
  gap: 8px;
  padding: 15px 16px;
  border: 1px solid #8c958f;
  border-radius: 14px;
  background: #fffdf8;
  cursor: pointer;
}

.proof-choice__percent {
  display: flex;
  align-items: center;
  gap: 10px;
}

.proof-choice__prompt {
  display: none;
}

.proof-choice:has(input:checked) .proof-choice__prompt {
  display: block;
}

.proof-choice input[type="radio"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  accent-color: #214c38;
}

@media (max-width: 520px) {
  body {
    padding: 12px;
  }

  .panel {
    padding: 26px 20px;
    border-radius: 18px;
  }

  .question-heading h1 {
    font-size: clamp(1.9rem, 10vw, 3rem);
  }

  .profile-metrics,
  .language-labels {
    grid-template-columns: 1fr;
  }

  .information-bubble {
    padding: 18px;
  }
}
