:root {
  --text: #171634;
  --canvas: #f4f4ff;
  --deep: #4338ca;
  --deeper: #312e81;
  --hot: #f43f5e;
  --hot-dark: #e11d48;
  --card: #ffffff;
  --tint: #eceaff;
  --edge: #d7d4f5;
  --dim: #6d6a93;
  --r: 6px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--canvas);
}

button,
input {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header,
.footer,
.main {
  width: min(1080px, 100%);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.header {
  background: var(--deeper);
  color: #fff;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__logo {
  width: 38px;
  height: 38px;
}

.brand__title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.brand__sub {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.header__aside {
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--r);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.footer {
  margin-top: auto;
  background: var(--deeper);
  color: rgba(255, 255, 255, 0.8);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 32px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__logo {
  width: 30px;
  height: 30px;
}

.footer__copy {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
}

.footer__copy strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer__links a {
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 500;
}

.footer__links a:hover {
  border-bottom-color: var(--hot);
  color: #fff;
}

/* ---------- hero: full-width band on top, card centred below ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 32px;
}

.hero__visual {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__fade {
  display: none;
}

.hero__card {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 40px));
  margin-top: -72px;
  padding: 38px 36px;
  background: var(--card);
  border: 1px solid var(--edge);
  border-top: 5px solid var(--hot);
  border-radius: var(--r);
  box-shadow: 0 16px 40px rgba(49, 46, 129, 0.14);
}

.hero__intro {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero__lead,
.hero__body,
.hero__action {
  display: flex;
  flex-direction: column;
}

.hero__lead {
  gap: 12px;
}

.hero__eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--hot);
}

.hero__title {
  margin: 0;
  font-size: 33px;
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: -0.4px;
  color: var(--deeper);
}

.hero__body {
  gap: 14px;
  font-size: 16px;
  line-height: 1.6;
}

.hero__text {
  margin: 0;
  color: #3b3a5c;
}

.hero__note {
  margin: 0;
  padding: 12px 14px;
  background: var(--tint);
  border-radius: var(--r);
  font-size: 14.5px;
  color: var(--deeper);
}

.hero__action {
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: var(--deep);
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--hot);
}

.btn--start {
  height: 58px;
  border-radius: var(--r);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.hero__time {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--dim);
}

[hidden] {
  display: none !important;
}

#screen-quiz {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 20px 40px;
}

/* ---------- quiz ---------- */

.quiz {
  width: min(820px, 100%);
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  box-shadow: 0 14px 36px rgba(49, 46, 129, 0.1);
  overflow: hidden;
}

.quiz__bar {
  height: 4px;
  background: var(--hot);
}

.quiz__progress {
  padding: 22px 26px 0;
}

.quiz__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--dim);
}

.quiz__track {
  height: 4px;
  background: var(--tint);
  overflow: hidden;
}

.quiz__fill {
  height: 100%;
  width: 0;
  background: var(--deep);
  transition: width 0.22s linear;
}

.quiz__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 26px 30px;
}

.quiz__question {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--deeper);
}

.quiz__hint {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--dim);
}

/* відповіді з буквеними бейджами A/B/C/D */
.quiz__answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: option;
}

.answer {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 15px 18px;
  border: 1px solid var(--edge);
  border-left: 3px solid var(--edge);
  border-radius: var(--r);
  background: var(--card);
  color: var(--text);
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.answer::before {
  counter-increment: option;
  content: counter(option, upper-alpha);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r);
  background: var(--tint);
  color: var(--deep);
  font-size: 13px;
  font-weight: 700;
}

.answer:hover {
  border-color: var(--deep);
  border-left-color: var(--hot);
  background: #fafaff;
}

.answer.is-selected {
  border-color: var(--deep);
  border-left-color: var(--hot);
  background: var(--deep);
  color: #fff;
}

.answer.is-selected::before {
  background: var(--hot);
  color: #fff;
}

/* ---------- static pages ---------- */

.panel {
  width: 100%;
  margin: 32px 0;
  padding: 40px 38px;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: var(--r);
}

.thanks {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.thanks__icon {
  width: 96px;
  height: 96px;
}

.thanks__title {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  color: var(--deeper);
}

.thanks__intro {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thanks__subtitle {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--deep);
}

.thanks__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #3b3a5c;
}

.thanks__next {
  width: 100%;
  padding: 26px;
  border-left: 4px solid var(--deep);
  background: var(--tint);
}

.thanks__next h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--deeper);
}

.thanks__next ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.thanks__next li {
  font-size: 15.5px;
  line-height: 1.55;
}

.thanks__quote {
  width: 100%;
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--hot);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--deeper);
}

.doc__title {
  margin: 0 0 10px;
  font-size: 29px;
  font-weight: 700;
  color: var(--deeper);
}

.doc__date {
  margin: 0 0 24px;
  padding: 10px 14px;
  background: var(--tint);
  font-size: 13.5px;
  color: var(--dim);
}

.doc__sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.doc__sections section {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.doc__sections h2 {
  margin: 0;
  padding-left: 12px;
  border-left: 3px solid var(--hot);
  font-size: 19px;
  font-weight: 700;
  color: var(--deep);
}

.doc__sections p,
.doc__sections li {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
}

.doc__sections ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
}

.doc__sign {
  margin: 28px 0 0;
  padding: 14px 16px;
  background: var(--tint);
  font-size: 14.5px;
  color: var(--dim);
}

@media (max-width: 900px) {
  .hero__visual {
    height: 230px;
  }

  .hero__card {
    margin-top: -48px;
    padding: 28px 24px;
  }

  .hero__title {
    font-size: 27px;
  }
}

@media (max-width: 767px) {
  .header,
  .footer,
  .main {
    width: 100%;
  }

  .header__inner {
    padding: 14px 18px;
  }

  .header__aside {
    display: none;
  }

  .hero__visual {
    height: 170px;
  }

  .hero__card {
    width: calc(100% - 32px);
    margin-top: -36px;
    padding: 24px 18px;
  }

  .hero__title {
    font-size: 23px;
  }

  .hero__body {
    font-size: 15px;
  }

  #screen-quiz {
    align-items: stretch;
    padding: 22px 16px 26px;
  }

  .quiz__progress {
    padding: 18px 16px 0;
  }

  .quiz__body {
    padding: 20px 16px 24px;
  }

  .quiz__question {
    font-size: 18px;
  }

  .answer {
    font-size: 14.5px;
    padding: 14px 14px;
  }

  .footer__inner {
    flex-direction: column;
    gap: 18px;
    padding: 24px 18px;
    text-align: center;
  }

  .footer__brand {
    flex-direction: column;
  }

  .footer__links {
    flex-direction: column;
    gap: 10px;
  }

  .panel {
    margin: 22px 16px;
    padding: 24px 18px;
  }

  .thanks {
    align-items: center;
    text-align: center;
  }

  .thanks__next {
    padding: 18px 14px;
    text-align: left;
  }

  .doc__title {
    font-size: 23px;
  }

  .doc__sections h2 {
    font-size: 17px;
  }

  .doc__sections p,
  .doc__sections li,
  .thanks__text {
    font-size: 15px;
  }
}
