:root {
  color-scheme: light;
  --primary: #6d8dec;
  --primary-dark: #4f6fd0;
  --bg: #f7f8fa;
  --text: #1f2328;
  --muted: #667085;
  --line: #d9dee8;
  --surface: #ffffff;
  --focus: rgba(109, 141, 236, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(247, 248, 250, 0.95) 48%, #f7f8fa 100%),
    url("https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?auto=format&fit=crop&w=1400&q=70") center 18% / cover no-repeat;
  opacity: 0.16;
}

.page {
  width: min(100%, 700px);
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.hero {
  min-height: 78vh;
  display: grid;
  align-content: center;
  gap: 28px;
  padding: 32px 0 20px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 800;
}

h2 {
  font-size: clamp(24px, 6vw, 32px);
  line-height: 1.3;
  letter-spacing: 0;
  font-weight: 800;
}

h3 {
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: 0;
  font-weight: 800;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
}

.section {
  margin-top: 24px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 40px rgba(31, 35, 40, 0.06);
}

.section + .section {
  margin-top: 18px;
}

.stack {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  gap: 20px;
  margin-top: 22px;
}

.field {
  display: grid;
  gap: 8px;
}

label,
legend {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

select,
input[type="email"],
input[type="text"] {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

select:focus,
input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus);
}

fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.radio-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.radio-option {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.radio-option:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus);
}

.radio-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.button {
  display: inline-flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  background: var(--primary-dark);
  box-shadow: 0 10px 24px rgba(109, 141, 236, 0.28);
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.secondary-button {
  background: #252a31;
}

.secondary-button:hover {
  background: #111418;
  box-shadow: 0 10px 24px rgba(31, 35, 40, 0.18);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 14px;
}

.metric {
  min-height: 118px;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.metric-label {
  display: block;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.metric-value {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(19px, 5vw, 28px);
  font-weight: 800;
  line-height: 1.2;
}

.note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.small-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.prompt {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(109, 141, 236, 0.34);
  border-radius: 8px;
  background: rgba(109, 141, 236, 0.08);
  color: #334a91;
  font-size: 14px;
  font-weight: 700;
}

.is-visible {
  display: block;
}

.hidden {
  display: none;
}

.fade-in {
  animation: fade-in 360ms ease both;
}

.status {
  min-height: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .page {
    padding: 16px 16px 36px;
  }

  .hero {
    min-height: 74vh;
    padding-top: 24px;
  }

  .section {
    margin-right: -16px;
    margin-left: -16px;
    padding: 24px 16px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .radio-row,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 96px;
  }

  .metric-label {
    min-height: auto;
  }
}
