:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #172033;
  background: #f3f6fa;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 40px 20px;
  display: grid;
  place-items: center;
  background: #f3f6fa;
}

.tool-card {
  width: min(100%, 620px);
  padding: 40px;
  border: 1px solid #dce3ed;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgb(28 45 75 / 10%);
}

header {
  margin-bottom: 32px;
}

.eyebrow,
.result-label {
  margin: 0 0 8px;
  color: #315ca8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 7vw, 2.8rem);
  line-height: 1.08;
}

.intro {
  margin-bottom: 0;
  color: #566177;
  line-height: 1.6;
}

.form-instruction {
  margin-bottom: 20px;
  color: #3f4960;
  font-size: 0.95rem;
  line-height: 1.5;
}

.field,
fieldset {
  margin: 0 0 24px;
}

label,
legend {
  font-weight: 700;
}

input[type="text"] {
  width: 100%;
  margin-top: 10px;
  padding: 13px 14px;
  border: 1px solid #aeb8c8;
  border-radius: 8px;
  color: inherit;
  font: inherit;
}

input[type="text"]:focus,
input[type="radio"]:focus-visible,
button:focus-visible {
  outline: 3px solid #9dbcf3;
  outline-offset: 2px;
}

fieldset {
  padding: 0;
  border: 0;
}

.choices {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.choice {
  flex: 1;
  padding: 13px 16px;
  border: 1px solid #cbd3df;
  border-radius: 8px;
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: #315ca8;
  background: #edf3ff;
}

input[type="radio"] {
  margin: 0 8px 0 0;
  accent-color: #315ca8;
}

button {
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.primary-button {
  color: #ffffff;
  background: #6d28d9;
  box-shadow: 0 8px 18px rgb(109 40 217 / 24%);
}

.primary-button:hover {
  background: #5b21b6;
  box-shadow: 0 10px 22px rgb(109 40 217 / 32%);
  transform: translateY(-1px);
}

.result {
  margin-top: 28px;
  padding: 24px;
  border-left: 5px solid #315ca8;
  border-radius: 8px;
  background: #edf3ff;
}

.result h2 {
  margin-bottom: 8px;
  font-size: 1.8rem;
}

.result p:not(.result-label) {
  margin-bottom: 20px;
  line-height: 1.5;
}

.secondary-button {
  border: 1px solid #0e7490;
  color: #ffffff;
  background: #0e7490;
  box-shadow: 0 6px 14px rgb(14 116 144 / 22%);
}

.secondary-button:hover {
  background: #155e75;
  box-shadow: 0 8px 18px rgb(14 116 144 / 30%);
  transform: translateY(-1px);
}

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

  .tool-card {
    padding: 26px 20px;
  }

  .choices {
    flex-direction: column;
  }
}
