:root {
  --blue: #1a73e8;
  --blue-dark: #1557b0;
  --green: #34a853;
  --yellow: #fbbc04;
  --red: #ea4335;
  --ink: #202124;
  --muted: #667085;
  --line: #dfe3eb;
  --surface: #ffffff;
  --page: #f7f9fc;
  --soft-blue: #eef4ff;
  --shadow: 0 24px 70px rgba(32, 53, 90, .11);
  --page-pad: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button, a { color: inherit; }
[hidden] { display: none !important; }

.quiz-shell {
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 8% 92%, rgba(52,168,83,.07), transparent 23rem),
    radial-gradient(circle at 93% 18%, rgba(26,115,232,.09), transparent 26rem),
    var(--page);
}

.site-header {
  position: relative;
  z-index: 5;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px var(--page-pad);
  border-bottom: 1px solid rgba(32,33,36,.08);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand__mark { width: 34px; height: 34px; flex: 0 0 34px; }
.brand__text { font-size: 20px; font-weight: 500; letter-spacing: -.04em; }
.brand__text strong { color: var(--blue); font-weight: 750; }
.header-step { color: var(--muted); font-size: 14px; }
.header-step strong { color: var(--ink); }

.progress { position: relative; z-index: 5; height: 4px; background: #e8edf5; }
.progress__fill { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--blue), #5f95eb); transition: width 240ms ease; }

.view {
  width: 100%;
  flex: 1;
  padding: clamp(38px, 7vh, 84px) var(--page-pad) clamp(120px, 15vh, 160px);
  animation: view-in 220ms ease both;
}
.intro-view, .success-view { display: grid; align-items: center; padding-bottom: clamp(38px, 7vh, 84px); }
.intro-view {
  background-image: url('images/hero-gads-background.webp');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.intro-layout {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: block;
}
.intro-copy { max-width: 620px; }
.eyebrow, .question-kicker {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .095em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 24px; height: 3px; border-radius: 10px; background: linear-gradient(90deg, var(--blue) 0 50%, var(--green) 50%); }
h1, h2 { margin: 0; letter-spacing: -.045em; }
.intro-copy h1 { max-width: 720px; font-size: clamp(43px, 5vw, 72px); line-height: 1.03; font-weight: 780; }
.intro-lead { max-width: 650px; margin: 27px 0 32px; color: var(--muted); font-size: clamp(18px, 1.7vw, 23px); line-height: 1.55; }
.independent-note { margin: 18px 0 0; color: #858c99; font-size: 12px; line-height: 1.5; }

.primary-button, .secondary-button, .back-button {
  min-height: 54px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms ease;
}
.primary-button {
  min-width: 174px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 24px;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(26,115,232,.22);
  color: #fff;
  font-size: 16px;
}
.primary-button svg, .back-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.primary-button:hover:not(:disabled) { background: var(--blue-dark); box-shadow: 0 13px 30px rgba(26,115,232,.3); transform: translateY(-1px); }
.primary-button:active:not(:disabled), .secondary-button:active, .back-button:active { transform: translateY(1px); }
.primary-button:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.primary-button--hero { min-height: 58px; padding-inline: 29px; }
.secondary-button { padding: 13px 20px; border: 1px solid var(--line); background: #fff; color: var(--blue); }
.primary-button:focus-visible, .secondary-button:focus-visible, .back-button:focus-visible, .option:focus-visible, input:focus-visible { outline: 3px solid rgba(26,115,232,.25); outline-offset: 3px; }

.intro-visual { position: relative; min-height: 440px; display: grid; place-items: center; }
.visual-card { position: absolute; width: min(100%, 420px); aspect-ratio: 1.15; border-radius: 24px; }
.visual-card--back { transform: rotate(7deg) translate(22px, 7px); background: linear-gradient(145deg, #dceaff, #edf4ff); border: 1px solid #c8dbfa; }
.visual-card--front { padding: 31px; transform: rotate(-2deg); background: #fff; border: 1px solid #e1e6ee; box-shadow: var(--shadow); }
.visual-card__top { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; }
.visual-card__logo { position: relative; width: 27px; height: 26px; display: block; }
.visual-card__logo i { position: absolute; display: block; border-radius: 8px; }
.visual-card__logo i:nth-child(1) { width: 7px; height: 25px; left: 14px; top: 0; transform: rotate(-30deg); background: var(--blue); }
.visual-card__logo i:nth-child(2) { width: 7px; height: 21px; left: 6px; top: 5px; transform: rotate(30deg); background: var(--green); }
.visual-card__logo i:nth-child(3) { width: 9px; height: 9px; left: 0; bottom: 0; border-radius: 50%; background: var(--yellow); }
.visual-chart { height: 142px; display: flex; align-items: end; gap: 15px; margin: 33px 0 25px; padding: 20px 22px 0; border-bottom: 1px solid #e6eaf0; background: repeating-linear-gradient(to bottom, transparent 0 36px, #f0f2f6 37px); }
.visual-chart span { flex: 1; min-height: 20px; border-radius: 7px 7px 0 0; background: var(--blue); }
.visual-chart span:nth-child(1) { height: 28%; opacity: .42; }.visual-chart span:nth-child(2) { height: 41%; opacity: .55; }.visual-chart span:nth-child(3) { height: 54%; opacity: .68; }.visual-chart span:nth-child(4) { height: 72%; opacity: .82; }.visual-chart span:nth-child(5) { height: 92%; }
.visual-metric { display: flex; justify-content: space-between; gap: 16px; align-items: end; padding-bottom: 23px; border-bottom: 1px solid #edf0f4; }
.visual-metric small { color: var(--muted); }.visual-metric strong { color: var(--blue); }
.visual-status { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: #4f5968; font-size: 13px; font-weight: 650; }
.visual-status span { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(52,168,83,.12); }
.visual-dot { position: absolute; width: 17px; height: 17px; border-radius: 50%; box-shadow: 0 6px 14px rgba(32,33,36,.13); }.visual-dot--red { top: 32px; right: 25px; background: var(--red); }.visual-dot--yellow { bottom: 36px; left: 10px; background: var(--yellow); }.visual-dot--green { bottom: 4px; right: 100px; width: 11px; height: 11px; background: var(--green); }

.question-wrap, .contact-card { width: min(100%, 760px); margin: 0 auto; }
.question-wrap h2, .contact-card h2 { max-width: 720px; font-size: clamp(30px, 4vw, 48px); line-height: 1.12; }
.question-help, .contact-copy { margin: 16px 0 29px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.options { display: grid; gap: 13px; margin-top: 30px; }
.option {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 15px;
  padding: 14px 19px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.9);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 14px rgba(34,49,75,.035);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.option:hover { border-color: #9ebce9; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(26,115,232,.08); }
.option.is-selected { border-color: var(--blue); background: var(--soft-blue); box-shadow: 0 0 0 3px rgba(26,115,232,.09); }
.option__index { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: #f0f3f8; color: #657084; font-size: 13px; font-weight: 750; transition: .14s ease; }
.option.is-selected .option__index { background: var(--blue); color: #fff; }
.option__text { min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.4; }
.option__control { width: 21px; height: 21px; border: 2px solid #bdc5d1; border-radius: 50%; box-shadow: inset 0 0 0 4px #fff; background: #fff; }
.option.is-selected .option__control { border-color: var(--blue); background: var(--blue); }
.field-error, .submit-status { min-height: 19px; margin: 14px 0 0; color: #c5221f; font-size: 13px; line-height: 1.45; }

.contact-card { max-width: 650px; padding: clamp(27px, 5vw, 47px); border: 1px solid #e1e6ee; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.contact-card__icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 25px; border-radius: 14px; background: var(--soft-blue); color: var(--blue); }
.contact-card__icon svg { width: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-field { display: block; margin-top: 28px; }
.contact-field > span { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.contact-field input { width: 100%; height: 58px; padding: 0 17px; border: 1.5px solid var(--line); border-radius: 11px; background: #fbfcfe; color: var(--ink); font-size: 16px; outline: none; }
.contact-field input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(26,115,232,.09); }
.contact-field input::placeholder { color: #9aa2af; }
.consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 17px; color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1.45; }
.consent input { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; accent-color: var(--blue); }
.submit-status { color: #7a5b00; }

.success-card { width: min(100%, 610px); margin: 0 auto; padding: clamp(35px, 6vw, 60px); border: 1px solid #e1e6ee; border-radius: 22px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.success-icon { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 26px; border-radius: 50%; background: #eaf6ee; color: var(--green); }
.success-icon svg { width: 38px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.success-card .eyebrow { justify-content: center; }
.success-card h2 { font-size: clamp(32px, 4vw, 48px); }
.success-card > p:not(.eyebrow) { margin: 18px auto 28px; color: var(--muted); line-height: 1.6; }

.quiz-nav {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px max(var(--page-pad), env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(var(--page-pad), env(safe-area-inset-left));
  border-top: 1px solid rgba(32,33,36,.09);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(15px);
}
.back-button { min-width: 112px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 14px 18px; background: transparent; color: var(--muted); }
.back-button:hover { background: #f0f3f7; color: var(--ink); }

@media (max-width: 800px) {
  .site-header { min-height: 68px; }
  .intro-view {
    align-items: start;
    padding-bottom: 420px;
    background-size: auto 430px;
    background-position: 68% bottom;
  }
  .intro-layout { text-align: center; }
  .intro-copy { display: flex; flex-direction: column; align-items: center; }
  .intro-copy h1 { font-size: clamp(38px, 10vw, 58px); }
}

@media (max-width: 560px) {
  :root { --page-pad: 18px; }
  .site-header { padding-top: max(12px, env(safe-area-inset-top)); }
  .brand__mark { width: 29px; height: 29px; flex-basis: 29px; }
  .brand__text { font-size: 17px; }
  .header-step { font-size: 12px; }
  .view { padding-top: 33px; padding-bottom: 108px; }
  .intro-view {
    padding-top: 30px;
    padding-bottom: 320px;
    background-size: auto 330px;
    background-position: 67% bottom;
  }
  .intro-copy h1 { font-size: clamp(36px, 10vw, 46px); }
  .intro-lead { margin: 20px 0 25px; font-size: 17px; }
  .primary-button--hero { width: 100%; }
  .question-wrap h2, .contact-card h2 { font-size: 29px; }
  .question-help { margin-bottom: 23px; font-size: 14px; }
  .options { gap: 10px; margin-top: 23px; }
  .option { min-height: 64px; grid-template-columns: 34px minmax(0, 1fr) 20px; gap: 11px; padding: 12px 13px; border-radius: 11px; }
  .option__index { width: 32px; height: 32px; }
  .option__text { font-size: 14px; }
  .option__control { width: 19px; height: 19px; }
  .contact-card { padding: 25px 20px; border-radius: 16px; }
  .contact-copy { font-size: 14px; }
  .quiz-nav { min-height: 76px; gap: 8px; padding-top: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .quiz-nav .primary-button { min-width: 0; flex: 1 1 190px; min-height: 52px; }
  .back-button { min-width: 90px; padding-inline: 12px; }
}

@media (max-height: 680px) and (min-width: 801px) {
  .view { padding-top: 34px; }
  .intro-visual { min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
