:root {
  --color-primary-500: #2196f3;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-grey-50: #f6f6f4;
  --color-grey-100: #d9e0e3;
  --color-grey-300: #90a4ae;
  --color-grey-600: #546e7a;
  --color-grey-700: #455a64;
  --background-base: #ffffff;

  --font-heading: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-base: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 4px;
  --radius-lg: 12px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f5f5f7;
  font-family: var(--font-base);
  color: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-nav {
  position: fixed;
  top: 18px;
  left: 20px;
  z-index: 10;
}

.flow-nav a {
  color: var(--color-grey-600);
  text-decoration: none;
  font-size: 0.75rem;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

.flow-nav a:hover {
  opacity: 1;
}

.screen {
  max-width: 390px;
  width: 100%;
  height: calc(100vh - 80px);
  background: var(--background-base);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  border-radius: 32px;
}

/* Scrollable content area — everything above the pinned footer nav */
.screen-content {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: center;
}

.screen--pad-lg {
  padding: 80px 16px 16px;
}

.screen--pad-md {
  padding: 40px 16px 16px;
}

/* Intro/start screen — heading and action grouped together, centered in the frame */
.screen-content--centered {
  justify-content: center;
  align-items: center;
}

/* Equalize top/bottom padding so justify-content:center centers on the true
   frame midpoint instead of being pulled down by the larger top padding */
.screen-content--centered.screen--pad-lg {
  padding-top: 16px;
}

.screen-content--centered.screen--pad-md {
  padding-top: 16px;
}

.intro-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  width: 100%;
  text-align: center;
}

.intro-text-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
}

.intro-block .heading-lg {
  max-width: 320px;
  font-weight: 600;
  line-height: 36px;
}

.intro-text-group .body-md {
  max-width: 300px;
  color: var(--color-grey-600);
}

.intro-block .btn-primary {
  width: auto;
  padding: 16px 40px;
}

/* Question heading on step 2 — smaller and matching the intro screen's weight */
.question-text-group .heading-lg {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
}

/* Pinned to the bottom of the frame — stays in view while .screen-content scrolls */
.screen-footer {
  flex-shrink: 0;
  width: 100%;
  padding: 12px 16px 24px;
  background: var(--background-base);
}

/* Typography */
.heading-lg {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 32px;
  line-height: 40px;
  color: var(--color-black);
  margin: 0;
}

.heading-md {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  color: var(--color-black);
  margin: 0;
}

.heading-sm {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
  color: var(--color-black);
  margin: 0;
}

.body-md {
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--color-black);
  margin: 0;
}

.body-lg {
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 20px;
  line-height: 28px;
  margin: 0;
}

.body-sm {
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-grey-700);
  margin: 0;
}

.body-xs {
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  margin: 0;
}

.text-link {
  color: var(--color-primary-500);
  text-decoration: underline;
  font-weight: 500;
}

.text-link:hover {
  color: #1c86e0;
}

/* Layout containers */
.question-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  width: 100%;
}

.question-container--tight {
  gap: var(--space-7);
}

.content-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  width: 100%;
}

.content-container--loose {
  gap: var(--space-6);
}

.question-text-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
}

.description-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

/* Buttons */
.btn {
  font-family: var(--font-base);
  font-weight: 600;
  font-size: 18px;
  line-height: 18px;
  letter-spacing: 0.002em;
  border: 1px solid var(--color-primary-500);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}

.btn-primary {
  background: var(--color-primary-500);
  color: var(--color-white);
  padding: 16px 12px;
  width: 100%;
  text-align: center;
}

.btn-primary:hover {
  background: #1c86e0;
  border-color: #1c86e0;
}

.nav-row {
  display: flex;
  gap: var(--space-1);
  width: 100%;
  align-items: stretch;
}

.btn-back {
  background: var(--color-primary-500);
  border: 1px solid var(--color-primary-500);
  border-radius: var(--radius-lg);
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-back:hover {
  background: #1c86e0;
  border-color: #1c86e0;
}

.btn-back img {
  width: 24px;
  height: 24px;
}

.nav-row .btn-primary {
  flex: 1 0 0;
  width: auto;
}

/* Inputs */
.text-input {
  width: 100%;
  border: 1.5px solid var(--color-grey-100);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  font-family: var(--font-base);
  font-size: 20px;
  line-height: 28px;
  color: var(--color-grey-600);
  background: var(--color-white);
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.text-input:focus {
  outline: none;
  border-color: var(--color-primary-500);
  color: var(--color-black);
  background: var(--color-white);
  box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.15);
}

.textarea-field {
  width: 100%;
  height: 200px;
  border: 1.5px solid var(--color-grey-100);
  border-radius: var(--radius-lg);
  padding: 14px;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-black);
  background: var(--color-white);
  resize: none;
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.textarea-field:focus-within {
  border-color: var(--color-primary-500);
  background: var(--color-white);
  box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.15);
}

.textarea-field textarea {
  border: none;
  outline: none;
  resize: none;
  flex: 1;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-black);
  background: transparent;
  text-align: left;
  padding: 0;
}

.textarea-field textarea::placeholder {
  color: var(--color-grey-600);
}

.char-count {
  font-family: var(--font-base);
  font-size: 12px;
  line-height: 16px;
  color: var(--color-black);
  text-align: right;
}

/* Info cards */
.info-card {
  border: 1px solid var(--color-grey-100);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  background: var(--color-white);
  text-align: left;
}

.info-card a {
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-black);
  text-decoration: underline;
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

/* Rating scale */
.rating-row {
  display: flex;
  gap: var(--space-2);
  width: 100%;
  height: 80px;
}

.rating-option {
  flex: 1 0 0;
  height: 80px;
  border: 1px solid var(--color-grey-300);
  border-radius: 8px;
  background: var(--color-white);
  font-family: var(--font-base);
  font-weight: 500;
  font-size: 16px;
  color: var(--color-black);
  cursor: pointer;
}

.rating-option:hover {
  border-color: var(--color-primary-500);
}

.rating-option.is-selected {
  border-color: var(--color-primary-500);
  border-width: 2px;
  background: #e3f2fd;
}

.rating-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

/* Category grid (thank-you screen) */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  width: 100%;
}

.category-card {
  border: 1px solid var(--color-grey-100);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  padding: 16px 12px;
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--color-primary-500);
}

.category-card img {
  width: 20px;
  height: 20px;
}

.category-card span {
  font-family: var(--font-base);
  font-weight: 600;
  font-size: 16px;
  line-height: 16px;
  color: var(--color-black);
  text-align: center;
}

/* Track 2 — intro checklist, each item its own info block, no bullets.
   Flat grey fill + small radius + no border, matching the read-only
   "echo-box" visual language rather than the bordered/radius-lg look
   used by buttons and selectable cards — so these don't read as clickable. */
.checklist {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: left;
}

.checklist-item {
  margin: 0;
  width: 100%;
  padding: 12px 16px;
  background: var(--color-grey-50);
  border-radius: var(--radius-sm);
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-black);
}

/* Track 2 — echoes the user's previous answer back to them, read-only */
.echo-box {
  width: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--color-grey-50);
  border: 1px solid var(--color-grey-100);
  border-radius: var(--radius-lg);
  text-align: left;
}

.echo-box-label {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 700;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-black);
}

.echo-box-text {
  margin: 0;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-grey-600);
}
