@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Inter-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/Inter-SemiBold.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Inter-Bold.woff2") format("woff2");
}

:root {
  --navy: #1e3a5f;
  --berry: #7a3e8e;
  --deep-berry: #63306f;
  --berry-mist: #f3ecf6;
  --cream: #f7f5f0;
  --ink: #1f2937;
  --slate: #4a5568;
  --grey: #e5e7eb;
  --white: #ffffff;
  --focus: #1e3a5f;
  --min-tap: 44px;
  --radius: 8px;
}

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

html {
  font-size: 100%;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
}

.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 1rem 1.25rem;
}

.site-header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card--mist {
  background: var(--berry-mist);
}

h2 {
  font-size: 1.5rem;
  color: var(--navy);
  margin: 0 0 1rem;
}

.start-text p {
  margin: 0 0 1rem;
  color: var(--slate);
}

.consent {
  margin: 1.25rem 0;
}

.consent label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  cursor: pointer;
  min-height: var(--min-tap);
}

.consent input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--min-tap);
  min-width: var(--min-tap);
  padding: 0.625rem 1.25rem;
  font-size: 1.125rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--berry);
  color: var(--white);
  border-color: var(--berry);
}

.btn-primary:not(:disabled):hover {
  background: var(--deep-berry);
  border-color: var(--deep-berry);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}

.btn-ghost {
  background: transparent;
  color: var(--slate);
  border-color: var(--grey);
}

.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.survey-progress {
  font-size: 1rem;
  color: var(--slate);
  margin-bottom: 1rem;
}

.survey-preamble {
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 1rem;
}

.question-prompt {
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0 0 1.25rem;
}

.tick-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.tick-list li {
  margin-bottom: 0.5rem;
}

.tick-list label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-height: var(--min-tap);
  padding: 0.35rem 0;
  cursor: pointer;
}

.tick-list input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.tick-limit-msg {
  color: var(--deep-berry);
  margin: 0 0 1rem;
  font-weight: 600;
}

.field-label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.field-with-mic {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.field-with-mic__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.field-with-mic input[type="text"],
.field-with-mic textarea {
  flex: 1 1 12rem;
  min-width: 0;
  width: 100%;
  font-size: 1.125rem;
  font-family: inherit;
  padding: 0.75rem;
  border: 1px solid var(--grey);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
}

.field-with-mic textarea {
  min-height: 7rem;
  resize: vertical;
}

.btn-mic {
  flex: 0 0 auto;
  min-height: var(--min-tap);
  padding: 0.5rem 1rem;
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-mic[aria-pressed="true"] {
  background: var(--deep-berry);
  border-color: var(--deep-berry);
}

@media (prefers-reduced-motion: no-preference) {
  .btn-mic[aria-pressed="true"] {
    animation: mic-pulse 1.5s ease-in-out infinite;
  }
}

@keyframes mic-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.75;
  }
}

.mic-status {
  font-size: 1rem;
  color: var(--slate);
  min-height: 1.5rem;
}

.mic-status[data-state="listening"] {
  color: var(--deep-berry);
  font-weight: 600;
}

.speech-fallback {
  font-size: 1rem;
  color: var(--slate);
  margin: 0 0 1rem;
}

.survey-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.survey-nav .btn-skip {
  margin-left: auto;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.error-banner {
  background: var(--berry-mist);
  color: var(--deep-berry);
  border: 1px solid var(--grey);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.contact-check label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-height: var(--min-tap);
  margin-bottom: 0.75rem;
  cursor: pointer;
}

@media (min-width: 600px) {
  .field-with-mic__row {
    flex-wrap: nowrap;
  }

  .btn-mic {
    max-width: 14rem;
  }
}
