:root {
  --page: #f6e7da;
  --ink: #00566f;
  --panel: rgba(236, 177, 166, 0.8);
  --accent: #e38b52;
  --white: #ffffff;
  font-family: "Lora", Georgia, serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--page);
}

body {
  min-height: 100vh;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

#root {
  display: flex;
  min-height: max(720px, 100vh);
}

.quiz-shell {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-height: max(720px, 100vh);
  padding: 16px;
}

.quiz-header {
  display: flex;
  flex: 0 0 100px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100px;
}

.header-side {
  display: flex;
  width: 50px;
  height: 34px;
  align-items: flex-start;
}

.header-side:last-child {
  justify-content: flex-end;
}

.brand {
  height: 100px;
  padding: 0 12px;
}

.brand img {
  display: block;
  width: auto;
  height: 100px;
}

.back-button {
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 5px;
  color: var(--ink);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.1);
  border: 0;
  border-radius: 6px;
  transition: background-color 120ms ease;
}

.back-button:hover {
  background: rgba(0, 0, 0, 0.16);
}

.back-button:focus-visible,
.choice:focus-visible,
.primary-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.quiz-stage {
  display: flex;
  flex: 1;
  align-items: safe center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  margin-bottom: 9px;
}

.quiz-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(600px, 100%);
  padding: 40px;
  color: var(--ink);
  background: var(--panel);
  border: 0;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.1) 0 10px 24px 10px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 170ms ease, transform 170ms ease;
}

.quiz-card.is-leaving {
  pointer-events: none;
  opacity: 0;
  transform: translateY(-5px);
}

.quiz-card.is-entering {
  opacity: 0;
  transform: translateY(5px);
}

.intro-title,
.intro-copy,
.contact-intro,
.result-kicker,
.result-copy,
.result-note {
  margin: 0;
  color: var(--ink);
  text-align: center;
}

.intro-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}

.intro-copy {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.intro-copy + .intro-copy {
  width: calc(100% - 80px);
  margin: 3px auto 0;
}

.intro-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.question-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question-label,
.field-label {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 6px 12px;
  color: rgba(0, 86, 111, 0.8);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  user-select: none;
  background: var(--page);
  border: 1px solid #ebebeb;
  border-radius: 6px;
  transition: 50ms ease-out;
}

.choice:hover {
  color: var(--page);
  background: var(--accent);
  border-color: var(--accent);
}

.choice.is-selected {
  padding: 6px 12px;
  color: var(--page);
  background: var(--ink);
  border: 0 solid var(--ink);
  box-shadow: rgba(0, 0, 0, 0.5) 0 0 0 2px inset;
}

.contact-intro {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-shell {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  padding: 10px 12px;
  color: rgba(0, 86, 111, 0.8);
  background: var(--page);
  border: 1px solid #ebebeb;
  border-radius: 6px;
}

.field-shell:focus-within {
  color: var(--ink);
  border-color: var(--ink);
}

.field-shell input {
  flex: 1;
  width: 100%;
  padding: 0;
  color: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  background: transparent;
  border: 0;
  outline: 0;
}

.field-shell input::placeholder {
  color: rgba(0, 86, 111, 0.55);
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 6px;
  box-shadow: rgba(0, 0, 0, 0.2) 1px 4px 20px 2px;
  transition: filter 120ms ease, transform 120ms ease;
}

.primary-button:hover {
  filter: brightness(1.08);
}

.primary-button:active {
  transform: translateY(1px);
}

.result-card {
  text-align: center;
}

.result-kicker {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.result-title {
  margin: 0;
  color: var(--ink);
  font-size: 45px;
  font-weight: 500;
  line-height: 58px;
  text-align: center;
}

.result-copy {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.result-note {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
}

.result-note + .result-note {
  margin-top: -3px;
}

footer {
  flex: 0 0 107px;
  width: 100%;
  height: 107px;
}

@media (max-width: 680px) {
  #root,
  .quiz-shell {
    min-height: 100vh;
  }

  .quiz-shell {
    padding: 12px;
  }

  .quiz-header {
    flex-basis: 82px;
    height: 82px;
  }

  .brand,
  .brand img {
    height: 78px;
  }

  .header-side {
    width: 38px;
  }

  .quiz-stage {
    align-items: center;
    margin: 10px 0 16px;
  }

  .quiz-card {
    padding: 30px 24px;
  }

  .intro-block {
    margin-bottom: 22px;
  }

  .intro-copy + .intro-copy {
    width: 100%;
  }

  footer {
    flex-basis: 91px;
    height: 91px;
  }

}

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