/* ==========================================================================
   FairsFair Questionnaire — premium form UI (shared assets)
   Brand-aligned with landing page
   ========================================================================== */

:root {
  --brand-purple: #87367f;
  --brand-purple-dark: #551c4f;
  --brand-purple-deep: #2a0b27;
  --brand-purple-light: #9e4395;
  --brand-purple-vivid: #b84fb8;
  --brand-purple-glow: rgba(135, 54, 127, 0.28);

  --lavender-50: #fbf7fb;
  --lavender-100: #f5e9f4;
  --lavender-200: #ecd9ea;
  --lavender-300: #dfc2dc;
  --lavender-tint: #f6edf5;

  --text-main: #1d1420;
  --text-muted: #574857;
  --text-subtle: #7a6a7b;
  --bg-white: #ffffff;
  --bg-alt: #fdfafd;

  --border-light: rgba(135, 54, 127, 0.12);
  --border-medium: rgba(135, 54, 127, 0.22);
  --border-subtle: #ebdce9;

  --success: #15803d;
  --success-bg: #f0fdf4;

  --shadow-sm: 0 2px 6px rgba(42, 11, 39, 0.06);
  --shadow-md: 0 8px 24px rgba(42, 11, 39, 0.08), 0 2px 6px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 16px 36px rgba(42, 11, 39, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 24px 60px rgba(42, 11, 39, 0.16);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --max: 780px;
  --layout-max: 1120px;
  --progress-rail: 268px;

  --valid: #15803d;
  --valid-border: #22c55e;
  --valid-bg: #f0fdf4;
  --valid-ring: rgba(34, 197, 94, 0.18);
  --invalid: #b91c1c;
  --invalid-border: #ef4444;
  --invalid-bg: #fef2f2;
  --invalid-ring: rgba(239, 68, 68, 0.16);
}

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

html { scroll-behavior: smooth; }

body.q-body {
  font-family: Inter, "Segoe UI", sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  background: #f7f0f6;
  position: relative;
  overflow-x: hidden;
}

body.q-body::before,
body.q-body::after {
  content: none;
  display: none;
}

.q-shapes,
.card-shapes,
.check-dialog-shapes {
  display: none !important;
}

/* ========== Decorative page shapes ========== */
.q-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.q-shape {
  position: absolute;
  display: block;
}

.q-shape-blob-a {
  top: 12%;
  right: -80px;
  width: 260px;
  height: 260px;
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  background: radial-gradient(circle at 35% 35%, rgba(184, 79, 184, 0.22), rgba(135, 54, 127, 0.06) 60%, transparent 72%);
  animation: qShapeFloat 11s ease-in-out infinite;
}

.q-shape-blob-b {
  bottom: 18%;
  left: -100px;
  width: 300px;
  height: 300px;
  border-radius: 55% 45% 48% 52% / 42% 58% 42% 58%;
  background: radial-gradient(circle at 60% 40%, rgba(223, 194, 220, 0.55), rgba(135, 54, 127, 0.08) 55%, transparent 70%);
  animation: qShapeFloat 13s ease-in-out infinite reverse;
}

.q-shape-ring {
  top: 42%;
  right: 6%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 16px solid rgba(135, 54, 127, 0.08);
  animation: qShapeFloat 9s ease-in-out infinite;
}

.q-shape-dot {
  border-radius: 50%;
  background: rgba(135, 54, 127, 0.22);
}

.q-shape-dot-a {
  top: 22%;
  left: 8%;
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 6px rgba(135, 54, 127, 0.08);
}

.q-shape-dot-b {
  top: 58%;
  right: 12%;
  width: 8px;
  height: 8px;
  background: rgba(184, 79, 184, 0.35);
}

.q-shape-dot-c {
  bottom: 12%;
  left: 18%;
  width: 14px;
  height: 14px;
  background: rgba(135, 54, 127, 0.16);
}

.q-shape-pill {
  top: 70%;
  right: 18%;
  width: 70px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(135, 54, 127, 0.16), transparent);
  animation: qShapeFloatPill 10s ease-in-out infinite;
}

.q-shape-arc {
  top: 8%;
  left: 18%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid rgba(135, 54, 127, 0.12);
  border-left-color: transparent;
  border-bottom-color: transparent;
  animation: qShapeFloatArc 12s ease-in-out infinite;
}

@keyframes qShapeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(12px); }
}

@keyframes qShapeFloatPill {
  0%, 100% { transform: rotate(28deg) translateY(0); }
  50% { transform: rotate(28deg) translateY(10px); }
}

@keyframes qShapeFloatArc {
  0%, 100% { transform: rotate(-20deg) translateY(0); }
  50% { transform: rotate(-20deg) translateY(10px); }
}

img { max-width: 100%; display: block; }
a { color: var(--brand-purple); text-decoration: none; }
a:hover { color: var(--brand-purple-dark); }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 2;
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-light);
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 4px solid var(--brand-purple);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.brand:hover { transform: translateY(-1px); }

.brand img {
  height: 38px;
  width: auto;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--lavender-100), #fff);
  border: 1px solid var(--border-medium);
  color: var(--brand-purple-dark);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.header-phone:hover {
  background: var(--lavender-200);
  color: var(--brand-purple-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ========== Layout shell (journey path left + form) ========== */
.q-layout {
  flex: 1;
  width: 100%;
  margin: 0 auto;
  padding: 28px 0 56px;
  display: grid;
  grid-template-columns: var(--progress-rail) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  position: relative;
  z-index: 2;
}

.q-layout > .progress-wrap {
  order: 1;
}

.q-layout > .page {
  order: 2;
}

/* ========== Journey path progress ========== */
.progress-wrap {
  width: 100%;
  position: sticky;
  top: 88px;
  align-self: start;
  z-index: 2;
}

.progress-panel {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(251, 247, 251, 0.94));
  border: 1px solid rgba(135, 54, 127, 0.12);
  border-radius: 22px;
  padding: 20px 16px 18px;
  box-shadow:
    0 14px 36px rgba(42, 11, 39, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.progress-journey-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(135, 54, 127, 0.1);
}

.progress-ring {
  --pct: 0;
  position: relative;
  width: 92px;
  height: 92px;
}

.progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-track {
  fill: none;
  stroke: rgba(135, 54, 127, 0.12);
  stroke-width: 2.6;
}

.progress-ring-value {
  fill: none;
  stroke: var(--brand-purple);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-dasharray: calc(var(--pct) * 1px) 100px;
  transition: stroke-dasharray 0.5s ease;
}

.progress-ring-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-purple-deep);
}

.progress-ring-caption {
  margin-top: -4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.progress-step-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  background: var(--lavender-100);
  border: 1px solid rgba(135, 54, 127, 0.12);
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--brand-purple-dark);
  line-height: 1.3;
  text-align: center;
}

.progress-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
}

.progress-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 0 0 22px;
  color: var(--text-subtle);
}

.progress-steps li:last-child {
  padding-bottom: 0;
}

.progress-steps li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 42px;
  bottom: 0;
  width: 3px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(135, 54, 127, 0.22) 0 6px,
      rgba(135, 54, 127, 0.06) 6px 10px
    );
  z-index: 0;
}

.progress-steps li.is-done:not(:last-child)::before,
.progress-steps li.is-active:not(:last-child)::before {
  background: linear-gradient(
    180deg,
    var(--brand-purple) 0%,
    rgba(135, 54, 127, 0.45) 55%,
    rgba(135, 54, 127, 0.18) 100%
  );
}

.progress-step-marker {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2.5px solid rgba(135, 54, 127, 0.2);
  background: #fff;
  color: var(--text-subtle);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(42, 11, 39, 0.06);
}

.progress-step-marker svg {
  width: 18px;
  height: 18px;
  display: none;
}

.progress-station-num {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.progress-steps li.is-done .progress-step-marker {
  background: linear-gradient(145deg, var(--brand-purple), var(--brand-purple-vivid));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(135, 54, 127, 0.28);
}

.progress-steps li.is-done .progress-step-marker svg {
  display: block;
}

.progress-steps li.is-done .progress-station-num {
  display: none;
}

.progress-steps li.is-active .progress-step-marker {
  background: linear-gradient(145deg, var(--brand-purple), var(--brand-purple-vivid));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(135, 54, 127, 0.3);
}

.progress-steps li.is-active .progress-step-marker::before,
.progress-steps li.is-active .progress-step-marker::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(135, 54, 127, 0.45);
  pointer-events: none;
  animation: journeyPulseRing 1.8s ease-out infinite;
}

.progress-steps li.is-active .progress-step-marker::after {
  animation-delay: 0.9s;
}

@keyframes journeyPulseRing {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.85);
    opacity: 0;
  }
}

.progress-step-text {
  display: flex;
  align-items: center;
  min-width: 0;
}

.progress-step-text strong {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-muted);
  line-height: 1.3;
}

.progress-steps li.is-done .progress-step-text strong {
  color: var(--brand-purple-dark);
}

.progress-steps li.is-active .progress-step-text strong {
  color: var(--brand-purple);
  font-weight: 800;
}

/* Legacy progress bits */
.progress-label,
.progress-step-pill,
.progress-pct,
.progress-bar {
  display: none;
}

/* ========== Page / Card ========== */
.page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 2;
  min-width: 0;
}

.card {
  position: relative;
  background:
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(245, 233, 244, 0.55), transparent 60%),
    rgba(255, 255, 255, 0.97);
  border: 1.5px solid rgba(235, 220, 233, 0.95);
  border-radius: 32px;
  box-shadow:
    0 24px 55px rgba(42, 11, 39, 0.11),
    0 6px 16px rgba(135, 54, 127, 0.07);
  padding: 38px 34px 36px;
  overflow: hidden;
  animation: cardIn 0.45s ease both;
  backdrop-filter: blur(8px);
}

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

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--brand-purple), var(--brand-purple-vivid), var(--lavender-300));
  z-index: 2;
}

.card::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 240px;
  right: -60px;
  bottom: -80px;
  background: linear-gradient(135deg, rgba(245, 233, 244, 0.75), rgba(223, 194, 220, 0.28));
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  pointer-events: none;
  z-index: 0;
}

.card-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.c-shape {
  position: absolute;
  display: block;
}

.c-shape-blob {
  top: -50px;
  right: -30px;
  width: 160px;
  height: 160px;
  border-radius: 46% 54% 50% 50% / 50% 40% 60% 50%;
  background: radial-gradient(circle at 40% 40%, rgba(184, 79, 184, 0.16), transparent 70%);
}

.c-shape-ring {
  bottom: 18%;
  left: -28px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 12px solid rgba(135, 54, 127, 0.07);
}

.c-shape-dot {
  border-radius: 50%;
  background: rgba(135, 54, 127, 0.18);
}

.c-shape-dot-a {
  top: 88px;
  right: 28px;
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 5px rgba(135, 54, 127, 0.07);
}

.c-shape-dot-b {
  bottom: 120px;
  left: 24px;
  width: 6px;
  height: 6px;
  background: rgba(184, 79, 184, 0.28);
}

.c-shape-pill {
  top: 42%;
  right: -10px;
  width: 48px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(135, 54, 127, 0.12));
  transform: rotate(90deg);
}

.card > *:not(.card-shapes) { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-purple);
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--lavender-100);
  border: 1px solid var(--border-light);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(135, 54, 127, 0.18);
}

.page-intro {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  /* Bleed to card edges (top / left / right) */
  margin: -38px -34px 28px;
  padding: 34px 34px 22px;
  border-radius: 0;
  background:
    linear-gradient(145deg, rgba(246, 237, 245, 0.98), rgba(255, 255, 255, 0.92) 48%, rgba(245, 233, 244, 0.7));
  border: 0;
  border-bottom: 1px solid rgba(135, 54, 127, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.page-intro::before {
  content: none;
}

.page-intro::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 120px;
  right: -28px;
  top: -42px;
  border-radius: 48% 52% 60% 40% / 55% 45% 55% 45%;
  background:
    radial-gradient(circle at 30% 40%, rgba(184, 79, 184, 0.18), transparent 62%),
    linear-gradient(135deg, rgba(223, 194, 220, 0.55), rgba(246, 237, 245, 0.1));
  pointer-events: none;
  z-index: 0;
}

.page-intro-icon {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--brand-purple), var(--brand-purple-vivid));
  color: #fff;
  box-shadow:
    0 10px 22px rgba(135, 54, 127, 0.28),
    0 0 0 5px rgba(135, 54, 127, 0.1);
}

.page-intro-icon svg {
  width: 24px;
  height: 24px;
}

.page-intro-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
}

.card h1,
.page-intro h1 {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.25;
  color: var(--brand-purple-deep);
  margin-bottom: 8px;
  max-width: none;
}

.card .lead,
.page-intro .lead {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 0;
  /* max-width: 54ch; */
}

.page-intro .lead + .lead,
.page-intro .lead-follow {
  margin-top: 10px;
  color: var(--brand-purple-deep);
  font-weight: 600;
}

.page-intro .amount {
  color: var(--brand-purple);
  font-weight: 800;
}

.card > .lead:not(.page-intro .lead) {
  margin-bottom: 24px;
}

.page-intro + .lead,
.page-intro + .section-title {
  margin-top: 0;
}

.section-title {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--brand-purple-dark);
  margin: 30px 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--brand-purple), var(--brand-purple-vivid));
}

.section-title:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 8px;
}

/* ========== Fields ========== */
.field { margin-bottom: 20px; }

.field-label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.field-label:has(+ .hint) {
  margin-bottom: 2px;
}

.hint {
  display: block;
  font-size: 0.85rem;
  color: var(--text-subtle);
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.45;
}

.field-label + .hint {
  margin-top: 0;
}

.hint + .input-with-icon,
.hint + .date-picker-shell,
.hint + .field-with-unknown,
.hint + .choice-list {
  margin-top: 0;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fefbfd);
  outline: none;
  transition: var(--transition-fast);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: var(--text-main);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2387367f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"),
    linear-gradient(180deg, #fff, #fefbfd);
  background-repeat: no-repeat, no-repeat;
  background-position: right 14px center, 0 0;
  background-size: 16px 16px, auto;
  cursor: pointer;
}

.field select:hover {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23551c4f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"),
    linear-gradient(180deg, #fff, #fefbfd);
}

.field select:focus {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2387367f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"),
    linear-gradient(180deg, #fff, #fefbfd);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #c4b4c5;
  opacity: 1;
  font-weight: 400;
}

.field input::-webkit-input-placeholder,
.field textarea::-webkit-input-placeholder {
  color: #c4b4c5;
}

.field input::-moz-placeholder,
.field textarea::-moz-placeholder {
  color: #c4b4c5;
  opacity: 1;
}

.field select:required:invalid,
.field select.placeholder-shown,
.field select:has(option[value=""]:checked) {
  color: #c4b4c5;
  font-weight: 400;
}

.field select option {
  color: var(--text-main);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--lavender-300);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 4px rgba(135, 54, 127, 0.14);
}

/* Validation states */
.is-valid,
.field input.is-valid,
.field select.is-valid,
.field textarea.is-valid,
.input-with-icon.is-valid,
.date-picker-shell.is-valid,
.currency-input.is-valid,
.choice-list.is-valid .choice:has(input:checked) {
  border-color: var(--valid-border) !important;
  /* background-color: var(--valid-bg); */
  /* box-shadow: 0 0 0 3px var(--valid-ring) !important; */
}

.is-invalid,
.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid,
.form-check.is-invalid > select,
.form-check.is-invalid > input:not([type="radio"]):not([type="checkbox"]),
.form-check.is-invalid > textarea,
.input-with-icon.is-invalid,
.date-picker-shell.is-invalid,
.currency-input.is-invalid,
.form-check.is-invalid .input-with-icon,
.form-check.is-invalid .date-picker-shell,
.form-check.is-invalid .currency-input,
.choice-list.is-invalid .choice,
.form-check.is-invalid .choice-list .choice,
.field-error:not([hidden]) {
  border-color: var(--invalid-border) !important;  
}

.form-check.is-invalid .choice:hover,
.choice-list.is-invalid .choice:hover {
  border-color: var(--invalid-border) !important;
  background-color: var(--invalid-bg);
}

.input-with-icon.is-valid input,
.date-picker-shell.is-valid .date-picker,
.currency-input.is-valid input,
.input-with-icon.is-invalid input,
.date-picker-shell.is-invalid .date-picker,
.currency-input.is-invalid input,
.form-check.is-invalid .input-with-icon input,
.form-check.is-invalid .date-picker-shell .date-picker,
.form-check.is-invalid .currency-input input {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Keep select chevron when invalid */
/* .form-check.is-invalid > select.is-invalid,
.field select.is-invalid {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b91c1c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"),
    linear-gradient(180deg, #fef2f2, #fef2f2);
  background-repeat: no-repeat, no-repeat;
  background-position: right 14px center, 0 0;
  background-size: 16px 16px, auto;
} */

.field-error {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--invalid);
}

.field-error[hidden],
.field-error.is-hidden {
  display: none !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.field-success {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--valid);
}

/* Reset Bootstrap .row gutters — this project uses CSS grid, not BS columns */
.card .row,
.fieldset .row,
.q-body .row {
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
  display: grid;
  gap: 12px;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
}

.card .row > *,
.fieldset .row > *,
.q-body .row > * {
  width: auto;
  max-width: none;
  /* padding-left: 0; */
  padding-right: 0;
  margin-top: 0;
}

.row-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.row-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.row-title { grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
.date-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }

/* Month + year select pairs (From / To) */
.row.row-2 > select,
#outsideUkDates .row.row-2 > select,
.month-year-field > select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#outsideUkDates .row.row-2,
.month-year-row {
  gap: 12px;
  align-items: start;
}

.month-year-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.month-year-field .error {
  margin-top: 0;
  font-size: 0.78rem;
  line-height: 1.3;
}

.month-year-field.is-invalid > select,
.month-year-field > select.is-invalid {
  border-color: var(--invalid-border) !important;
  background-color: var(--invalid-bg);
  box-shadow: 0 0 0 3px var(--invalid-ring) !important;
}

.postcode-row {
  display: grid;
  grid-template-columns: 1fr max-content;
  gap: 10px;
  align-items: end;
}

.btn svg,
.search-btn svg {
  flex-shrink: 0;
  display: block;
}

.btn-primary svg {
  stroke: currentColor;
}

.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  padding: 14px 14px;
  border: none;
  background: linear-gradient(135deg, var(--brand-purple-dark), var(--brand-purple));
  color: #fff;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  box-shadow: 0 8px 18px rgba(135, 54, 127, 0.28);
  justify-self: start;
}

.search-btn svg {
  stroke: currentColor;
}

.search-btn:hover {
  background: linear-gradient(135deg, #3a1236, var(--brand-purple-dark));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(85, 28, 79, 0.35);
}

.address-result {
  margin-top: 10px;
  padding: 13px 15px;
  border: 1.5px dashed var(--border-medium);
  border-radius: 12px;
  background: var(--lavender-50);
  font-size: 0.92rem;
  color: var(--text-muted);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbf6fb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 20px rgba(85, 28, 79, 0.06);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-with-icon:hover {
  border-color: var(--lavender-400);
}

.input-with-icon:focus-within {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 4px rgba(135, 54, 127, 0.14);
}

.input-with-icon .input-icon {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  width: 52px;
  min-width: 52px;
  height: auto;
  color: var(--brand-purple);
  opacity: 1;
  pointer-events: none;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--lavender-100), var(--lavender-50));
  border-right: 1px solid var(--border-subtle);
}

.input-with-icon .input-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.input-with-icon input {
  flex: 1 1 auto;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 14px 16px !important;
}

.input-with-icon input:hover,
.input-with-icon input:focus {
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
}

.input-with-icon:focus-within .input-icon {
  opacity: 1;
  color: var(--brand-purple-dark);
}

.input-with-ssl input {
  padding-right: 8px !important;
}

.ssl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: stretch;
  margin: 0;
  padding: 0 14px;
  border-left: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, var(--lavender-50), #f7eef7);
  color: #c62828;
}

.ssl-badge svg {
  width: 20px;
  height: 20px;
  display: block;
}

.currency-input {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fefbfd);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: var(--transition-fast);
}

.currency-input:hover {
  border-color: var(--lavender-300);
}

.currency-input:focus-within {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 4px rgba(135, 54, 127, 0.14);
}

.currency-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 0 14px;
  background: linear-gradient(180deg, var(--lavender-100), var(--lavender-50));
  border-right: 1.5px solid var(--border-subtle);
  color: var(--brand-purple-dark);
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
}

.currency-input input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 14px 16px;
  outline: none;
}

.currency-input input:hover,
.currency-input input:focus {
  border: 0 !important;
  box-shadow: none !important;
}

/* Hide number spinners */
input.no-spinner[type="number"]::-webkit-outer-spin-button,
input.no-spinner[type="number"]::-webkit-inner-spin-button,
.currency-input input[type="number"]::-webkit-outer-spin-button,
.currency-input input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input.no-spinner[type="number"],
.currency-input input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.date-picker-shell {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 8px;
  width: 100%; 
  min-height: 54px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbf6fb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 20px rgba(85, 28, 79, 0.06);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.date-picker-shell:hover {
  border-color: var(--lavender-400);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 24px rgba(135, 54, 127, 0.1);
}

.date-picker-shell:focus-within {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 4px rgba(135, 54, 127, 0.14);
  transform: translateY(-1px);
}

.date-picker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  align-self: stretch;
  flex-shrink: 0;
  color: var(--brand-purple);
  background: linear-gradient(180deg, var(--lavender-100), var(--lavender-50));
  border-right: 1px solid var(--border-subtle);
  pointer-events: none;
}

.date-picker-icon svg {
  width: 20px;
  height: 20px;
}

.date-picker-shell .date-picker,
input.date-picker[type="date"] {
  width: 100%;
  max-width: none;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 14px 44px 14px 14px;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-purple-dark);
  min-height: 54px;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.date-picker-shell .date-picker:hover,
.date-picker-shell .date-picker:focus {
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
}

.date-picker-shell .date-picker::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.date-picker-shell::after {
  content: none;
  display: none;
}

.date-picker-shell .date-picker {
  padding-right: 16px;
}

.date-picker-shell .date-picker:invalid {
  color: #b5a3b6;
  font-weight: 500;
}

.is-hidden[hidden],
.is-hidden {
  display: none !important;
}

/* Visibility rules without JS */
#previousAddressFields {
  display: none !important;
}
#questionnaireForm:has([name="livedOver4Years"][value="no"]:checked) #previousAddressFields {
  display: block !important;
}

#outsideUkDates {
  display: none !important;
}
#questionnaireForm:has([name="livedOutsideUk"][value="yes"]:checked) #outsideUkDates {
  display: block !important;
}

#questionnaireForm:has([name="pensionFrequency"][value="none"]:checked) #pensionAmountField {
  display: none !important;
}

.child-benefit-years {
  display: none;
}
.child-block:has(input[name*="benefitTo16"][value="no"]:checked) .child-benefit-years {
  display: block;
}

.years-row .remove-years {
  width: 44px;
  height: 44px;
  min-width: 44px;
  flex-shrink: 0;
  justify-self: end;
  align-self: center;
}

.years-row .remove-years[hidden] {
  visibility: hidden;
  pointer-events: none;
  display: inline-flex !important;
}

#parent2Details {
  display: none !important;
}
#questionnaireForm:has([name="parent2_sameAsChild1"][value="no"]:checked) #parent2Details {
  display: block !important;
}

.draft-docs {
  margin: 8px 0 22px;
  padding: 18px;
  border: 1.5px solid var(--border-medium);
  border-radius: 20px;
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(223, 194, 220, 0.35), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #fbf6fb 100%);
  box-shadow: var(--shadow-sm);
}

.draft-docs-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.draft-docs-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-purple), var(--brand-purple-vivid));
  box-shadow: 0 8px 18px rgba(135, 54, 127, 0.28);
  flex-shrink: 0;
}

.draft-docs-icon svg {
  width: 22px;
  height: 22px;
}

.draft-docs-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-purple-dark);
  letter-spacing: -0.02em;
}

.draft-docs-sub {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: var(--text-subtle);
}

.doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.doc-list li {
  padding: 0;
  border: 0;
  background: transparent;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

a.doc-item:hover {
  border-color: var(--brand-purple-light);
  box-shadow: 0 8px 18px rgba(135, 54, 127, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
}

.doc-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand-purple);
  background: linear-gradient(180deg, var(--lavender-100), var(--lavender-50));
  border: 1px solid var(--border-light);
}

.doc-item-icon svg {
  width: 18px;
  height: 18px;
}

.doc-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.doc-item-body strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

.doc-item-body small {
  font-size: 0.78rem;
  color: var(--text-subtle);
}

.doc-item-meta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-purple);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.doc-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--brand-purple-dark);
  background: var(--lavender-100);
  border: 1px solid var(--border-medium);
  flex-shrink: 0;
}

/* ========== Choices (radio cards) ========== */
.choice-list { display: grid; gap: 12px; }
.choice-grid-2 { grid-template-columns: 1fr 1fr; }
.choice-grid-3 { grid-template-columns: repeat(3, 1fr); }
.choice-grid-4 { grid-template-columns: repeat(2, 1fr); }

.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fefbfd 100%);
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 1px 2px rgba(42, 11, 39, 0.03);
}

.choice:hover {
  border-color: var(--brand-purple-light);
  background: linear-gradient(180deg, #fff, var(--lavender-50));
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.choice:focus-within {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 4px rgba(135, 54, 127, 0.14);
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.choice-dot {
  width: 24px;
  height: 24px;
  border: 2px solid #cbb6c9;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(42, 11, 39, 0.06);
  transition: var(--transition-fast);
}

.choice input:checked + .choice-dot {
  border-color: var(--brand-purple);
  background: linear-gradient(145deg, var(--brand-purple), var(--brand-purple-vivid));
  box-shadow:
    0 0 0 4px rgba(135, 54, 127, 0.14),
    0 6px 14px rgba(135, 54, 127, 0.28);
}

.choice input:checked + .choice-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(42, 11, 39, 0.15);
}

.choice:has(input:checked) {
  border-color: var(--brand-purple);
  background: linear-gradient(135deg, #fbf5fa 0%, var(--lavender-100) 100%);
  box-shadow:
    0 0 0 4px rgba(135, 54, 127, 0.1),
    0 8px 18px rgba(135, 54, 127, 0.08);
}

.choice:has(input:checked) .choice-text {
  color: var(--brand-purple-deep);
  font-weight: 700;
}

.choice-text {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-main);
}

.field-with-unknown {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: stretch;
  margin-top: 8px;
}

.field-with-unknown > * {
  min-width: 0;
}

.field-with-unknown .date-picker-shell {
  margin-top: 0;
}

.field-with-unknown .input-with-icon,
.field-with-unknown .date-picker-shell {
  width: 100%;
  height: 100%;
  min-height: 54px;
}

.field-with-unknown:has(.check-row--side input:checked) .input-with-icon,
.field-with-unknown:has(.check-row--side input:checked) .date-picker-shell {
  opacity: 0.55;
  pointer-events: none;
  filter: grayscale(0.15);
}

/* Checkbox cards */
.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, var(--lavender-50));
  cursor: pointer;
  transition: var(--transition-fast);
}

.check-row--side {
  margin: 0;
  width: auto;
  min-width: 148px;
  align-items: center;
  justify-content: flex-start;
  align-self: stretch;
  white-space: nowrap;
  min-height: 54px;
  padding: 10px 14px;
  box-sizing: border-box;
}

.check-row--side span {
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--text-main);
}

.check-row--side:has(input:checked) span {
  color: var(--brand-purple-deep);
  font-weight: 600;
}

.check-row:hover {
  border-color: var(--brand-purple-light);
  background: var(--lavender-100);
}

.check-row:has(input:checked) {
  border-color: var(--brand-purple);
  background: linear-gradient(135deg, #fbf5fa, var(--lavender-100));
  box-shadow: 0 0 0 4px rgba(135, 54, 127, 0.1);
}

.check-row:focus-within {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 4px rgba(135, 54, 127, 0.14);
}

.check-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  margin-top: 2px;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: 2px solid #cbb6c9;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(42, 11, 39, 0.06);
  transition: var(--transition-fast);
}

.check-row input[type="checkbox"]:hover {
  border-color: var(--brand-purple-light);
}

.check-row input[type="checkbox"]:checked {
  border-color: var(--brand-purple);
  background: linear-gradient(145deg, var(--brand-purple), var(--brand-purple-vivid));
  box-shadow:
    0 0 0 3px rgba(135, 54, 127, 0.14),
    0 6px 12px rgba(135, 54, 127, 0.25);
}

.check-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.2px 2.2px 0;
  transform: rotate(45deg);
}

.check-row label {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-main);
  cursor: pointer;
  flex: 1;
}

.check-row:has(input:checked) label {
  color: var(--brand-purple-deep);
  font-weight: 600;
}

.info-box {
  margin: 24px 0;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--lavender-50), #fff);
  border: 1.5px solid var(--border-light);
  border-left: 5px solid var(--brand-purple);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.info-box h2 {
  font-size: 0.98rem;
  margin-bottom: 8px;
  color: var(--brand-purple-dark);
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
}

.info-box ul {
  margin: 8px 0 0 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.info-box li { margin-bottom: 5px; }

.congrats .amount {
  color: var(--brand-purple);
  font-weight: 800;
}

.child-block {
  border: 1.5px solid var(--border-subtle);
  border-radius: 22px;
  padding: 22px 20px;
  margin-bottom: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fcf8fb 100%);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.child-block:hover {
  border-color: var(--lavender-300);
  box-shadow: var(--shadow-md);
}

.child-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.child-block-head h2 {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-purple-dark);
  letter-spacing: -0.02em;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border-medium);
  background: #fff;
  color: var(--brand-purple-dark);
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.icon-btn--danger {
  color: #9f1239;
  border-color: rgba(159, 18, 57, 0.22);
  background: #fff5f7;
}

.icon-btn--danger:hover {
  background: #ffe4e9;
  border-color: rgba(159, 18, 57, 0.4);
  color: #881337;
}

.link-btn {
  background: none;
  border: none;
  color: var(--brand-purple);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.88rem;
}

.link-btn:hover { text-decoration: underline; }

.btn-add-years {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px dashed var(--border-medium);
  background: var(--lavender-50);
  color: var(--brand-purple-dark);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.btn-add-years:hover {
  background: var(--lavender-100);
  border-style: solid;
  border-color: var(--brand-purple-light);
}

.btn-add-block {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  margin-top: 6px;
  padding: 12px 18px;
  border-radius: var(--radius-full);
  border: 1.5px dashed var(--border-medium);
  background: linear-gradient(180deg, #fff, var(--lavender-50));
  color: var(--brand-purple-dark);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-add-block:hover {
  border-style: solid;
  border-color: var(--brand-purple);
  background: var(--lavender-100);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.years-head,
.years-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

.years-head {
  margin-top: 10px;
  margin-bottom: 6px;
}

.years-head span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-purple-dark);
  letter-spacing: 0.02em;
}

.years-row {
  margin-bottom: 10px;
}

.years-row select {
  width: 100%;
  min-width: 0;
}

.declaration {
  font-size: 0.93rem;
  color: var(--text-main);
  background: var(--lavender-50);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 18px 18px 8px;
  margin-bottom: 15px;
}

.declaration p { margin-bottom: 12px; }
.declaration ul { margin: 0 0 16px 18px; }
.declaration li { margin-bottom: 10px; }

.sig-pad-wrap {
  margin-top: 14px;
  border: 1.5px solid var(--border-medium);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.sig-pad-wrap canvas {
  display: block;
  width: 100%;
  height: 190px;
  touch-action: none;
  cursor: crosshair;
  background:
    linear-gradient(180deg, #fff, #fcf8fc);
}

.sig-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--border-light);
  background: var(--lavender-50);
}

.sig-actions .icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

/* ========== Buttons ========== */
.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(135, 54, 127, 0.12);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: var(--transition-fast);
  letter-spacing: -0.01em;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-light));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 24px var(--brand-purple-glow);
  flex: 0 0 auto;
  margin-left: auto;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-purple-dark), var(--brand-purple));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(135, 54, 127, 0.35);
}

.btn-secondary {
  background: #fff;
  color: var(--brand-purple);
  border-color: rgba(135, 54, 127, 0.35);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--lavender-100);
  color: var(--brand-purple-dark);
  border-color: var(--brand-purple);
  transform: translateY(-1px);
}

.btn-ghost-wide {
  width: 100%;
  background: #fff;
  border: 1.5px dashed var(--border-medium);
  color: var(--brand-purple-dark);
  margin-top: 8px;
  border-radius: var(--radius-full);
}

.btn-ghost-wide:hover {
  background: var(--lavender-100);
  border-style: solid;
}

.quick-check .card {
  background: linear-gradient(165deg, #ffffff 0%, #fcf7fb 55%, #f8eef7 100%);
}

.thank-you-card {
  text-align: center;
  padding: 42px 36px 40px; 
  margin: 0 auto;
  color: var(--text-main);
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(240, 253, 244, 0.55), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(245, 233, 244, 0.4), transparent 60%),
    #ffffff;
}

.thank-you-card::after {
  display: none;
}

.ty-hero {
  margin-bottom: 22px;
}

.thank-you-card .check-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ecfdf5, #d1fae5);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #a7f3d0;
  box-shadow:
    0 0 0 10px rgba(21, 128, 61, 0.08),
    0 14px 30px rgba(21, 128, 61, 0.16);
  animation: tyPop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tyPop {
  from { opacity: 0; transform: scale(0.72); }
  to { opacity: 1; transform: scale(1); }
}

.ty-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 12px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--lavender-100);
  border: 1px solid var(--border-light);
  color: var(--brand-purple);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.thank-you-card h1 {
  max-width: none;
  margin: 0 auto 10px;
  font-size: clamp(1.7rem, 3.4vw, 2.25rem);
  color: var(--brand-purple-deep);
}

.ty-lead {
  margin: 0 auto;
  max-width: 38ch;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.ref-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto 26px;
  padding: 16px 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, var(--lavender-50));
  border: 1.5px dashed var(--border-medium);
  color: var(--brand-purple-dark);
  box-shadow: var(--shadow-sm);
}

.ref-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.ref-box strong {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--brand-purple-dark);
}

.ty-next {
  text-align: left;
  margin: 0 auto 28px;
  padding: 20px 20px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--lavender-50), #fff);
  border: 1px solid var(--border-light);
}

.ty-next h2 {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brand-purple-deep);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.ty-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ty-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.ty-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand-purple), var(--brand-purple-vivid));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(135, 54, 127, 0.22);
}

.ty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.thank-you-card .ty-actions .btn {
  flex: 1 1 180px;
  max-width: 260px;
}

.thank-you-card .ty-actions .btn-primary {
  flex: auto;
}

/* ========== Error / status page ========== */
.error-page.q-layout {
  flex: 1 1 auto;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 760px;
  padding-top: 48px;
  padding-bottom: 64px;
}

.error-page .page {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  order: 0;
}

.error-card {
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(245, 233, 244, 0.9), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(245, 233, 244, 0.45), transparent 60%),
    #ffffff;
}

.error-card .error-icon {
  background: linear-gradient(145deg, var(--lavender-100), #f5e9f4);
  color: var(--brand-purple);
  border: 1px solid var(--border-medium);
  box-shadow:
    0 0 0 10px rgba(135, 54, 127, 0.08),
    0 14px 30px rgba(135, 54, 127, 0.14);
}

.error-eyebrow {
  background: var(--lavender-100);
  border-color: var(--border-medium);
  color: var(--brand-purple-dark);
}

.error-card .ty-actions .btn,
.error-card .ty-actions .btn-primary,
.error-card .ty-actions .btn-secondary {
  flex: 1 1 180px;
  max-width: 260px;
  margin-left: 0;
}

.note-line {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--text-subtle);
  line-height: 1.5;
}

/* ========== Landing footer ========== */
footer {
  background: radial-gradient(circle at 10% 20%, rgba(135, 54, 127, 0.18) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(85, 28, 79, 0.25) 0%, transparent 45%),
              linear-gradient(180deg, #261329 0%, #150a17 100%);
  color: #eedbef;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(184, 79, 184, 0.28);
  box-shadow: 0 -12px 40px rgba(40, 14, 43, 0.35);
  margin-top: auto;
  z-index: 2;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, #b84fb8 35%, #e6a8e4 50%, #87367f 65%, transparent 95%);
  opacity: 0.9;
}

footer .wrap {
  padding-top: 68px;
  padding-bottom: 44px;
}

.foot-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(238, 219, 239, 0.12);
}

.foot-brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #ffffff 0%, #f6e8f4 60%, #deb7dc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  line-height: 1.2;
}

footer p.small {
  font-size: 0.98rem;
  color: #d9cbd7 !important;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
}

.foot-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  background: none;
  color: #eedbef;
  font-size: 0.9rem;
  font-weight: 500;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transition: color var(--transition-fast);
  text-decoration: none;
  position: relative;
}

.foot-links a:first-child {
  padding-left: 0;
}

.foot-links a:last-child {
  padding-right: 0;
}

.foot-links a:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 14px;
  background: rgba(238, 219, 239, 0.35);
}

.foot-links a:hover {
  background: none;
  color: #ffffff;
  border-color: transparent;
  transform: none;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-small {
  font-size: 0.85rem;
  color: #c4b0c3;
  line-height: 1.8;
  padding-top: 32px;
  font-weight: 400;
}

/* Start modal (questionnaire entry) */
.start-dialog {
  border: none;
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  max-width: 520px;
  width: calc(100% - 32px);
  background: var(--bg-white);
  box-shadow: 0 25px 60px rgba(42, 11, 39, 0.35);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 1000;
}

.start-dialog::backdrop {
  background: rgba(30, 14, 33, 0.75);
  backdrop-filter: blur(8px);
}

.start-dialog h2 {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--text-main);
  margin: 8px 0;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.start-dialog .dialog-sub {
  font-size: 0.92rem;
  color: var(--text-subtle);
  margin-bottom: 22px;
}

.start-dialog .dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.start-dialog .eyebrow {
  margin-bottom: 0;
}

.start-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.start-choice-row .dialog-btn,
.start-choice-row .dialog-btn-outline {
  margin-top: 0;
  min-height: 52px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.start-choice-row .dialog-btn {
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-dark));
  color: #fff;
  border: none;
  box-shadow: 0 8px 22px var(--brand-purple-glow);
}

.start-choice-row .dialog-btn:hover {
  transform: translateY(-1px);
  color: #fff;
}

.start-choice-row .dialog-btn-outline {
  background: #fff;
  color: var(--brand-purple-dark);
  border: 1.5px solid var(--brand-purple);
}

.start-choice-row .dialog-btn-outline:hover {
  background: var(--lavender-100);
}

@media (max-width: 520px) {
  .start-choice-row { grid-template-columns: 1fr; }
  .start-dialog { padding: 28px 18px; }
}

/* PDF dialog */
.pdf-dialog {
  max-width: min(960px, calc(100% - 32px));
  width: min(960px, calc(100% - 32px));
  height: min(88vh, 900px);
  max-height: 88vh;
  padding: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: none;
  border-radius: var(--radius-xl);
  background: var(--bg-white);
  box-shadow: 0 25px 60px rgba(42, 11, 39, 0.35);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 1000;
}

.pdf-dialog[open] { display: flex; }

.pdf-dialog::backdrop {
  background: rgba(30, 14, 33, 0.75);
  backdrop-filter: blur(8px);
}

.pdf-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background: var(--lavender-50);
  flex-shrink: 0;
}

.pdf-dialog-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.pdf-dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pdf-open-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: var(--bg-white);
  color: var(--brand-purple-dark);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--lavender-50);
  border: 1px solid var(--border-light);
  font-size: 22px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}

.close svg {
  width: 16px;
  height: 16px;
  display: block;
}

.close:hover {
  color: var(--brand-purple-dark);
  background: var(--lavender-100);
  border-color: var(--border-medium);
}

.pdf-frame-wrap {
  flex: 1;
  min-height: 0;
  background: #f3eef3;
}

.pdf-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

@media (max-width: 980px) {
  .q-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 0 48px;
  }

  .q-layout > .page,
  .q-layout > .progress-wrap {
    order: 0;
  }

  .progress-wrap {
    position: static;
    top: auto;
    order: -1;
  }

  .progress-panel {
    padding: 14px 14px 12px;
  }

  .progress-journey-head {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .progress-ring {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
  }

  .progress-ring-label {
    font-size: 0.88rem;
  }

  .progress-ring-caption {
    display: none;
  }

  .progress-steps {
    display: none;
  }

  .progress-step-chip {
    width: auto;
    flex: 1;
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 820px) {
  .foot-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .q-layout.wrap{padding: 16px !important;}
  .site-header-inner { padding: 12px 16px; }
  .brand img { height: 34px; }
  .row-2, .row-3, .row-title, .date-row, .postcode-row,
  .choice-grid-2, .choice-grid-3, .choice-grid-4 {
    grid-template-columns: 1fr;
  }

  .years-head,
  .years-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
  }
  .postcode-row .search-btn { width: 100%; }
  .card { padding: 26px 16px 28px; border-radius: 24px; }
  .actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .btn,
  .btn-primary {
    width: 100%;
    margin-left: 0;
  }
  .page-intro {
    flex-direction: column;
    align-items: flex-start;
    margin: -26px -16px 20px;
    padding: 28px 16px 16px;
    gap: 12px;
  }
  .page-intro-icon {
    width: 44px;
    height: 44px;
  }
  .page-intro-icon svg {
    width: 20px;
    height: 20px;
  }
  .page-intro-copy {
    width: 100%;
  }

  .ssl-badge {
    padding: 0 12px;
  }

  .ssl-badge svg {
    width: 18px;
    height: 18px;
  }
  .header-phone .label { display: none; }
  footer .wrap { padding-top: 48px; padding-bottom: 32px; }
  .foot-brand { font-size: 1.4rem; }
  .foot-links {
    justify-content: flex-start;
  }
  .foot-links a { width: auto; justify-content: center; }

  .field-with-unknown {
    grid-template-columns: 1fr;
  }

  .check-row--side {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .thank-you-card { padding: 32px 18px 30px; }
  .ty-actions { flex-direction: column; }
  .thank-you-card .ty-actions .btn,
  .thank-you-card .ty-actions .btn-primary {
    max-width: none;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .btn, .choice, .header-phone { transition: none; }
  .progress-ring-value { transition: none; }
  .progress-steps li.is-active .progress-step-marker::before,
  .progress-steps li.is-active .progress-step-marker::after {
    animation: none;
    display: none;
  }
  .thank-you-card .check-icon { animation: none; }
  .q-shape-blob-a,
  .q-shape-blob-b,
  .q-shape-ring,
  .q-shape-arc,
  .q-shape-pill {
    animation: none;
  }
}


/* ===== Ported signature pad + terms modal (from legacy styles.css) ===== */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  /* max-width: 210px; */
  margin: 0 auto;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.62rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 191, 165, 0.28);
}

.btn-submit .btn-label {
  position: relative;
  z-index: 1;
  color: white;
}

.btn-submit .btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 28%,
    rgba(255, 255, 255, 0.16) 48%,
    transparent 62%
  );
  transform: translateX(-120%);
  pointer-events: none;
}

.btn-submit:hover,
.btn-submit:focus-visible {
  background: var(--teal-hover);
  color: #fff;
}

.btn-submit:disabled {
  background: #c5ced4;
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
  color: #fff;
}

.btn-submit.is-loading {
  pointer-events: none;
}

.btn-submit .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
}

.btn-submit.is-loading .spinner {
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

/* Taxback signature pad (consents) */
.signature_pad_wrapper {
  position: relative;
  margin-top: 0.35rem;
  margin-bottom: 0.55rem;
}

#signature-pad-leaner .canvas_wrapper {
  overflow: hidden;
  height: 280px;
  min-height: 280px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid #c9d6db;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#signature-pad-leaner canvas.pad,
#signature-pad-leaner canvas.signature-pad-leaner {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.signHere_img {
  position: absolute;
  right: -8px;
  top: -72px;
  width: 84px;
  z-index: 4;
  pointer-events: none;
  animation: askbob-sign-shake 2s infinite alternate;
}

.signature_img {
  position: absolute;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  width: 86%;
  height: 240px;
  border-radius: 12px;
  z-index: 3;
  pointer-events: none;
  object-fit: contain;
}

button#clear_sig_src.btn-clear-sig,
button#clear_sig_src.clearButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.55rem;
  width: 100%;
  min-height: 38px;
  height: auto;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #e11d48;
  background: #fff5f7;
  color: #e11d48;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  position: static;
  box-shadow: none;
}

button#clear_sig_src.btn-clear-sig:hover,
button#clear_sig_src.clearButton:hover {
  background: #ffe4e9;
  color: #be123c;
  filter: none;
}

#reapeaterimg {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#error.your_signature_err,
#your_signature_err {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #b42318;
}

@keyframes askbob-sign-shake {
  0% { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(-3px) rotate(-2deg); }
  100% { transform: translateX(2px) rotate(2deg); }
}

@media (max-width: 576px) {
  .signHere_img {
    right: 0;
    top: -58px;
    width: 68px;
  }

  #signature-pad-leaner .canvas_wrapper {
    height: 240px;
    min-height: 240px;
  }
}


.terms-modal-content {
  border: none;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.terms-modal-content .modal-header {
  border-bottom: 1px solid var(--line);
  background: #f7fbfb;
  align-items: center;
  gap: 0.75rem;
}

.terms-hint {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal-deep);
  margin-left: auto;
  white-space: nowrap;
}

.terms-modal-body {
  max-height: min(55vh, 420px);
  overflow-y: auto;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--muted);
  scrollbar-width: thin;
}

.terms-doc h2 {
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.terms-doc h3 {
  font-size: 0.95rem;
  color: var(--ink);
  margin: 1.15rem 0 0.45rem;
  font-weight: 700;
}

.terms-doc h4 {
  font-size: 0.86rem;
  color: var(--text);
  margin: 0.85rem 0 0.35rem;
  font-weight: 700;
}

.terms-doc p {
  margin: 0 0 0.55rem;
}

.terms-doc a {
  color: var(--teal-deep);
  font-weight: 600;
}

.terms-lead {
  font-weight: 600;
  color: var(--text);
}

.terms-note {
  margin-top: 1rem;
  font-size: 0.78rem;
}

.terms-end {
  margin-top: 1.25rem;
  text-align: center;
  font-weight: 700;
  color: var(--teal-deep);
}

.btn-terms-close {
  background: #dc2626;
  color: #fff !important;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.35rem;
  font-weight: 700;
  font-size: 0.9rem;
  min-height: 44px;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.28);
}

.btn-terms-close:disabled {
  background: #f5c2c0;
  color: #fff !important;
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-terms-close:not(:disabled):hover {
  background: #b91c1c;
  color: #fff !important;
}

@media (max-width: 576px) {
  .confirm-footer-bar {
    padding: 0.65rem 1rem 0.85rem;
  }

  .terms-hint {
    display: none;
  }

  .banner-welcome {
    padding: 0.75rem 4rem 0.95rem 1rem;
  }

  .banner-welcome-name {
    font-size: 1.2rem;
  }

  .error-wrap {
    padding: 1.5rem 1.15rem 1.4rem;
  }

  .error-title {
    font-size: 1.2rem;
  }
}


/* Signature pad inside FairsFair questionnaire card */
.q-body .signature-block .signature-hint {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-subtle);
  line-height: 1.45;
}

.q-body .signature_pad_wrapper {
  position: relative;
  margin-top: 0.35rem;
  padding: 14px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 70% 60% at 100% 0%, rgba(245, 233, 244, 0.9), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #fbf7fb 100%);
  border: 1.5px solid var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.q-body #signature-pad-leaner .canvas_wrapper {
  overflow: hidden;
  height: 280px;
  min-height: 280px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), #fff),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(135, 54, 127, 0.05) 28px
    );
  border: 1.5px dashed rgba(135, 54, 127, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.q-body #signature-pad-leaner .signHere_img {
  right: 6px;
  top: -18px;
  width: 78px;
}

.q-body button#clear_sig_src.btn-clear-sig,
.q-body button#clear_sig_src.clearButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 160px;
  margin-top: 12px;
  min-height: 42px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(135, 54, 127, 0.28);
  background: #fff;
  color: var(--brand-purple);
  font-size: 0.86rem;
  font-weight: 700;
}

.q-body button#clear_sig_src.btn-clear-sig:hover,
.q-body button#clear_sig_src.clearButton:hover {
  background: var(--lavender-100);
  color: var(--brand-purple-dark);
  border-color: var(--brand-purple);
}

.q-body .actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.q-body .actions .btn-secondary {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}

.q-body .actions .btn-submit,
.q-body .actions .btn.btn-primary.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  min-width: 140px;
  min-height: 52px;
  margin: 0 0 0 auto;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-light));
  color: #fff;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 24px var(--brand-purple-glow);
  overflow: hidden;
}

.q-body .actions .btn-submit:hover,
.q-body .actions .btn-submit:focus-visible,
.q-body .actions .btn.btn-primary.btn-submit:hover {
  background: linear-gradient(135deg, var(--brand-purple-dark), var(--brand-purple));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(135, 54, 127, 0.35);
}

.q-body .actions .btn-submit .btn-label {
  color: inherit;
  position: relative;
  z-index: 1;
}

.q-body .actions .btn-submit .btn-next-icon {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.q-body .actions .btn-submit.is-loading .btn-next-icon {
  display: none;
}

.q-body .actions .btn-submit:disabled,
.q-body .actions .btn.btn-primary.btn-submit:disabled {
  background: linear-gradient(135deg, #c99bc5, #ad74a9);
  color: #fff;
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.q-body .doc-item.terms-status-btn.is-read .terms-status-text {
  color: #0f7b4a;
}
.q-body .doc-item.terms-status-btn.is-pending .terms-status-text {
  color: #b54708;
}

/* Reset Bootstrap .form-check — used here as a validation wrapper, not BS checkboxes */
.fieldset .form-check,
.card .form-check,
.q-body .form-check {
  display: block;
  min-height: 0;
  padding-left: 0;
  margin-bottom: 0;
  position: relative;
}

.fieldset .form-check.field,
.card .form-check.field {
  margin-bottom: 20px;
}

/* checkCurrentForm error display */
.fieldset .form-check .error,
.fieldset .error,
.card .form-check .error,
.card .error {
  display: none;
  margin-top: 0.45rem;
  padding: 0;
  color: var(--invalid);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  width: 100%;
  max-width: 100%;
  clear: both;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.fieldset .form-check .error:not([style*="display: none"]),
.fieldset .form-check .error label.error,
.card .form-check .error:not([style*="display: none"]),
.card .form-check .error label.error {
  display: block;
}

.fieldset .form-check .error label.error,
.card .form-check .error label.error {
  margin: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  width: auto;
  max-width: 100%;
  cursor: default;
}