/* Omnes, the Sefalana brand face. Only two cuts ship, to keep the page light
   on mobile data: regular covers 300-500 and semibold covers 600-800, so the
   browser never fakes a weight. */
@font-face { font-family: "Omnes"; src: url("fonts/omnes-regular.8f6d91eafcb8.woff2") format("woff2"); font-weight: 300 500; font-display: swap; }
@font-face { font-family: "Omnes"; src: url("fonts/omnes-semibold.62715df838da.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }

/* Corporate palette, sampled from the Sefalana logo. Every other colour is a
   tint or shade of these two. */
:root {
  --yellow: #FFAF00;
  --yellow-soft: #FFF3D6;
  --navy: #004475;
  --navy-dark: #00335A;
  --navy-tint: #E6EEF5;
  --ink: #0E2A44;
  --muted: #4F6478;
  --line: #DCE4EC;
  --line-strong: #B8C6D4;
  --star-off: #D3DDE7;
  --bg: #F3F6F9;
  --card: #FFFFFF;
  --radius: 20px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
  accent-color: var(--navy);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Omnes", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, textarea { font: inherit; color: inherit; }

svg { width: 1.25em; height: 1.25em; flex: none; }

a { color: var(--navy); }

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

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--yellow);
  padding-top: env(safe-area-inset-top);
}

.topbar-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo { height: 52px; width: auto; display: block; }

.progress {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.progress.is-visible { opacity: 1; }

.progress-track {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: rgba(0, 68, 117, .16);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--navy);
  transition: width .45s var(--ease);
}

.progress-label { font-size: 13px; font-weight: 700; color: var(--navy); white-space: nowrap; }

/* ---------- Layout & step transitions ---------- */

.shell {
  flex: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px 8px;
}

.steps { display: grid; }

/* Steps share one grid cell so the outgoing and incoming cards overlap
   while they animate instead of pushing each other around. */
.step { grid-area: 1 / 1; min-width: 0; }
.step[hidden] { display: none; }

.step.enter-forward { animation: enter-forward .34s var(--ease) both; }
.step.leave-forward { animation: leave-forward .22s ease-in both; pointer-events: none; }
.step.enter-back { animation: enter-back .34s var(--ease) both; }
.step.leave-back { animation: leave-back .22s ease-in both; pointer-events: none; }

@keyframes enter-forward { from { opacity: 0; transform: translateX(28px); } }
@keyframes leave-forward { to { opacity: 0; transform: translateX(-28px); } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-28px); } }
@keyframes leave-back { to { opacity: 0; transform: translateX(28px); } }

@media (prefers-reduced-motion: reduce) {
  .step.enter-forward, .step.enter-back,
  .step.leave-forward, .step.leave-back { animation: none; }
  .progress-fill { transition: none; }
}

/* ---------- Card & type ---------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 22px 20px;
  box-shadow: 0 1px 2px rgba(14, 42, 68, .05), 0 8px 28px rgba(14, 42, 68, .06);
}

.eyebrow {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
}

.question { margin: 0 0 8px; font-size: 22px; line-height: 1.3; font-weight: 700; outline: none; }

.hero .question { font-size: 44px; line-height: 1.1; font-weight: 800; color: var(--navy); }
.subtitle { margin: 0 0 14px; font-size: 20px; font-weight: 700; color: var(--ink); }

.lede { margin: 0 0 16px; font-size: 17px; color: var(--muted); }
.lede strong { color: var(--ink); }
.hint { margin: 0 0 18px; font-size: 15px; color: var(--muted); }
.meta { margin: 0 0 22px; font-size: 14px; font-weight: 700; color: var(--muted); }
.fineprint { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.hero .fineprint { text-align: center; }

.pill {
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--yellow-soft);
  color: var(--navy);
  letter-spacing: .02em;
  text-transform: none;
}
.pill:empty { display: none; }

.field-label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 700; padding: 0; }
.optional { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { display: block; margin-top: 18px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 99px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }

.btn-ghost { background: transparent; color: var(--navy); padding: 0 12px; margin-left: -12px; }
.btn-ghost:hover { background: var(--navy-tint); }

.btn-text { background: transparent; color: var(--muted); padding: 0 14px; }
.btn-text:hover { color: var(--navy); background: var(--navy-tint); }

.btn-block { width: 100%; }

.btn .spinner { display: none; }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading .btn-label { opacity: .7; }
.btn.is-loading .spinner {
  display: block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 24px;
}
.step-nav-end { display: flex; align-items: center; gap: 4px; }
.step-nav .btn-primary { min-width: 120px; }


/* Messages use the brand: a yellow bar and navy text, never alarm-red. */
.step-error {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--yellow-soft);
  box-shadow: inset 4px 0 0 var(--yellow);
  color: var(--navy);
  font-size: 15px;
  font-weight: 700;
}
.step-error svg { margin-top: 1px; }
.step-error[hidden] { display: none; }

/* ---------- Choices (radio / checkbox cards) ---------- */

.choices { display: grid; gap: 10px; }
.choices-row { grid-template-columns: 1fr 1fr; }
.choices-grid { grid-template-columns: 1fr 1fr; }
.choices-grid .choice:first-child { grid-column: 1 / -1; }
.choices-3 { grid-template-columns: repeat(3, 1fr); gap: 8px; }

.choice { display: block; cursor: pointer; }
/* Visually hidden inputs stay inside their label; otherwise they escape the
   store list's scroll box, stretch the page and make it jump on selection. */
.choice, .chip, .nps-tile, .star, .na { position: relative; }
.choice input, .chip input, .nps-tile input, .star input, .na input {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice-body {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  height: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 700;
  transition: box-shadow .15s, background-color .15s;
}
.choice:hover .choice-body { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.choice input:checked + .choice-body { background: var(--navy-tint); box-shadow: inset 0 0 0 2px var(--navy); }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--yellow); outline-offset: 2px; }

.dot, .box {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--line-strong);
  flex: none;
  transition: box-shadow .15s, background-color .15s;
}
.choice input:checked + .choice-body .dot { box-shadow: inset 0 0 0 7px var(--navy); }

.box { border-radius: 6px; display: flex; align-items: center; justify-content: center; color: transparent; }
.box svg { width: 16px; height: 16px; }
.choice input:checked + .choice-body .box { background: var(--navy); box-shadow: none; color: #fff; }

.choice-compact .choice-body { min-height: 48px; padding: 10px 14px; font-weight: 400; }

.choice-stack .choice-body {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding: 10px 12px;
  line-height: 1.25;
}
.choice-stack small { font-size: 12px; font-weight: 400; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 99px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 700;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.chip:hover span { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.chip input:checked + span { background: var(--navy); color: #fff; box-shadow: none; }
.chip input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }

.date-field { margin-top: 10px; }

/* ---------- Text inputs ---------- */

.search-input, textarea, .field input, .date-field input {
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 16px; /* 16px stops iOS zooming on focus */
  transition: box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.field input, .date-field input { height: 50px; padding: 0 14px; }
.search-input:focus, textarea:focus, .field input:focus, .date-field input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--navy);
}
textarea { display: block; padding: 14px 16px; resize: vertical; min-height: 120px; line-height: 1.5; }

.search { position: relative; margin: 4px 0 12px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-input { height: 50px; padding: 0 14px 0 44px; }

.store-list {
  max-height: min(52vh, 440px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 -4px;
  padding: 0 4px 4px;
}
.store-region { display: grid; gap: 8px; margin-bottom: 14px; }
.store-region[hidden], .store-list .choice[hidden] { display: none; }
.region-label {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 8px 2px 4px;
  background: var(--card);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.store-empty { margin: 12px 0; color: var(--muted); text-align: center; }

.comment { display: block; margin-top: 20px; }
.contact-fields { margin-top: 4px; }

/* ---------- NPS 0-10 ---------- */

.nps { margin-top: 18px; }
.nps-scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 5px; }
.nps-tile { cursor: pointer; }
.nps-tile span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 700;
  transition: background-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.nps-tile:hover span { box-shadow: inset 0 0 0 1.5px var(--navy); }
.nps-tile:active span { transform: scale(.94); }
.nps-tile input:checked + span { background: var(--navy); color: #fff; box-shadow: none; }
.nps-tile input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }

.scale-legend {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.scale-legend span:last-child { text-align: right; }

/* ---------- Star ratings ---------- */

.rating-list { margin: 0 -22px; }
.rating-row { padding: 14px 22px; border-top: 1px solid var(--line); transition: background-color .2s, box-shadow .2s; }
.rating-row:last-child { border-bottom: 1px solid var(--line); }
.rating-label { float: left; width: 100%; padding: 0; margin-bottom: 6px; font-weight: 700; }
.rating-controls { clear: both; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.stars { display: flex; gap: 4px; }
.star { cursor: pointer; display: block; padding: 2px; border-radius: 8px; }
.star svg {
  display: block;
  width: 36px;
  height: 36px;
  fill: var(--star-off);
  transition: fill .12s, transform .15s var(--ease);
}
.star.is-on svg { fill: var(--yellow); }
.star:active svg { transform: scale(.85); }
.star input:focus-visible ~ svg { outline: 3px solid var(--navy); outline-offset: 1px; border-radius: 6px; }

@media (hover: hover) {
  .stars:hover .star svg { fill: var(--yellow); }
  .stars .star:hover ~ .star svg { fill: var(--star-off); }
}

.stars-lg { justify-content: center; gap: 8px; margin: 12px 0 4px; }
.stars-lg .star svg { width: 52px; height: 52px; }
.rating-row-hero, .rating-row-hero:last-child { border: 0; padding: 8px 0 0; }

.na { cursor: pointer; flex: none; }
.na span {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.na:hover span { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.na input:checked + span { background: var(--navy); color: #fff; box-shadow: none; }
.na input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }

.rating-value { margin: 4px 0 0; min-height: 1.4em; font-size: 14px; font-weight: 700; color: var(--navy); }
.rating-value:empty { margin: 0; min-height: 0; }
.rating-value-hero { text-align: center; color: var(--muted); }

.rating-row.is-missing { background: var(--yellow-soft); box-shadow: inset 4px 0 0 var(--yellow); }

/* ---------- End screens ---------- */

.end { text-align: center; padding-top: 36px; }
.end .lede { margin-bottom: 26px; }

.badge-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
}
.badge-check svg { width: 40px; height: 40px; }
.step:not([hidden]) .badge-check { animation: pop .5s .1s var(--ease) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

.connect { border-top: 1px solid var(--line); padding-top: 20px; }
.connect-title { margin: 0 0 8px; font-weight: 700; }
.connect-links { list-style: none; margin: 0; padding: 0; }
.connect-links a { display: inline-block; padding: 8px; font-weight: 700; text-underline-offset: 3px; }

/* ---------- Privacy notice ---------- */

.prose h2 { margin: 28px 0 8px; font-size: 18px; }
.prose p, .prose li { color: var(--ink); }
.prose ul { margin: 0 0 12px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose .lede { margin-bottom: 8px; }
.prose .draft-banner { margin: 0 0 20px; }
.prose .back-link { margin-top: 28px; font-weight: 700; }
.todo { background: var(--yellow-soft); color: var(--navy); font-weight: 700; padding: 0 4px; border-radius: 4px; }

/* ---------- Footer ---------- */

.footer { padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); text-align: center; font-size: 14px; }
.footer a { color: var(--muted); }

/* ---------- Small phones ---------- */

@media (max-width: 380px) {
  .card { padding: 24px 16px 16px; }
  .rating-list { margin: 0 -16px; }
  .rating-row { padding: 12px 16px; }
  .question { font-size: 20px; }
  .hero .question { font-size: 38px; }
  .nps-scale { gap: 3px; }
  .nps-tile span { height: 46px; font-size: 15px; border-radius: 8px; }
  .star svg { width: 32px; height: 32px; }
  .logo { height: 44px; }
  .btn { padding: 0 18px; }
  .step-nav .btn-primary { min-width: 100px; }
}

@media (min-width: 640px) {
  .shell { padding-top: 40px; }
  .card { padding: 36px 36px 26px; }
  .rating-list { margin: 0 -36px; }
  .rating-row { padding: 14px 36px; }
  .question { font-size: 24px; }
  .hero .question { font-size: 52px; }
  .logo { height: 60px; }
}
