.dn-test-modal[hidden], .dn-test-screen[hidden], .dn-test-invite[hidden] { display: none; }
.dn-test-open { overflow: hidden; }
.dn-test-modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 12, 10, .72);
  font-family: var(--dn-font-ui, Arial, sans-serif);
}
.dn-test-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(860px, calc(100dvh - 40px));
  overflow: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .35);
  overscroll-behavior: contain;
}
.dn-test-close {
  position: sticky;
  z-index: 2;
  top: 14px;
  float: right;
  width: 44px;
  height: 44px;
  margin: 14px 14px -58px 0;
  border: 1px solid rgba(23, 23, 23, .16);
  border-radius: 999px;
  background: #fff;
  color: #171717;
  font: 400 29px/1 Arial, sans-serif;
  cursor: pointer;
}
.dn-test-screen { clear: both; padding: clamp(58px, 9vw, 88px) clamp(24px, 7vw, 64px) clamp(34px, 7vw, 62px); text-align: center; }
.dn-test-eyebrow { margin: 0 0 18px; color: #bd1710; font-size: 12px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.dn-test-screen h2 { margin: 0 auto 22px; color: #171717; font: 800 clamp(34px, 6.2vw, 58px)/.98 var(--dn-font-ui, Arial, sans-serif); letter-spacing: -.045em; }
.dn-test-screen h2 em { color: #bd1710; font-style: normal; }
.dn-test-screen > p:not(.dn-test-eyebrow):not(.dn-test-progress) { max-width: 590px; margin: 0 auto 25px; color: #4f4b47; font-size: clamp(16px, 2.4vw, 20px); line-height: 1.62; white-space: pre-line; }
.dn-test-button, .dn-test-answer {
  min-height: 52px;
  border: 0;
  border-radius: 5px;
  padding: 15px 28px;
  background: #bd1710;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
  cursor: pointer;
}
.dn-test-button--wide { width: 100%; display: block; }
.dn-test-progress { margin: 0 0 24px; color: #817b75; font-size: 12px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.dn-test-question { max-width: 600px; min-height: 150px; display: grid; place-items: center; }
.dn-test-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.dn-test-answer:last-child { border: 1px solid #bd1710; background: #fff; color: #bd1710; }
.dn-test-previous { margin: 20px auto 0; border: 0; background: none; color: #625e59; font-size: 12px; font-weight: 800; text-decoration: underline; cursor: pointer; }
.dn-test-result-box { margin: 0 0 28px; padding: clamp(24px, 5vw, 42px); border-radius: 12px; background: #f0efed; text-align: left; }
.dn-test-result-box h2 { margin-bottom: 18px; font-size: clamp(27px, 4.8vw, 44px); }
.dn-test-result-box p { margin: 0; color: #403c39; font-size: 17px; line-height: 1.62; white-space: pre-line; }
.dn-test-promo { text-align: left; }
.dn-test-promo p { margin: 0 0 17px; color: #302d2a; font-size: 16px; line-height: 1.6; }
.dn-nav__test { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 800; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.dn-test-link { margin-top: 14px; border: 0; background: transparent; color: #bd1710; font: 800 13px/1.3 var(--dn-font-ui, Arial, sans-serif); text-decoration: underline; cursor: pointer; }

.dn-test-invite {
  position: fixed;
  z-index: 10000;
  top: 86px;
  right: 22px;
  bottom: auto;
  width: min(370px, calc(100vw - 44px));
  padding: 20px 54px 19px 21px;
  border: 1px solid rgba(23, 23, 23, .11);
  border-left: 4px solid #bd1710;
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 20px 54px rgba(34, 23, 13, .22);
  color: #211f1d;
  font-family: var(--dn-font-ui, Arial, sans-serif);
}

.dn-test-invite > span {
  display: block;
  color: #bd1710;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.dn-test-invite > strong {
  margin-top: 7px;
  display: block;
  font-size: 16px;
  line-height: 1.38;
}

.dn-test-invite > strong em {
  color: #bd1710;
  font-style: normal;
}

.dn-test-invite > button:last-child {
  margin-top: 12px;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 2px solid currentColor;
  background: transparent;
  color: #bd1710;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}

.dn-test-invite__close {
  position: absolute;
  top: 11px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #f2f2f2;
  color: #5b554f;
  font: 400 22px/1 Arial, sans-serif;
  cursor: pointer;
}

.dn-test-invite button:focus-visible {
  outline: 3px solid #bd1710;
  outline-offset: 3px;
}
@media (max-width: 620px) {
  .dn-test-modal { padding: 18px; place-items: center; }
  .dn-test-panel { width: min(360px, 100%); max-height: min(78dvh, 680px); border-radius: 18px; }
  .dn-test-screen { padding: 64px 21px 30px; }
  .dn-test-screen h2 { font-size: clamp(29px, 10vw, 42px); }
  .dn-test-question { min-height: 180px; font-size: 30px !important; }
  .dn-test-answers { grid-template-columns: 1fr; }
  .dn-test-invite {
    right: auto;
    left: 50%;
    top: calc(72px + env(safe-area-inset-top));
    bottom: auto;
    width: min(330px, calc(100vw - 28px));
    padding: 17px 48px 16px 18px;
    border-radius: 12px;
    transform: translateX(-50%);
  }
  .dn-test-invite > strong { font-size: 15px; line-height: 1.3; }
}
@media (prefers-reduced-motion: reduce) {
  .dn-test-modal *, .dn-test-modal *::before, .dn-test-modal *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
