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

@font-face {
  font-display: swap;
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  src: url("/fonts/poppins-latin-500-normal.woff2") format("woff2");
}

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

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

@font-face {
  font-display: swap;
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  src: url("/fonts/poppins-latin-800-normal.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  src: url("/fonts/open-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 600;
  src: url("/fonts/open-sans-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 700;
  src: url("/fonts/open-sans-latin-700-normal.woff2") format("woff2");
}

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

@font-face {
  font-display: swap;
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500;
  src: url("/fonts/montserrat-latin-500-normal.woff2") format("woff2");
}

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

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

@font-face {
  font-display: swap;
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 800;
  src: url("/fonts/montserrat-latin-800-normal.woff2") format("woff2");
}

/* ==========================================================================
   DOMUS MANAGED HOUSING - DESIGN TOKENS
   Core palette per Domus brand reference. Navy is the dominant structural
   colour; crimson is an accent only. Greys are navy tint stops (100/95/88/
   85/74/65/58) blended toward white - no off-palette greys anywhere.
   ========================================================================== */

:root {
  /* --- Core brand (exact, do not approximate) --- */
  --domus-navy: #182751;         /* Primary   - Deep Navy Blue */
  --domus-crimson: #d03d44;      /* Accent    - Crimson Red */
  --domus-white: #ffffff;

  /* --- Product accent palette --- */
  --domus-gold: #ffb71b;
  --domus-blue: #1d74b2;
  --domus-green: #24b570;
  --domus-purple: #762a83;

  /* --- Navy tint stops (brand-specified: 100/95/88/85/74/65/58) --- */
  --navy-95: #24325a;
  --navy-88: #344166;
  --navy-85: #3b476b;
  --navy-74: #545f7e;   /* 6.33:1 on white - safe for body text */
  --navy-65: #69738e;   /* 4.73:1 on white - safe for meta text >=12px */
  --navy-58: #79829a;   /* 3.84:1 - BORDERS AND DOTS ONLY, never text */

  /* --- Crimson tint stops --- */
  --crimson-88: #d6545a;
  --crimson-74: #dc6f75;
  --crimson-wash: #fbeff0;   /* crimson at ~8% over white */
  --crimson-edge: #eec3c5;

  /* --- Accessibility variant (see BRAND_IMPLEMENTATION.md) ---
     Brand crimson #d03d44 measures 4.74:1 on pure white but drops to
     4.46:1 on the tinted page background, failing WCAG AA. This darkened
     shade (5.91:1) is used ONLY for small text and error copy. Every fill,
     bar, dot, underline and button still uses brand crimson exactly. */
  --domus-crimson-text: #b8323a;

  /* Brand-scoped primitives. Domus owns the default so every existing public
     questionnaire renders exactly as before; recognised Strive forms replace
     them in the scoped block below. */
  --brand-ink-rgb: 24, 39, 81;
  --brand-accent-rgb: 208, 61, 68;
  --brand-secondary-rgb: 29, 116, 178;
  --display-font: "Poppins", Arial, sans-serif;
  --accent-soft: var(--crimson-74);
  --accent-wash: var(--crimson-wash);
  --accent-edge: var(--crimson-edge);
  --status-dot: var(--domus-green);

  /* --- Semantic roles --- */
  --ink: var(--domus-navy);        /* primary text */
  --ink-soft: var(--navy-74);      /* secondary / body text */
  --ink-faint: var(--navy-65);     /* smallest meta text, min 12px */
  --deep: var(--domus-navy);
  --accent: var(--domus-crimson);
  --accent-text: var(--domus-crimson-text);
  --cream: #f5f6f9;
  --paper: #ffffff;
  --surface: #f7f8fb;
  --line: rgba(var(--brand-ink-rgb), 0.16);
  --line-soft: rgba(var(--brand-ink-rgb), 0.1);
  --shadow: 0 30px 84px rgba(var(--brand-ink-rgb), 0.18);

  /* --- Type scale (accessible baseline: nothing below 12px) --- */
  --fs-meta: 12px;    /* uppercase micro-labels, legends */
  --fs-xs: 13px;      /* kickers, optional tags, fine print */
  --fs-sm: 15px;      /* helper text, choice labels, options */
  --fs-base: 16px;    /* body copy, inputs, buttons */
  --fs-lg: 17px;      /* lead paragraphs */
  --fs-title: 18px;   /* question titles */

  /* --- Focus ring --- */
  --focus-ring: 0 0 0 3px var(--paper), 0 0 0 6px var(--domus-crimson);
}

/* Legacy aliases retained so no rule silently loses its colour */
:root {
  --teal: var(--domus-crimson);
  --gold: var(--domus-gold);
  --blue: var(--domus-blue);
  --green: var(--domus-green);
  --purple: var(--domus-purple);
}

:root[data-brand="strive"] {
  --strive-primary: #618fb4;
  --strive-accent: #145a95;
  --strive-secondary: #1f466b;
  --brand-ink-rgb: 31, 70, 107;
  --brand-accent-rgb: 97, 143, 180;
  --brand-secondary-rgb: 20, 90, 149;
  --ink: var(--strive-secondary);
  --ink-soft: var(--strive-secondary);
  --ink-faint: var(--strive-secondary);
  --deep: var(--strive-secondary);
  --accent: var(--strive-primary);
  --accent-text: var(--strive-accent);
  --accent-soft: var(--strive-accent);
  --accent-wash: rgba(var(--brand-accent-rgb), 0.12);
  --accent-edge: rgba(var(--brand-secondary-rgb), 0.28);
  --line: rgba(var(--brand-ink-rgb), 0.16);
  --line-soft: rgba(var(--brand-ink-rgb), 0.1);
  --shadow: 0 30px 84px rgba(var(--brand-ink-rgb), 0.18);
  --focus-ring: 0 0 0 3px var(--paper), 0 0 0 6px var(--strive-accent);
  --teal: var(--strive-primary);
  --gold: var(--strive-accent);
  --blue: var(--strive-accent);
  --green: var(--strive-primary);
  --purple: var(--strive-secondary);
  --status-dot: var(--strive-accent);
  --display-font: "Gotham", "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: var(--fs-base);   /* 16px minimum stops iOS Safari zooming on focus */
}

/* Visible keyboard focus on every interactive element (was missing entirely) */
:where(a, button, input, textarea, select, [role="radio"], [role="checkbox"]):focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
  position: relative;
  z-index: 5;
}

button {
  color: inherit;
}

.shell {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 78% 4%, rgba(var(--brand-accent-rgb), 0.08), transparent 27%),
    radial-gradient(circle at 92% 78%, rgba(var(--brand-secondary-rgb), 0.08), transparent 32%),
    linear-gradient(130deg, #f8f9fb 0%, #ffffff 58%, #eef1f7 100%);
}

.gridTexture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(var(--brand-ink-rgb), 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--brand-ink-rgb), 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to right, black, transparent 75%);
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
  animation: floatAmbient 12s ease-in-out infinite;
}

.ambientOne {
  width: 360px;
  height: 360px;
  left: -170px;
  top: 19%;
  border: 1px solid rgba(var(--brand-accent-rgb), 0.18);
}

.ambientTwo {
  width: 580px;
  height: 580px;
  right: -350px;
  bottom: -170px;
  border: 1px solid rgba(var(--brand-ink-rgb), 0.16);
  animation-delay: -4s;
}

@keyframes floatAmbient {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -18px, 0);
  }
}

.brandBar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 86px;
  justify-content: space-between;
  left: 0;
  padding: 0 44px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.brandLockup {
  align-items: baseline;
  display: flex;
  gap: 15px;
}

.brandLockup > span {
  border-left: 1px solid rgba(var(--brand-ink-rgb), 0.2);
  color: var(--ink-soft);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.1em;
  padding-left: 15px;
  text-transform: uppercase;
}

.brandLogo {
  display: block;
  height: 68px;
  object-fit: contain;
  object-position: left center;
  width: 96px;
}

.previewFlag {
  align-items: center;
  background: rgba(var(--brand-ink-rgb), 0.055);
  border: 1px solid rgba(var(--brand-ink-rgb), 0.14);
  border-radius: 999px;
  color: var(--deep);
  display: flex;
  font-size: var(--fs-meta);
  font-weight: 700;
  gap: 8px;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  text-transform: uppercase;
}

.previewFlag::before {
  animation: blink 2.4s ease-in-out infinite;
  background: var(--teal);
  border-radius: 50%;
  content: "";
  height: 6px;
  width: 6px;
}

@keyframes blink {
  50% {
    box-shadow: 0 0 0 6px rgba(var(--brand-accent-rgb), 0.1);
  }
}

.journeyRail {
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid var(--line);
  bottom: 0;
  left: 0;
  padding: 120px 32px 34px 44px;
  position: fixed;
  top: 0;
  width: 285px;
  z-index: 10;
  backdrop-filter: blur(20px);
}

.railTitle span {
  color: var(--accent-text);
  display: block;
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.railTitle strong {
  font-family: var(--display-font);
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.railProgress {
  margin-top: 34px;
  padding-left: 1px;
  position: relative;
}

.railProgress::before,
.railProgressFill {
  border-radius: 20px;
  content: "";
  left: 17px;
  position: absolute;
  top: 17px;
  width: 2px;
}

.railProgress::before {
  background: rgba(var(--brand-ink-rgb), 0.12);
  bottom: 16px;
}

.railProgressFill {
  background: linear-gradient(var(--accent-soft), var(--accent));
  height: 0;
  max-height: calc(100% - 32px);
  transition: height 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.railProgressFill.progress0 { height: 0; }
.railProgressFill.progress10 { height: 10%; }
.railProgressFill.progress20 { height: 20%; }
.railProgressFill.progress30 { height: 30%; }
.railProgressFill.progress40 { height: 40%; }
.railProgressFill.progress50 { height: 50%; }
.railProgressFill.progress60 { height: 60%; }
.railProgressFill.progress70 { height: 70%; }
.railProgressFill.progress80 { height: 80%; }
.railProgressFill.progress90 { height: 90%; }
.railProgressFill.progress100 { height: 100%; }

.railStep {
  align-items: center;
  background: none;
  border: 0;
  display: flex;
  gap: 13px;
  min-height: 43px;
  padding: 0;
  position: relative;
  text-align: left;
  width: 100%;
  z-index: 1;
}

.railStep > span {
  align-items: center;
  background: var(--paper);
  border: 1px solid rgba(var(--brand-ink-rgb), 0.14);
  border-radius: 50%;
  color: var(--ink-faint);
  display: flex;
  font-size: var(--fs-meta);
  font-weight: 700;
  height: 34px;
  justify-content: center;
  letter-spacing: 0.02em;
  transition: 0.35s ease;
  width: 34px;
}

.railStep p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
  transition: 0.35s ease;
}

.railStep.active > span {
  background: var(--deep);
  border-color: var(--deep);
  box-shadow: 0 7px 18px rgba(var(--brand-ink-rgb), 0.22);
  color: white;
  transform: scale(1.08);
}

.railStep.active p {
  color: var(--ink);
  font-weight: 700;
  transform: translateX(3px);
}

.railStep.done {
  cursor: pointer;
}

.railStep.done > span {
  background: var(--accent-wash);
  border-color: var(--accent-edge);
  color: var(--accent-text);
}

.railFooter {
  border-top: 1px solid var(--line);
  bottom: 30px;
  display: flex;
  left: 44px;
  padding-top: 16px;
  position: absolute;
  right: 32px;
}

.railFooter span {
  font-family: var(--display-font);
  font-size: 22px;
  font-weight: 700;
}

.railFooter p {
  color: var(--ink-soft);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.09em;
  margin: 6px 0 0 7px;
  text-transform: uppercase;
}

.formColumn {
  margin-left: 285px;
  min-height: 100vh;
  padding: 112px clamp(36px, 7vw, 112px) 38px;
  position: relative;
  z-index: 2;
}

.welcomePanel,
.stagePanel {
  animation: enterStage 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
  margin: 0 auto;
  max-width: 920px;
}

@keyframes enterStage {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcomePanel {
  min-height: 580px;
  padding: 56px 49% 34px 0;
  position: relative;
}

.kicker {
  color: var(--accent-text);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.13em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.welcomePanel h1,
.stageIntro h1,
.successCard h1 {
  font-family: var(--display-font);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.welcomePanel h1 {
  font-size: clamp(50px, 5.8vw, 74px);
  line-height: 0.94;
  margin: 0;
  max-width: 580px;
}

.welcomeCopy {
  color: var(--ink-soft);
  font-size: var(--fs-lg);
  line-height: 1.75;
  margin: 22px 0 26px;
  max-width: 560px;
}

/* Questionnaires without a hero image use the whole welcome canvas. Keeping
   the two-column padding after removing the image made the copy look like a
   missing asset and pushed the primary action below a phone viewport. */
.welcomePanel.welcomePanelNoHero {
  min-height: auto;
  padding: 56px 0 34px;
}

.welcomePanelNoHero h1 {
  max-width: 860px;
}

.welcomePanelNoHero .welcomeCopy {
  max-width: 650px;
}

.emailField {
  display: block;
  max-width: 480px;
}

.emailField > span {
  color: var(--ink);
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.emailField input,
.textInput,
.textArea {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(var(--brand-ink-rgb), 0.28);
  border-radius: 10px;
  color: var(--ink);
  font-size: var(--fs-base);
  outline: none;
  transition: 0.25s ease;
  width: 100%;
}

.emailField input,
.textInput {
  min-height: 58px;
  padding: 0 18px;
}

.emailField input:focus,
.textInput:focus,
.textArea:focus {
  background: white;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--brand-accent-rgb), 0.18);
}

.emailField small {
  color: var(--ink-soft);
  display: block;
  font-size: var(--fs-xs);
  line-height: 1.55;
  margin-top: 10px;
}

.welcomeVisual {
  height: 500px;
  position: absolute;
  right: -10px;
  top: 40px;
  width: 47%;
}

.indigoPhotoFrame {
  background: var(--deep);
  border-radius: 32px 6px 32px 6px;
  box-shadow: var(--shadow);
  height: 458px;
  overflow: hidden;
  position: absolute;
  right: 18px;
  top: 10px;
  transform: rotate(1.5deg);
  width: calc(100% - 38px);
}

.indigoPhotoFrame::after {
  background: linear-gradient(180deg, transparent 42%, rgba(var(--brand-ink-rgb), 0.9) 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.indigoExterior {
  height: 100%;
  object-fit: cover;
  object-position: 50% center;
  transform: scale(1.035);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.welcomePanel:hover .indigoExterior {
  transform: scale(1.085);
}

.photoSweep {
  animation: photoSweep 5.5s ease-in-out infinite;
  background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, 0.23) 50%, transparent 58%);
  inset: 0;
  position: absolute;
  transform: translateX(-120%);
  z-index: 2;
}

@keyframes photoSweep {
  0%,
  55% {
    transform: translateX(-120%);
  }
  86%,
  100% {
    transform: translateX(120%);
  }
}

.indigoIdentity {
  bottom: 28px;
  color: white;
  display: flex;
  flex-direction: column;
  left: 28px;
  position: absolute;
  z-index: 3;
}

.indigoIdentity span {
  color: #f5c9cb;
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.indigoIdentity strong {
  font-family: var(--display-font);
  font-size: 29px;
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin-top: 3px;
}

.indigoIdentity small {
  font-size: var(--fs-xs);
  margin-top: 5px;
  opacity: 0.92;
}

.brandBlock {
  border-radius: 6px;
  height: 82px;
  position: absolute;
  width: 82px;
}

.brandBlockRed {
  animation: floatBlock 7s ease-in-out infinite;
  background: var(--teal);
  left: 0;
  top: 82px;
}

.brandBlockNavy {
  animation: floatBlock 7s ease-in-out -2.6s infinite;
  background: var(--deep);
  bottom: 2px;
  right: -1px;
}

@keyframes floatBlock {
  50% {
    transform: translateY(-13px) rotate(3deg);
  }
}

.stageIntro {
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 30px;
}

.stageIntro h1 {
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1;
  margin: 0;
}

.stageIntro > div:first-child > p:last-child {
  color: var(--ink-soft);
  font-size: var(--fs-base);
  line-height: 1.65;
  margin: 16px 0 0;
  max-width: 620px;
}

.kicker span {
  color: var(--ink-soft);
}

.stageNumber {
  color: rgba(var(--brand-ink-rgb), 0.1);
  font-family: var(--display-font);
  font-weight: 700;
  font-size: 96px;
  line-height: 0.7;
}

.questionStack {
  display: grid;
  gap: 18px;
}

.question {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(var(--brand-ink-rgb), 0.13);
  border-radius: 20px;
  box-shadow: 0 12px 35px rgba(var(--brand-ink-rgb), 0.045);
  padding: 26px 28px 28px;
  transition: 0.25s ease;
}

.question:focus-within {
  background: white;
  border-color: rgba(var(--brand-accent-rgb), 0.32);
  box-shadow: 0 16px 44px rgba(var(--brand-ink-rgb), 0.09);
}

.questionHeader {
  align-items: flex-start;
  display: flex;
  gap: 14px;
}

.questionNumber {
  align-items: center;
  background: var(--accent-wash);
  border-radius: 8px;
  color: var(--accent-text);
  display: flex;
  flex: 0 0 auto;
  font-size: var(--fs-meta);
  font-weight: 800;
  height: 28px;
  justify-content: center;
  letter-spacing: 0.02em;
  width: 34px;
}

.questionHeader h3 {
  font-family: var(--display-font);
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.45;
  margin: 1px 0 0;
}

.questionHeader p {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.6;
  margin: 8px 0 0;
  max-width: 62ch;
}

.optional {
  color: var(--ink-faint);
  font-size: var(--fs-xs);
  font-weight: 400;
  margin-left: 6px;
}

.questionControl {
  margin: 18px 0 0 48px;
}

.rating {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(56px, 1fr));
  max-width: 560px;
}

.ratingButton {
  aspect-ratio: 1.4 / 1;
  background: var(--surface);
  border: 1px solid rgba(var(--brand-ink-rgb), 0.18);
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
  font-size: var(--fs-base);
  font-weight: 700;
  min-height: 48px;
  position: relative;
  transition: 0.22s ease;
}

.ratingButton:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.ratingButton.selected {
  background: var(--deep);
  border-color: var(--deep);
  box-shadow: 0 8px 20px rgba(var(--brand-ink-rgb), 0.22);
  color: white;
  transform: translateY(-2px);
}

.ratingButton.selected::after {
  background: var(--gold);
  border-radius: 4px;
  bottom: 6px;
  content: "";
  height: 2px;
  left: 22%;
  position: absolute;
  right: 22%;
}

.scaleLegend {
  color: var(--ink-soft);
  display: flex;
  font-size: var(--fs-meta);
  font-weight: 600;
  justify-content: space-between;
  letter-spacing: 0.06em;
  margin-top: 10px;
  max-width: 560px;
  text-transform: uppercase;
}

.choiceRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice {
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(var(--brand-ink-rgb), 0.18);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: var(--fs-sm);
  font-weight: 600;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  transition: 0.22s ease;
}

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

.choiceDot {
  border: 2px solid var(--navy-58);
  border-radius: 50%;
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.choice.selected {
  background: var(--accent-wash);
  border-color: var(--accent);
  color: var(--deep);
  font-weight: 700;
}

.choice.selected .choiceDot {
  background: var(--accent);
  border: 4px solid var(--accent-wash);
  box-shadow: 0 0 0 2px var(--accent);
}

.nestedInput {
  margin-top: 13px;
  max-width: 420px;
}

.twoColumnQuestions {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.textArea {
  line-height: 1.7;
  min-height: 112px;
  padding: 14px 16px;
  resize: vertical;
}

.finalTextArea {
  min-height: 230px;
}

.matrix {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  overflow: hidden;
}

/* Scale legend shown once at the top of the matrix, so each button can
   carry just its number instead of "1 (Very Poor)" clipping on mobile. */
.matrixLegend {
  background: rgba(var(--brand-ink-rgb), 0.045);
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
  display: grid;
  font-size: var(--fs-meta);
  font-weight: 700;
  gap: 18px;
  grid-template-columns: minmax(130px, 1fr) minmax(250px, 1.4fr);
  letter-spacing: 0.06em;
  padding: 10px 16px;
  text-transform: uppercase;
}

.matrixLegend > span:first-child {
  color: var(--ink);
}

.matrixLegend > span:last-child {
  display: flex;
  justify-content: space-between;
}

.matrixRow {
  align-items: center;
  background: rgba(247, 248, 251, 0.72);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(130px, 1fr) minmax(250px, 1.4fr);
  padding: 12px 16px;
}

.matrixRow + .matrixRow {
  border-top: 1px solid rgba(var(--brand-ink-rgb), 0.08);
}

.matrixRow strong {
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.4;
}

.ratingCompact {
  gap: 5px;
  width: 100%;
}

.ratingCompact .ratingButton {
  aspect-ratio: auto;
  border-radius: 9px;
  font-size: var(--fs-base);
  height: auto;
  min-height: 44px;
  padding: 6px 4px;
}

.facilitiesFeature {
  background: var(--deep);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(var(--brand-ink-rgb), 0.16);
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(220px, 0.8fr);
  min-height: 240px;
  overflow: hidden;
}

.facilitiesFeature img {
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.facilitiesFeature:hover img {
  transform: scale(1.035);
}

.facilitiesFeature div {
  align-items: flex-start;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px 27px;
  position: relative;
}

.facilitiesFeature div::before {
  background: var(--teal);
  content: "";
  height: 54px;
  position: absolute;
  right: 0;
  top: 0;
  width: 54px;
}

.facilitiesFeature span {
  color: #f5c9cb;
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: 0.11em;
}

.facilitiesFeature strong {
  font-family: var(--display-font);
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-top: 10px;
}

.facilityMatrix {
  max-height: none;
}

.multiChoiceGrid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}

.multiChoice {
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(var(--brand-ink-rgb), 0.18);
  border-radius: 13px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: var(--fs-sm);
  font-weight: 600;
  gap: 12px;
  line-height: 1.35;
  min-height: 56px;
  padding: 10px 14px;
  text-align: left;
  transition: 0.22s ease;
}

.multiChoice:hover {
  background: var(--paper);
  border-color: var(--accent);
}

.multiChoice > span {
  align-items: center;
  background: var(--paper);
  border: 1px solid rgba(var(--brand-ink-rgb), 0.25);
  border-radius: 7px;
  display: flex;
  flex: 0 0 auto;
  font-size: var(--fs-sm);
  font-weight: 700;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.multiChoice.selected {
  background: var(--deep);
  border-color: var(--deep);
  color: white;
}

.multiChoice.selected > span {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--paper);
}

.otherPropertyField {
  display: block;
  margin-top: 14px;
  max-width: 520px;
}

.otherPropertyField > span {
  color: var(--deep);
  display: block;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 9px;
}

.formFooter {
  align-items: flex-end;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin: 14px auto 0;
  max-width: 920px;
  padding-top: 22px;
}

.footerMeta {
  min-height: 55px;
}

.backButton {
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 700;
  min-height: 44px;
  padding: 5px 4px;
}

.backButton span {
  display: inline-block;
  margin-right: 5px;
  transition: transform 0.2s ease;
}

.backButton:hover span {
  transform: translateX(-3px);
}

.error {
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  line-height: 1.5;
  margin: 6px 0 0;
}

.error.visible {
  color: var(--accent-text);
  font-weight: 700;
}

.primaryButton {
  align-items: center;
  background: var(--deep);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(var(--brand-ink-rgb), 0.2);
  color: white;
  cursor: pointer;
  display: flex;
  font-size: var(--fs-sm);
  font-weight: 700;
  gap: 28px;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 10px 0 26px;
  transition: 0.25s ease;
}

.primaryButton:hover {
  background: var(--accent);
  box-shadow: 0 18px 36px rgba(var(--brand-accent-rgb), 0.28);
  transform: translateY(-2px);
}

.primaryButton > span {
  align-items: center;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  display: flex;
  height: 38px;
  justify-content: center;
  transition: transform 0.25s ease;
  width: 38px;
}

.primaryButton:hover > span {
  transform: rotate(-10deg);
}

.successShell {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 120px 28px 60px;
}

.successCard {
  animation: enterStage 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  margin: 0 auto;
  max-width: 780px;
  text-align: center;
  z-index: 2;
}

.successOrbit {
  align-items: center;
  border: 1px solid rgba(var(--brand-ink-rgb), 0.17);
  border-radius: 50%;
  display: flex;
  height: 150px;
  justify-content: center;
  margin: 0 auto 35px;
  position: relative;
  width: 150px;
}

.successOrbit::before,
.successOrbit::after {
  border: 1px solid rgba(var(--brand-accent-rgb), 0.12);
  border-radius: 50%;
  content: "";
  inset: -18px;
  position: absolute;
  animation: successPulse 3s ease-out infinite;
}

.successOrbit::after {
  animation-delay: -1.5s;
}

@keyframes successPulse {
  50%,
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

.successTick {
  align-items: center;
  background: var(--deep);
  border-radius: 50%;
  box-shadow: 0 16px 30px rgba(var(--brand-ink-rgb), 0.22);
  color: white;
  display: flex;
  font-size: 28px;
  height: 88px;
  justify-content: center;
  width: 88px;
}

.successCard h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  margin: 0;
}

.successCopy {
  color: var(--ink-soft);
  font-size: var(--fs-lg);
  line-height: 1.75;
  margin: 24px auto;
  max-width: 620px;
}

.reference {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 30px;
  min-width: 230px;
  padding: 14px 25px;
}

.reference span {
  color: var(--ink-soft);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.reference strong {
  font-size: var(--fs-base);
  letter-spacing: 0.05em;
}

.successCard .primaryButton {
  margin: 0 auto;
}

@media (max-width: 1050px) {
  .journeyRail {
    padding-left: 28px;
    padding-right: 20px;
    width: 250px;
  }

  .railStep p {
    font-size: 13px;
  }

  .formColumn {
    margin-left: 250px;
    padding-left: 38px;
    padding-right: 38px;
  }

  .welcomePanel {
    padding-right: 43%;
  }

  .welcomeVisual {
    right: -24px;
    width: 46%;
  }

  .questionControl {
    margin-left: 0;
  }

  .matrixLegend,
  .matrixRow {
    grid-template-columns: minmax(110px, 1fr) minmax(220px, 1.3fr);
  }
}

@media (max-width: 760px) {
  .brandBar {
    height: 72px;
    padding: 0 19px;
  }

  .brandLockup > span {
    display: none;
  }

  .questionHeader h3 {
    font-size: 17px;
  }

  .brandLogo {
    height: 55px;
    width: 79px;
  }

  .previewFlag {
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 7px 11px;
  }

  .journeyRail {
    align-items: center;
    border-bottom: 1px solid var(--line);
    border-right: 0;
    display: flex;
    height: 58px;
    left: 0;
    padding: 0 17px;
    right: 0;
    top: 72px;
    width: 100%;
  }

  .railTitle,
  .railFooter,
  .railStep p {
    display: none;
  }

  .railProgress {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    width: 100%;
  }

  .railProgress::before,
  .railProgressFill {
    height: 2px !important;
    left: 16px;
    right: 16px;
    top: 16px;
    width: auto;
  }

  .railProgressFill {
    max-height: none;
    transform-origin: left;
    width: 0;
  }

  .railProgressFill.progress0 { width: 0; }
  .railProgressFill.progress10 { width: 10%; }
  .railProgressFill.progress20 { width: 20%; }
  .railProgressFill.progress30 { width: 30%; }
  .railProgressFill.progress40 { width: 40%; }
  .railProgressFill.progress50 { width: 50%; }
  .railProgressFill.progress60 { width: 60%; }
  .railProgressFill.progress70 { width: 70%; }
  .railProgressFill.progress80 { width: 80%; }
  .railProgressFill.progress90 { width: 90%; }
  .railProgressFill.progress100 { width: 100%; }

  .railStep {
    min-height: 32px;
    width: 32px;
  }

  .railStep > span {
    font-size: 12px;
    height: 31px;
    width: 31px;
  }

  .formColumn {
    margin-left: 0;
    min-height: 100vh;
    padding: 164px 16px 32px;
  }

  .welcomePanel {
    min-height: auto;
    padding: 300px 2px 20px;
  }

  .welcomePanel.welcomePanelNoHero {
    padding: 20px 2px;
  }

  .welcomePanel h1 {
    font-size: 50px;
  }

  .welcomeVisual {
    height: 270px;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
  }

  .indigoPhotoFrame {
    border-radius: 24px 5px 24px 5px;
    height: 250px;
    left: 17px;
    right: 17px;
    top: 0;
    transform: none;
    width: auto;
  }

  .indigoIdentity {
    bottom: 20px;
    left: 20px;
  }

  .indigoIdentity strong {
    font-size: 24px;
  }

  .brandBlock {
    height: 52px;
    width: 52px;
  }

  .brandBlockRed {
    left: 0;
    top: 34px;
  }

  .brandBlockNavy {
    bottom: 0;
    right: 0;
  }

  .stageIntro {
    align-items: flex-start;
  }

  .stageIntro h1 {
    font-size: 41px;
  }

  .stageNumber {
    font-size: 60px;
  }

  .twoColumnQuestions,
  .multiChoiceGrid {
    grid-template-columns: 1fr;
  }

  .facilitiesFeature {
    grid-template-columns: 1fr;
  }

  .facilitiesFeature img {
    min-height: 200px;
  }

  .facilitiesFeature div {
    min-height: 140px;
  }

  .question {
    padding: 20px 17px 22px;
  }

  .questionControl {
    margin-left: 0;
  }

  .questionHeader {
    gap: 12px;
  }

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

  .choice {
    border-radius: 12px;
    width: 100%;
  }

  .rating {
    gap: 6px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
  }

  .ratingButton {
    font-size: 16px;
    min-width: 0;
  }

  .scaleLegend {
    font-size: 11px;
    gap: 12px;
    letter-spacing: 0.03em;
  }

  /* Matrix stacks: label above, 1-5 buttons below, legend repeated per row
     so the scale stays readable without any text clipping. */
  .matrixLegend > span:first-child {
    display: none;
  }

  .matrixLegend {
    gap: 0;
    grid-template-columns: 1fr;
    padding: 10px 14px;
  }

  .matrixRow {
    align-items: stretch;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .matrixRow strong {
    font-size: 15px;
    margin-bottom: 0;
  }

  .ratingCompact {
    gap: 6px;
  }

  .ratingCompact .ratingButton {
    font-size: 16px;
    min-height: 48px;
    padding: 4px 2px;
  }

  .formFooter {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .primaryButton {
    width: 100%;
  }

  .successShell {
    padding-top: 110px;
  }

  .multiChoice {
    font-size: 15px;
    min-height: 54px;
  }

  .choice {
    font-size: 15px;
    justify-content: flex-start;
    min-height: 50px;
  }

  .stageIntro > div:first-child > p:last-child {
    font-size: 15px;
  }

  .welcomeCopy {
    font-size: 16px;
  }
}

/* Very narrow phones - stop the 5-point scale from cramping */
@media (max-width: 360px) {
  .rating,
  .ratingCompact {
    gap: 4px;
  }

  .ratingButton {
    font-size: 15px;
  }
}

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

.skip-link{position:fixed;z-index:100;top:8px;left:8px;padding:12px 18px;border:2px solid var(--accent);border-radius:8px;font-size:var(--fs-sm);font-weight:700;background:#fff;color:var(--deep);transform:translateY(-260%)}.skip-link:focus{transform:none}
.secureFlag{align-items:center;background:rgba(var(--brand-ink-rgb),.055);border:1px solid rgba(var(--brand-ink-rgb),.14);border-radius:999px;color:var(--deep);display:flex;font-size:var(--fs-meta);font-weight:700;gap:8px;letter-spacing:.08em;padding:8px 14px;text-transform:uppercase}.secureFlag:before{background:var(--status-dot);border-radius:50%;content:"";height:7px;width:7px}
.loadingPanel,.errorPanel{margin:0 auto;max-width:720px;padding:170px 24px 60px;text-align:center}.loadingPanel h1,.errorPanel h1{font-family:var(--display-font);font-size:clamp(38px,6vw,68px);letter-spacing:-.045em;line-height:1.02}.loadingPanel p,.errorPanel p{color:var(--ink-soft);font-size:var(--fs-lg);line-height:1.7}.loadingMark{animation:blink 1.3s ease-in-out infinite;background:var(--accent);border-radius:50%;display:block;height:12px;margin:0 auto 24px;width:12px}
.question.requiredMissing{border-color:var(--accent);border-width:2px;box-shadow:0 14px 38px rgba(var(--brand-accent-rgb),.12)}.question.requiredMissing .questionNumber{background:var(--accent);color:#fff}
.questionControl .textInput,.questionControl .textArea{display:block}.questionControl select.textInput{appearance:auto}
.questionControl input[type=radio],.questionControl input[type=checkbox]{position:absolute;opacity:0;pointer-events:none}
.fieldHint{color:var(--ink-soft);font-size:14px;line-height:1.55;margin:8px 0 0}.requiredMark{color:var(--accent-text);font-weight:700;margin-left:5px}.emptyStage{color:var(--ink-soft);font-size:var(--fs-base);padding:18px 0}
.formError{color:var(--accent-text);font-size:14px;font-weight:700;line-height:1.5;margin:6px 0 0}.formError[hidden]{display:none}
.primaryButton:disabled{cursor:not-allowed;opacity:.58;transform:none}
.successReferenceLabel{color:var(--ink-soft);font-size:var(--fs-meta);font-weight:600;letter-spacing:.09em;text-transform:uppercase}
.successCopy{white-space:pre-line}
@media(max-width:760px){.secureFlag{font-size:12px;letter-spacing:.04em;padding:7px 11px}.loadingPanel,.errorPanel{padding-top:156px}.questionControl .textInput{min-height:54px}.stagePanel{padding-bottom:max(12px,env(safe-area-inset-bottom))}}
