:root {
  --bg: #f7f9fb;
  --bg-alt: #eef3f6;
  --surface: #ffffff;
  --surface-muted: #f8fafb;
  --surface-selected: #eef4f8;
  --surface-output: #fbfdfe;
  --text: #22303a;
  --muted: #5f6d79;
  --muted-strong: #4a5863;
  --line: #d6dfe6;
  --line-strong: #b8c7d2;
  --accent: #3f627b;
  --accent-strong: #2f4d63;
  --accent-soft: #e5edf4;
  --highlight: #d7c46b;
  --success: #355f4b;
  --shadow: 0 4px 14px rgba(21, 37, 49, 0.06);
  --radius: 6px;
  --radius-small: 4px;
  --max-width: 960px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, #e9eff4 0, #e9eff4 68px, var(--bg) 68px, var(--bg) 100%);
}

body::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-strong), #648098);
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.page {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 2rem 0 2.25rem;
}

.hero {
  width: 100%;
  max-width: none;
  margin: 0 0 1rem;
  text-align: left;
  padding: 1.6rem 1.5rem 1.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  box-shadow: var(--shadow);
}

.step-label,
.result-kicker,
.site-footer {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 0.55rem;
  font-size: clamp(2.7rem, 7vw, 4rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.subtitle {
  max-width: none;
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: clamp(1.2rem, 2.8vw, 1.55rem);
  line-height: 1.35;
  font-weight: 500;
  text-align: left;
}

.about-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(180deg, #ffffff 0%, #eef3f7 100%);
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.about-link:hover,
.about-link:focus-visible {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fb 100%);
  border-color: var(--line-strong);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step-panel,
.result-panel,
.about-panel {
  padding: 1.25rem;
}

.step-panel + .step-panel,
.actions,
.result-panel,
.about-panel {
  margin-top: 0.9rem;
}

.step-panel {
  position: relative;
}

.step-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  border-radius: 6px 6px 0 0;
  background: #e6edf3;
}

.step-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.step-number {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-muted);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.step-label,
.result-kicker,
.site-footer p {
  margin-bottom: 0.28rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.step-heading h2,
.result-answer {
  margin-bottom: 0;
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 700;
}

.choice-grid {
  display: grid;
  gap: 0.7rem;
}

.data-types {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

.questions {
  grid-template-columns: 1fr;
}

.choice-card {
  position: relative;
  width: 100%;
  min-height: 4rem;
  padding: 0.9rem 1rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fa 100%);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.choice-card:hover {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, #ffffff 0%, #f2f7fa 100%);
  box-shadow: 0 2px 8px rgba(24, 39, 52, 0.04);
  transform: translateY(-1px);
}

.choice-card:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.about-link:focus-visible {
  outline: 3px solid rgba(54, 86, 111, 0.18);
  outline-offset: 2px;
}

.choice-card[aria-checked="true"] {
  border-color: var(--accent);
  background: linear-gradient(180deg, #f7fbfe 0%, #edf4f8 100%);
  box-shadow: inset 0 0 0 1px rgba(54, 86, 111, 0.08);
}

.choice-card[aria-checked="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 8px 0 0 8px;
  background: var(--accent);
}

.choice-card[aria-checked="true"]::after {
  content: "";
  position: absolute;
  top: 0.95rem;
  right: 0.95rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(109, 78, 87, 0.12);
}

.choice-title {
  display: block;
  max-width: calc(100% - 4.6rem);
  font-size: 0.96rem;
  line-height: 1.4;
  font-weight: 500;
}

.is-disabled {
  opacity: 0.55;
}

.is-disabled .choice-card {
  cursor: not-allowed;
}

.actions {
  display: flex;
  justify-content: flex-end;
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, #fbfdfe 0%, #f3f7fa 100%);
}

.primary-button,
.secondary-button {
  border-radius: 4px;
  padding: 0.8rem 1.15rem;
  font-size: 0.94rem;
  font-weight: 600;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    opacity 160ms ease;
}

.primary-button {
  min-width: 12.5rem;
  border: 1px solid var(--accent);
  background: linear-gradient(180deg, #4b6d86 0%, var(--accent) 100%);
  color: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.primary-button:hover:not(:disabled) {
  background: linear-gradient(180deg, #43647b 0%, var(--accent-strong) 100%);
  border-color: var(--accent-strong);
}

.primary-button:disabled {
  border-color: var(--line);
  background: #e8edf1;
  color: #7a8791;
  cursor: not-allowed;
  box-shadow: none;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #ffffff 0%, #eef3f7 100%);
  color: var(--accent-strong);
  padding: 1rem 1.4rem;
  min-width: 16rem;
  font-size: 1rem;
}

.secondary-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.result-panel {
  position: relative;
  padding-top: 1.4rem;
  background: linear-gradient(180deg, #fffef8 0%, #fff8e6 100%);
  border-color: #d9c98b;
  animation: fade-in 280ms ease;
}

.result-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 8px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(90deg, #d7c46b 0%, #f2e4a8 100%);
}

.result-panel::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(142, 126, 62, 0.18);
  border-radius: 4px;
  pointer-events: none;
}

.result-kicker {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid #decf90;
  border-radius: 999px;
  background: #fff8d9;
  border-color: #decf90;
  color: #6f5d1d;
}

.result-answer {
  position: relative;
  z-index: 1;
  max-width: 16ch;
  margin-bottom: 1.35rem;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.035em;
  color: #20313d;
}

.result-meta {
  display: none;
}

.about-panel {
  background: linear-gradient(180deg, #fbfdfe 0%, #f5f8fb 100%);
}

.about-copy {
  color: var(--muted-strong);
  font-size: 0.95rem;
  line-height: 1.62;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-copy a {
  color: var(--accent-strong);
  font-weight: 600;
}

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

.hidden {
  display: none;
}

.site-footer {
  padding: 0 1rem 1.6rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

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

@media (max-width: 720px) {
  .page {
    width: min(calc(100% - 1rem), var(--max-width));
    padding-top: 1.4rem;
  }

  .hero,
  .step-panel,
  .result-panel,
  .about-panel {
    padding: 1rem;
  }

  .step-heading {
    gap: 0.7rem;
  }

  .choice-title {
    max-width: 100%;
    padding-right: 4.1rem;
  }

  .actions {
    justify-content: stretch;
    padding: 0.8rem;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    min-width: 0;
  }

  .result-answer {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0ms !important;
  }
}
