:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #5d6d65;
  --line: #d9e1dc;
  --brand: #123d32;
  --brand-strong: #0d5947;
  --accent: #b55331;
  --accent-soft: #fff3ed;
  --surface: #ffffff;
  --background: #f4f6f4;
  --success: #1d6b45;
  --danger: #a23b2a;
  --focus: #19a276;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(25, 162, 118, 0.3);
  outline-offset: 3px;
}

.brand-bar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.brand-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(960px, calc(100% - 32px));
  min-height: 66px;
  margin: 0 auto;
  gap: 20px;
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--brand);
}

.brand-lockup strong {
  font-size: 25px;
  line-height: 1;
}

.brand-lockup span {
  border-left: 1px solid #9fb1a8;
  padding-left: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.brand-context {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.page-shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.survey-panel {
  min-height: min(680px, calc(100vh - 142px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(26, 54, 43, 0.08);
}

.survey-progress {
  height: 6px;
  background: #e2e8e4;
}

.survey-progress span {
  display: block;
  height: 100%;
  background: var(--brand-strong);
  transition: width 180ms ease-out;
}

.stage {
  padding: clamp(24px, 6vw, 56px);
}

.stage--welcome {
  padding-top: clamp(28px, 5vw, 46px);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: clamp(28px, 6vw, 64px);
}

.intro-photo {
  width: 220px;
  aspect-ratio: 1;
  border: 1px solid #cdd9d3;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 670px;
  margin: 0 0 18px;
  font-size: 50px;
  line-height: 1.05;
}

h2 {
  max-width: 760px;
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.15;
}

h3 {
  margin: 30px 0 12px;
  font-size: 22px;
  line-height: 1.25;
}

p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.58;
}

.intro-copy {
  max-width: 690px;
}

.survey-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 24px 0 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

.survey-facts span {
  position: relative;
  padding-left: 15px;
}

.survey-facts span::before {
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  transform: translateY(-50%);
}

.optional-note,
.autosave-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.step-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.required-label {
  color: var(--accent);
}

.option-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.option-card {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 15px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 690;
  line-height: 1.35;
  text-align: left;
  transition: border-color 120ms ease-out, background 120ms ease-out, color 120ms ease-out;
}

.option-card:hover {
  border-color: #8dad9e;
  background: #f7faf8;
}

.option-card[aria-pressed="true"] {
  border-color: var(--brand-strong);
  background: #eaf4ef;
  color: #0b493a;
  box-shadow: inset 4px 0 0 var(--brand-strong);
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid #bdcbc4;
  border-radius: 6px;
  padding: 12px 13px;
  background: #fff;
  color: var(--ink);
}

.field input {
  min-height: 48px;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.5;
}

.field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.confidence-wrap {
  margin: 34px 0 8px;
}

.confidence-value {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin: 0 auto 28px;
  border: 3px solid var(--brand-strong);
  border-radius: 50%;
  color: var(--brand);
  font-size: 42px;
  font-weight: 850;
}

.confidence-slider {
  width: 100%;
  height: 44px;
  accent-color: var(--brand-strong);
  cursor: pointer;
}

.confidence-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.voice-counter {
  text-align: right;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.button--primary {
  background: var(--brand-strong);
  color: #fff;
}

.button--primary:hover {
  background: var(--brand);
}

.button--secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.button--secondary:hover {
  background: #f5f7f5;
}

.button[disabled] {
  cursor: wait;
  opacity: 0.65;
}

.error-message {
  margin-top: 18px;
  border-left: 4px solid var(--danger);
  padding: 10px 12px;
  background: #fff3f0;
  color: #7c2d22;
  font-size: 14px;
  font-weight: 720;
}

.midpoint-mark,
.success-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: #e6f3ed;
  color: var(--success);
  font-size: 30px;
  font-weight: 850;
}

.midpoint-copy,
.success-copy {
  max-width: 680px;
}

.success-status {
  display: inline-flex;
  align-items: center;
  margin: 12px 0 6px;
  border: 1px solid #b9d8c8;
  border-radius: 6px;
  padding: 9px 12px;
  background: #eef8f2;
  color: var(--success);
  font-size: 14px;
  font-weight: 800;
}

.sync-note {
  max-width: 680px;
  margin-top: 14px;
  border-left: 4px solid #d09a35;
  padding: 10px 12px;
  background: #fff8e8;
  color: #6f541e;
  font-size: 14px;
  line-height: 1.5;
}

.sending {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
}

.sending::before {
  width: 18px;
  height: 18px;
  border: 2px solid #c7d7cf;
  border-top-color: var(--brand-strong);
  border-radius: 50%;
  content: "";
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 680px) {
  .brand-bar__inner {
    min-height: 58px;
  }

  .brand-lockup span {
    display: none;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .survey-panel {
    min-height: calc(100vh - 58px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .stage {
    padding: 26px 20px 34px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .intro-photo {
    grid-row: 1;
    width: 132px;
    justify-self: start;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 20px;
  }

  p {
    font-size: 17px;
  }

  .confidence-ends span {
    max-width: 120px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .button {
    width: 100%;
  }
}

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