.viante-element-test {
  --test-ink: #19372f;
  --test-cream: #f4efe4;
  --test-paper: #fffdf8;
  --test-gold: #d8ad63;
  --test-line: rgba(25, 55, 47, 0.2);
  background: var(--test-cream);
  color: var(--test-ink);
  scroll-margin-top: 96px;
}

.viante-element-test,
.viante-element-test * {
  box-sizing: border-box;
}

.viante-element-test__shell {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(34px, 5vw, 84px);
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(72px, 8vw, 118px) 0;
}

.viante-element-test__intro {
  align-self: start;
  position: sticky;
  top: 126px;
  max-width: 390px;
}

.viante-element-test__eyebrow {
  margin: 0 0 16px;
  color: #9a7135;
  font: 700 12px/1.2 Inter, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.viante-element-test__intro h2 {
  margin: 0 0 22px;
  color: var(--test-ink);
  font: 500 clamp(38px, 4vw, 58px)/0.98 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.025em;
}

.viante-element-test__intro > p:not(.viante-element-test__eyebrow) {
  margin: 0 0 18px;
  font: 400 17px/1.7 Inter, sans-serif;
}

.viante-element-test__note {
  padding: 18px 0 0;
  border-top: 1px solid var(--test-line);
  color: rgba(25, 55, 47, 0.75);
  font-size: 14px !important;
}

.viante-element-test__panel {
  min-width: 0;
  padding: clamp(28px, 4vw, 54px);
  border: 1px solid var(--test-line);
  background: var(--test-paper);
  scroll-margin-top: 110px;
  box-shadow: 0 24px 60px rgba(25, 55, 47, 0.08);
}

.viante-element-test__progress {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: clamp(32px, 4vw, 52px);
  color: rgba(25, 55, 47, 0.68);
  font: 700 12px/1.2 Inter, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.viante-element-test__progress-track {
  flex: 1;
  height: 3px;
  overflow: hidden;
  background: rgba(25, 55, 47, 0.12);
}

.viante-element-test__progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--test-gold);
  transition: width 240ms ease;
}

.viante-element-test fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.viante-element-test legend {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  color: var(--test-ink);
  font: 500 clamp(30px, 3vw, 43px)/1.08 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.018em;
}

.viante-element-test__hint {
  margin: 14px 0 26px;
  color: rgba(25, 55, 47, 0.68);
  font: 400 14px/1.5 Inter, sans-serif;
}

.viante-element-test__answers {
  display: grid;
  gap: 10px;
}

.viante-element-test__answer {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 64px;
  margin: 0;
  padding: 15px 18px;
  border: 1px solid var(--test-line);
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.viante-element-test__answer:hover {
  border-color: rgba(25, 55, 47, 0.48);
  transform: translateY(-1px);
}

.viante-element-test__answer.is-selected {
  border-color: var(--test-ink);
  background: rgba(216, 173, 99, 0.12);
}

.viante-element-test__answer input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.viante-element-test__marker {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(25, 55, 47, 0.44);
  border-radius: 50%;
}

.viante-element-test__answer.is-selected .viante-element-test__marker::after {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--test-ink);
  content: "";
}

.viante-element-test__answer:has(input:focus-visible) {
  outline: 3px solid rgba(216, 173, 99, 0.55);
  outline-offset: 2px;
}

.viante-element-test__answer-copy {
  color: var(--test-ink);
  font: 500 15px/1.5 Inter, sans-serif;
}

.viante-element-test__actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
}

.viante-element-test__actions button {
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid var(--test-ink);
  border-radius: 0;
  font: 700 12px/1 Inter, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.viante-element-test__back {
  color: var(--test-ink);
  background: transparent;
}

.viante-element-test__next {
  margin-left: auto;
  color: var(--test-gold);
  background: var(--test-ink);
}

.viante-element-test__actions button:focus-visible {
  outline: 3px solid rgba(216, 173, 99, 0.65);
  outline-offset: 3px;
}

.viante-element-test__actions button:disabled {
  border-color: rgba(25, 55, 47, 0.2);
  color: rgba(25, 55, 47, 0.42);
  background: rgba(25, 55, 47, 0.06);
  cursor: not-allowed;
}

.viante-element-test__next.is-loading {
  min-width: 188px;
}

.viante-element-test__noscript {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 48px;
}

.viante-element-test .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

@media (max-width: 820px) {
  .viante-element-test {
    scroll-margin-top: 80px;
  }

  .viante-element-test__shell {
    grid-template-columns: 1fr;
    width: min(100% - 36px, 680px);
    padding: 64px 0;
  }

  .viante-element-test__intro {
    position: static;
    max-width: 600px;
  }
}

@media (max-width: 520px) {
  .viante-element-test__shell {
    width: 100%;
    gap: 30px;
    padding: 50px 18px;
  }

  .viante-element-test__intro h2 {
    font-size: 40px;
  }

  .viante-element-test__intro > p:not(.viante-element-test__eyebrow) {
    font-size: 16px;
  }

  .viante-element-test__panel {
    padding: 25px 18px 22px;
    scroll-margin-top: 88px;
  }

  .viante-element-test legend {
    font-size: 31px;
  }

  .viante-element-test__progress {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
  }

  .viante-element-test__progress-track {
    flex: none;
    width: 100%;
  }

  .viante-element-test__answer {
    min-height: 66px;
    padding: 14px;
  }

  .viante-element-test__actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .viante-element-test__actions button {
    width: 100%;
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .viante-element-test *,
  .viante-element-test *::before,
  .viante-element-test *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
