:root {
  --navy: #16265a;
  --blue: #3156b3;
  --blue-2: #4d70d0;
  --ink: #18223f;
  --muted: #667085;
  --line: #dfe5f1;
  --soft: #f4f7fd;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(25, 43, 95, .13);
  --radius: 28px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #edf2fb;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 4%, rgba(87, 119, 217, .18), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(255, 255, 255, .95), transparent 31%),
    linear-gradient(180deg, #eef3fb 0%, #f8faff 100%);
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.topbar {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 18px auto 0;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(211, 220, 240, .9);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(29, 47, 105, .08);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.35rem;
}

.brand img {
  width: 44px;
  height: 34px;
  object-fit: contain;
}

.top-link {
  color: var(--navy);
  text-decoration: none;
  font-weight: 800;
  font-size: .95rem;
}

.top-link:hover, .top-link:focus-visible { color: var(--blue); }

.page-shell {
  width: min(980px, calc(100% - 28px));
  margin: 52px auto 28px;
}

.app-card {
  position: relative;
  min-height: 610px;
  padding: clamp(24px, 4.5vw, 54px);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(213, 222, 241, .95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.app-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  right: -95px;
  top: -105px;
  background: rgba(77, 112, 208, .1);
  pointer-events: none;
}

.loading, .noscript {
  padding: 22px;
  border-radius: 18px;
  background: #fff4dd;
  border: 1px solid #f1d18e;
  font-weight: 750;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 8px 13px;
  border-radius: 999px;
  background: #eef3ff;
  border: 1px solid #d9e3ff;
  color: var(--navy);
  font-size: .84rem;
  font-weight: 900;
  letter-spacing: .02em;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-2);
  box-shadow: 0 0 0 5px rgba(77,112,208,.12);
}

h1, h2, h3 { margin-top: 0; color: var(--navy); line-height: 1.08; }

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(2.65rem, 7vw, 5.2rem);
  letter-spacing: -.055em;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -.04em;
}

h3 { font-size: 1.35rem; }

.lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.24rem);
  line-height: 1.65;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  gap: 42px;
}

.hero-horse {
  position: relative;
  min-height: 290px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: linear-gradient(180deg, #f8faff 0%, #eef3ff 100%);
  border: 1px solid #dfe6f7;
  overflow: hidden;
}

.hero-horse::before, .hero-horse::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(96, 127, 218, .13);
}
.hero-horse::before { left: -45px; top: -45px; }
.hero-horse::after { right: -38px; bottom: -38px; }
.hero-horse img {
  position: relative;
  z-index: 1;
  width: min(112%, 390px);
  max-height: 265px;
  object-fit: contain;
  transform: translateX(-4%);
  filter: drop-shadow(0 18px 24px rgba(24,38,91,.16));
}

.start-points {
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}
.start-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #34405f;
  font-weight: 700;
}
.start-points li::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: .82rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  min-height: 52px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #274498, #3c62c7);
  box-shadow: 0 14px 28px rgba(39,68,152,.23);
}
.btn-secondary {
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(25,43,95,.06);
}
.btn-link {
  min-height: auto;
  padding: 9px 4px;
  color: var(--muted);
  background: transparent;
}
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.progress-wrap { margin-bottom: 30px; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
}
.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf7;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3156b3, #6f8de6);
  transition: width .25s ease;
}

.question-help {
  margin: 0 0 25px;
  color: var(--muted);
  line-height: 1.55;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.option {
  position: relative;
  min-height: 72px;
  padding: 17px 50px 17px 18px;
  display: flex;
  align-items: center;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid #dfe5f1;
  border-radius: 17px;
  box-shadow: 0 8px 22px rgba(25,43,95,.045);
  font-weight: 800;
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.option:hover, .option:focus-visible {
  transform: translateY(-2px);
  border-color: #9db0e8;
  box-shadow: 0 12px 26px rgba(25,43,95,.09);
}
.option::after {
  content: "";
  position: absolute;
  right: 18px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 2px solid #c4cce0;
}
.option.selected {
  color: var(--navy);
  background: #f0f4ff;
  border-color: #6684dc;
  box-shadow: 0 12px 28px rgba(49,86,179,.12);
}
.option.selected::after {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 5px #f0f4ff;
  background: var(--blue);
}

.result-badge {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #fff;
  font-size: .84rem;
  font-weight: 900;
}

.result-panel {
  margin-top: 27px;
  padding: 24px;
  border: 1px solid #dfe5f1;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #f7f9fd);
}
.result-panel p { margin: 0; color: #46516d; line-height: 1.65; }
.result-panel p + p { margin-top: 14px; }
.result-panel strong { color: var(--navy); }

.understood {
  margin-top: 22px;
  padding: 18px 20px;
  border-left: 5px solid var(--blue);
  border-radius: 0 15px 15px 0;
  background: #f0f4ff;
  color: #394766;
  line-height: 1.6;
}

.alternative {
  margin-top: 18px;
  padding: 17px 19px;
  border-radius: 16px;
  background: #fff9e9;
  border: 1px solid #efdcaa;
  color: #594a27;
  line-height: 1.55;
}

.score-details {
  margin-top: 22px;
  border: 1px solid #e1e6f1;
  border-radius: 16px;
  overflow: hidden;
}
.score-details summary {
  padding: 14px 17px;
  cursor: pointer;
  font-weight: 850;
  background: #f8faff;
}
.score-list { padding: 15px 17px 18px; display: grid; gap: 11px; }
.score-row { display: grid; grid-template-columns: minmax(150px, .7fr) 1.5fr 38px; gap: 12px; align-items: center; font-size: .9rem; }
.score-bar { height: 8px; background: #e7ebf4; border-radius: 999px; overflow: hidden; }
.score-bar span { display: block; height: 100%; border-radius: inherit; background: #6e88d6; }

.contact-box {
  margin-top: 34px;
  padding: 25px;
  border-radius: 22px;
  background: #f4f7fd;
  border: 1px solid #dfe6f5;
}
.contact-box h3 { margin-bottom: 8px; }
.contact-intro { margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #34405f; font-size: .88rem; font-weight: 850; }
.field input, .field textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #ccd5e8;
  border-radius: 12px;
  outline: none;
}
.field input:focus, .field textarea:focus { border-color: #6684dc; box-shadow: 0 0 0 4px rgba(102,132,220,.13); }
.field textarea { min-height: 100px; resize: vertical; }
.privacy-note { margin: 13px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }

.footer {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 10px 38px;
  color: #6d768d;
  text-align: center;
  font-size: .82rem;
  line-height: 1.5;
}
.footer p { margin: 5px 0; }

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 12px 17px;
  color: #fff;
  background: #18223f;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0,0,0,.2);
  font-weight: 800;
}

@media (max-width: 760px) {
  .page-shell { margin-top: 28px; }
  .app-card { min-height: 0; padding: 25px 19px; border-radius: 23px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-horse { min-height: 220px; order: -1; }
  .hero-horse img { max-height: 205px; }
  .options { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .score-row { grid-template-columns: 120px 1fr 32px; gap: 8px; }
}

@media (max-width: 520px) {
  .topbar { width: calc(100% - 18px); margin-top: 9px; padding: 10px 12px; border-radius: 17px; }
  .brand { font-size: 1.14rem; }
  .brand img { width: 38px; height: 30px; }
  .top-link { font-size: .79rem; }
  h1 { font-size: clamp(2.3rem, 13vw, 3.3rem); }
  h2 { font-size: 2.15rem; }
  .actions { align-items: stretch; }
  .actions .btn { width: 100%; }
  .option { min-height: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
