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

@font-face {
  font-family: "Eunomia";
  src: url("../assets/fonts/Eunomia-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

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

@font-face {
  font-family: "Century Gothic Local";
  src: url("../assets/fonts/CenturyGothic-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Century Gothic Local";
  src: url("../assets/fonts/CenturyGothic-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --accent: #c88c6e;
  --accent-dark: #9f674c;
  --ink: #171513;
  --paper: #fbf8f5;
  --white: #fff;
  --line: #e7ddd7;
  --muted: #756d68;
  --title-font: "Eunomia", Inter, system-ui, sans-serif;
  --questionnaire-font: "Century Gothic Local", "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
  --questionnaire-pink: #c88c6e;
  --questionnaire-ink: #171513;
  --questionnaire-line: #ded6d1;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper)
}

button,
input,
textarea,
select {
  font: inherit
}

.questionnaire-screen button,
.questionnaire-screen input,
.questionnaire-screen textarea,
.questionnaire-screen select {
  font-family: var(--questionnaire-font);
}

button {
  font-family: Inter, system-ui, sans-serif
}

.screen {
  display: none;
  min-height: 100svh
}

.screen.active {
  display: block
}

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

.logo-light {
  filter: none
}

.kicker {
  font-size: 11px;
  letter-spacing: .22em;
  font-weight: 600;
  color: var(--accent-dark)
}

.kicker.light {
  color: #fff
}

/* LANDING */
.landing {
  padding: 34px clamp(22px, 5vw, 72px);
  background: var(--accent);
  color: #fff
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: .2em;
  color: #fff
}

.landing-nav .logo {
  filter: none
}

.landing-grid {
  min-height: calc(100svh - 100px);
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 7vw;
  align-items: center;
  max-width: 1450px;
  margin: auto
}

.landing-copy {
  padding: 2vh 0
}

.landing-copy .kicker {
  color: #fff
}

.landing-copy h1 {
  font-family: var(--title-font);
  font-weight: 500;
  font-size: clamp(54px, 6vw, 104px);
  line-height: .93;
  margin: 18px 0 0;
  color: #fff
}

.landing-copy h1 em {
  color: #fff;
  font-style: normal;
  font-weight: 500
}

.cards {
  display: grid;
  gap: 12px
}

.card {
  position: relative;
  min-height: 126px;
  border: 1px solid rgba(200, 140, 110, .22);
  background: #fff;
  padding: 24px 26px;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 18px;
  align-items: center;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease
}

.card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s ease
}

.card:hover {
  transform: translateX(-5px);
  border-color: rgba(200, 140, 110, .5);
  box-shadow: 0 18px 42px rgba(95, 59, 41, .12)
}

.card:hover::after {
  transform: scaleX(1)
}

.card-number {
  font-family: var(--questionnaire-font);
  font-size: 28px;
  color: var(--accent)
}

.card h2 {
  font-family: var(--questionnaire-font);
  font-size: 25px;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--accent)
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5
}

.card .primary-btn {
  margin: 0;
  min-width: 92px
}

/* BUTTONS */
.primary-btn,
.secondary-btn {
  border: 0;
  padding: 14px 20px;
  cursor: pointer;
  transition: .2s;
  letter-spacing: .04em
}

.primary-btn {
  background: var(--accent);
  color: #fff
}

.primary-btn:hover {
  background: var(--accent-dark)
}

.primary-btn:disabled {
  opacity: .55;
  cursor: not-allowed
}

.secondary-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink)
}

.secondary-btn:hover {
  border-color: var(--accent);
  color: var(--accent)
}

/* QUESTIONNAIRE */
.questionnaire-screen.active {
  display: grid;
  grid-template-columns: minmax(270px, 31vw) 1fr;
  font-family: var(--questionnaire-font);
}

.side-panel {
  position: sticky;
  font-family: var(--questionnaire-font);
  top: 0;
  height: 100svh;
  background: var(--accent);
  color: #fff;
  padding: 42px clamp(28px, 4vw, 60px);
  display: flex;
  flex-direction: column;
  justify-content: space-between
}

.side-panel .logo {
  width: min(230px, 70%)
}

.side-panel h2 {
  font-family: var(--title-font);
  font-weight: 400;
  font-size: clamp(30px, 3vw, 50px);
  line-height: 1.05;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 14px 0
}

.side-step {
  color: #fff;
  font-size: 13px
}

.side-progress {
  height: 2px;
  background: rgba(255, 255, 255, .25)
}

.side-progress div {
  height: 100%;
  background: #fff;
  width: 0;
  transition: .3s
}

.form-area {
  --accent: #3f3935;
  --accent-dark: #3f3935;
  --line: var(--questionnaire-line);
  --muted: #6f6863;
  --ink: var(--questionnaire-ink);
  font-family: var(--questionnaire-font);
  min-height: 100svh;
  padding: 0 clamp(24px, 6vw, 92px);
  display: flex;
  align-items: center;
  position: relative
}

.home-btn {
  position: absolute;
  top: 28px;
  right: clamp(24px, 6vw, 92px);
  z-index: 10;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 0;
  font-size: 10px;
  letter-spacing: .14em;
  cursor: pointer;
  transition: .2s
}

.home-btn:hover {
  color: var(--accent)
}

.mobile-header {
  display: none
}

.form-area form {
  width: 100%;
  max-width: 800px;
  margin: auto;
  padding: 54px 0
}

.step-head {
  margin-bottom: 34px
}

.step-index {
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--accent-dark)
}

.step-head h1 {
  font-family: var(--questionnaire-font);
  font-size: clamp(24px, 2vw, 58px);
  font-weight: 500;
  margin: 10px 0;
  color: var(--ink);
  line-height: 1.05
}

.step-head p {
  color: var(--muted);
  line-height: 1.6
}

.step-content {
  animation: stepIn .3s ease
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(12px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.field {
  margin: 0 0 25px
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  margin-bottom: 9px
}

.field.required>label:after {
  content: " *";
  color: var(--accent)
}

input[type=text],
input[type=email],
input[type=tel],
input[type=date],
input[type=number],
textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #cfc4bd;
  background: transparent;
  padding: 12px 2px;
  outline: none;
  border-radius: 0;
  color: var(--ink)
}

textarea {
  min-height: 82px;
  resize: vertical
}

input:focus,
textarea:focus {
  border-color: var(--accent)
}

/* Date fields: use the browser picker icon on desktop and the custom cue on mobile. */
.date-input-wrap {
  position: relative;
  width: 100%;
}

.date-input-wrap input[type="date"] {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 11px 52px 11px 13px;
  border: 1px solid #d9cdc6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
}

.date-input-wrap input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.72;
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.date-input-icon {
  display: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 19px;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

/* TEMPORARY FILE UPLOAD NOTICE */
.upload-unavailable {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #d9cdc6;
  border-radius: 10px;
  background: #faf8f6;
}

.upload-unavailable-title {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.upload-unavailable .helper {
  margin: 4px 0;
}

.inline-email-files {
  margin-top: 9px;
  width: auto;
  max-width: 100%;
}

/* CUSTOM DROPDOWN */
.custom-select {
  position: relative
}

.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 0;
  border-bottom: 1px solid #cfc4bd;
  background: transparent;
  color: var(--ink);
  padding: 12px 2px;
  text-align: left;
  cursor: pointer
}

.custom-select-trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: .2s
}

.custom-select.open .custom-select-trigger {
  border-color: var(--accent)
}

.custom-select.open .custom-select-trigger::after {
  transform: rotate(225deg) translateY(-1px)
}

.custom-select.has-value .custom-select-trigger {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  padding: 12px
}

.custom-select-menu {
  position: absolute;
  z-index: 9999;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 35px rgba(40, 25, 18, .12);
  max-height: min(320px, 45vh);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable
}

.field:has(.custom-select.open) {
  position: relative;
  z-index: 1000;
}

.custom-select.open .custom-select-menu {
  display: block;
}

.custom-select.drop-up .custom-select-menu {
  top: auto;
  bottom: calc(100% + 5px);
}

.custom-option {
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer
}

.custom-option:hover,
.custom-option.selected {
  background: var(--accent);
  color: #fff
}

.custom-option.placeholder {
  color: var(--muted)
}

.custom-option.placeholder.selected {
  background: transparent;
  color: var(--muted)
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 9px
}

.choice input {
  position: absolute;
  opacity: 0
}

.choice span {
  display: block;
  border: 1px solid var(--line);
  padding: 11px 15px;
  font-size: 13px;
  cursor: pointer;
  background: #fff
}

.choice input:checked+span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff
}

.other-input {
  margin-top: 10px !important
}

.helper {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6
}

.upload-zone {
  border: 1px dashed #cdb8ad;
  background: #fff;
  padding: 30px;
  text-align: center
}

.upload-zone input {
  max-width: 100%
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line)
}

.hidden {
  display: none !important
}

.status {
  font-size: 12px;
  color: #a44;
  min-height: 18px
}

.consent {
  display: flex;
  gap: 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted)
}

/* SUCCESS */
.success-screen.active {
  display: flex;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px
}

.success-screen>.logo {
  position: absolute;
  top: 35px;
  left: 5vw
}

.success-card {
  text-align: center;
  max-width: 600px
}

.success-number {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 28px;
  margin: 0 auto 30px
}

.success-card h1 {
  font-family: Inter, system-ui, sans-serif;
  font-size: 60px;
  font-weight: 500;
  margin: 10px;
  color: var(--ink)
}

.success-card p {
  color: var(--muted)
}

@media(max-width:800px) {
  .landing {
    padding: 24px 20px
  }

  .landing-nav span {
    display: none
  }

  .landing-nav .logo {
    width: 145px
  }

  .landing-grid {
    display: block;
    padding: 13vh 0 40px;
    min-height: auto
  }

  .landing-copy h1 {
    font-size: 52px
  }

  .cards {
    margin-top: 50px
  }

  .card {
    grid-template-columns: 38px 1fr;
    padding: 20px;
    min-height: 0
  }

  .card .primary-btn {
    grid-column: 2;
    width: max-content
  }

  .card h2 {
    font-size: 22px
  }

  .questionnaire-screen.active {
    display: block
  }

  .side-panel {
    display: none
  }

  .form-area {
    display: block;
    padding: 0 20px
  }

  .home-btn {
    display: none
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(251, 248, 245, .94);
    backdrop-filter: blur(10px);
    height: 72px;
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: center;
    border-bottom: 1px solid var(--line)
  }

  .mobile-header .logo {
    width: 125px;
    margin: auto
  }

  .mobile-header span {
    font-size: 10px;
    color: var(--muted)
  }

  .icon-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--questionnaire-font);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    padding: 10px 0;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .icon-btn:active,
  .icon-btn:focus {
    color: var(--accent);
    outline: none;
  }

  .form-area form {
    padding: 34px 0 80px
  }

  .step-head h1 {
    font-size: 38px
  }

  .choices {
    gap: 7px
  }

  .choice span {
    padding: 10px 12px
  }

  .wizard-nav {
    position: sticky;
    bottom: 0;
    z-index: 25;
    background: linear-gradient(0deg, var(--paper) 75%, transparent);
    padding: 22px 0 18px
  }

  .wizard-nav button {
    flex: 1
  }

  .success-screen>.logo {
    width: 140px
  }

  .success-card h1 {
    font-size: 48px
  }
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px
}

.success-actions button {
  min-width: 150px
}

.pdf-document {
  position: fixed;
  left: -100000px;
  top: 0;
  width: 794px;
  box-sizing: border-box;
  padding: 48px 54px;
  background: #fff;
  color: #241f1c;
  font-family: Inter, Arial, sans-serif;
  line-height: 1.5;
  z-index: -1;
}

.pdf-document .pdf-brand {
  font-family: var(--title-font), Inter, Arial, sans-serif;
  font-size: 18px;
  letter-spacing: .12em;
  margin-bottom: 8px;
}

.pdf-document .pdf-kicker {
  font-size: 10px;
  letter-spacing: .16em;
  color: #c88c6e;
  font-weight: 700;
  margin-bottom: 18px;
}

.pdf-document h1 {
  font-family: var(--title-font), Inter, Arial, sans-serif;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 500;
  margin: 0 0 8px;
}

.pdf-document h2 {
  font-family: var(--title-font), Inter, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 500;
  margin: 32px 0 14px;
  padding-bottom: 7px;
  border-bottom: 1px solid #d9c8bf;
  color: #c88c6e;
}

.pdf-document h3 {
  font-family: var(--title-font), Inter, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  margin: 18px 0 8px;
}

.pdf-meta {
  font-size: 10px;
  color: #746b66;
  margin: 0 0 22px
}

.pdf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px
}

.pdf-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid #eee5e0;
  padding: 6px 0
}

.pdf-item strong {
  font-size: 8px;
  letter-spacing: .1em;
  color: #8c817b
}

.pdf-item span {
  font-size: 10px
}

.pdf-question {
  break-inside: avoid;
  border-bottom: 1px solid #eee5e0;
  padding: 10px 0
}

.pdf-question-text {
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 4px
}

.pdf-answer {
  font-size: 10px;
  color: #4d4540;
  white-space: pre-wrap
}

.pdf-other {
  margin-top: 3px;
  color: #746b66;
  font-style: italic
}

@media print {
  .pdf-document {
    position: static;
    left: auto;
    width: auto;
    z-index: auto
  }
}

/* SIAINI — conditional fields / polished choice controls */
.conditional-field,
.other-reveal {
  margin: 14px 0 0;
  padding: 16px 18px;
  border: 1px solid #e3d8d2;
  background: rgba(255, 255, 255, .72);
  border-radius: 10px;
  animation: revealIn .22s ease;
}

.conditional-field label,
.other-reveal label {
  display: block;
  margin: 0 0 9px;
  font-size: 12px;
  letter-spacing: .03em;
  color: var(--muted);
}

.conditional-field textarea,
.other-reveal input {
  width: 100%;
  border: 1px solid #d9cdc6;
  background: #fff;
  border-radius: 7px;
  padding: 12px 13px;
  color: var(--ink);
  outline: none;
  min-height: 76px;
}

.other-reveal input {
  min-height: 0;
}

.conditional-field textarea:focus,
.other-reveal input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 140, 110, .10);
}

.conditional-info {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: #faf5f1;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  border-radius: 0 7px 7px 0;
}

.readonly-field .readonly-value {
  padding: 12px 14px;
  border: 1px dashed #d7cbc4;
  border-radius: 8px;
  color: var(--muted);
  background: #f8f4f1;
  font-size: 12px;
}

.multi-options,
.conditional-field .choices {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.choice {
  position: relative;
  display: inline-block;
}

.choice span {
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
  border-radius: 7px;
}

.choice:hover span {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.custom-select-trigger {
  border: 1px solid #d9cdc6;
  border-radius: 8px;
  background: #fff;
  padding: 13px 14px;
}

.custom-select-trigger::after {
  margin-right: 4px;
}

.custom-select.has-value .custom-select-trigger {
  border-radius: 8px;
  padding: 13px 14px;
}

.custom-select-menu {
  border-radius: 9px;
  border-color: #ddd1ca;
}

.custom-option {
  padding: 13px 14px;
}

.custom-option.selected:not(.placeholder) {
  background: var(--accent);
  color: #fff;
}

@keyframes revealIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SIAINI — refined conditional fields and option controls */
.conditional-question-hidden {
  display: none !important;
}

.conditional-field,
.other-reveal {
  margin: 14px 0 0;
  padding: 16px 18px;
  border: 1px solid #e3d8d2;
  background: rgba(255, 255, 255, .72);
  border-radius: 10px;
  animation: revealIn .22s ease;
}

.conditional-field label,
.other-reveal label {
  display: block;
  margin: 0 0 9px;
  font-size: 12px;
  letter-spacing: .03em;
  color: var(--muted);
}

.conditional-field textarea,
.other-reveal input {
  width: 100%;
  border: 1px solid #d9cdc6;
  background: #fff;
  border-radius: 7px;
  padding: 12px 13px;
  color: var(--ink);
  outline: none;
  min-height: 76px;
  box-sizing: border-box;
}

.other-reveal input {
  min-height: 0;
}

.conditional-field textarea:focus,
.other-reveal input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 140, 110, .10);
}

.conditional-info {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: #faf5f1;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  border-radius: 0 7px 7px 0;
}

.readonly-field .readonly-value {
  padding: 12px 14px;
  border: 1px dashed #d7cbc4;
  border-radius: 8px;
  color: var(--muted);
  background: #f8f4f1;
  font-size: 12px;
}

.multi-options,
.conditional-field .choices {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.choice {
  position: relative;
  display: inline-block;
}

.choice span {
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
  border-radius: 7px;
}

.choice:hover span {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.custom-select-trigger {
  border: 1px solid #d9cdc6;
  border-radius: 8px;
  background: #fff;
  padding: 13px 14px;
}

.custom-select.has-value .custom-select-trigger {
  border-radius: 8px;
  padding: 13px 14px;
}

.custom-select-menu {
  border-radius: 9px;
  border-color: #ddd1ca;
}

.custom-option {
  padding: 13px 14px;
}

.custom-option.selected:not(.placeholder) {
  background: var(--accent);
  color: #fff;
}

@keyframes revealIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* SIAINI — compound answer fields */
.compound-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.compound-fields .nested-field {
  margin: 0;
  padding: 14px;
  border: 1px solid #e3d8d2;
  background: rgba(255, 255, 255, .72);
  border-radius: 10px;
}

.compound-fields .nested-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--muted);
}

.compound-fields .nested-field input {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  border: 1px solid #d9cdc6;
  border-radius: 7px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

.compound-fields .nested-field select {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  border: 1px solid #d9cdc6;
  border-radius: 8px;
  padding: 10px 42px 10px 13px;
  background-color: #fff;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #8b7569 50%), linear-gradient(135deg, #8b7569 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.compound-fields .nested-field select:hover {
  border-color: var(--questionnaire-pink);
}

.compound-fields .nested-field select:focus {
  outline: none;
  border-color: var(--questionnaire-pink);
  box-shadow: 0 0 0 3px rgba(200, 140, 110, .10);
}

@media (max-width: 700px) {
  .compound-fields {
    grid-template-columns: 1fr;
  }
}

/* Language switch — integrated with the existing SIAINI navigation */
.landing-nav-right {
  display: flex;
  align-items: center;
  gap: 22px
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  letter-spacing: .08em
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 2px 0;
  font-size: 10px;
  letter-spacing: .12em;
  cursor: pointer;
  opacity: .58;
  transition: opacity .2s ease, color .2s ease
}

.lang-btn:hover,
.lang-btn.active {
  opacity: 1
}

.lang-divider {
  opacity: .45;
  font-size: 10px
}

.form-topbar {
  position: absolute;
  top: 28px;
  right: clamp(24px, 6vw, 92px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0
}

.form-topbar .home-btn {
  position: static;
  padding: 10px 0
}

.form-language-switch {
  color: var(--muted)
}

.form-language-switch .lang-btn.active,
.form-language-switch .lang-btn:hover {
  color: var(--accent)
}

.mobile-header-right {
  display: flex;
  align-items: center;
  gap: 14px
}

.mobile-header .language-switch {
  color: var(--muted)
}

.mobile-header .lang-btn.active,
.mobile-header .lang-btn:hover {
  color: var(--accent)
}

.step-head h1,
.step-head h2,
.section-context {
  color: var(--accent)
}

@media(max-width:800px) {
  .landing-nav-right {
    gap: 10px
  }

  .landing-nav-right>span {
    display: none
  }

  .form-topbar {
    display: none
  }
}

.email-upload-option {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.email-upload-option p {
  margin: 0 0 8px;
}

.email-files-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: .2s ease;
}

.email-files-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* QUESTIONNAIRE TYPOGRAPHY & COLOR RULES
   Century Gothic is used throughout the questionnaire.
   Eunomia remains on the landing/title panel.
   Pink-beige is the questionnaire accent for titles and selected controls. */
.questionnaire-screen .form-area {
  --accent: var(--questionnaire-pink);
  --accent-dark: #9f674c;
}

.questionnaire-screen .form-area .step-index,
.questionnaire-screen .form-area .step-head h1,
.questionnaire-screen .form-area .section-context {
  color: var(--questionnaire-pink);
}

.questionnaire-screen .form-area input:focus,
.questionnaire-screen .form-area textarea:focus,
.questionnaire-screen .form-area .custom-select.open .custom-select-trigger {
  border-color: var(--questionnaire-pink);
}

.questionnaire-screen .form-area .choice input:checked+span,
.questionnaire-screen .form-area .custom-select.has-value .custom-select-trigger,
.questionnaire-screen .form-area .custom-option:hover,
.questionnaire-screen .form-area .custom-option.selected:not(.placeholder) {
  background: var(--questionnaire-pink);
  border-color: var(--questionnaire-pink);
  color: #fff;
}

.questionnaire-screen .form-area .primary-btn {
  background: var(--questionnaire-pink);
  color: #fff;
}

.questionnaire-screen .form-area .primary-btn:hover {
  background: var(--accent-dark);
}

.questionnaire-screen .form-area .secondary-btn:hover,
.questionnaire-screen .form-area .home-btn:hover {
  color: var(--questionnaire-pink);
  border-color: var(--questionnaire-pink);
}

.questionnaire-screen .form-area .field.required>label:after {
  color: var(--questionnaire-pink);
}


/* Mobile stability: keep questionnaire headings visible and prevent horizontal clipping. */
@media (max-width: 800px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    scroll-padding-top: 84px;
  }

  .questionnaire-screen,
  .questionnaire-screen.active,
  .form-area,
  .form-area form,
  .step-content {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .form-area {
    overflow-x: clip;
    padding-left: 16px;
    padding-right: 16px;
    align-items: flex-start;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    min-width: 0;
    width: 100%;
    height: 64px;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    padding: 0 2px;
  }

  .mobile-header .logo {
    width: 108px;
    max-width: 100%;
  }

  .mobile-header-right {
    min-width: 0;
    gap: 7px;
  }

  /* On mobile, page progress is already shown by the bottom navigation.
     Keep only the language switch in the top-right. */
  .mobile-header-right > span,
  .mobile-header-right #progressText {
    display: none;
  }

  .mobile-header .language-switch {
    gap: 4px;
  }

  .mobile-header .lang-btn {
    font-size: 12px;
    padding: 4px 2px;
  }

  .mobile-header .lang-divider {
    font-size: 12px;
  }

  .form-area form {
    padding: 26px 0 96px;
  }

  .step-content {
    overflow: visible;
  }

  .step-head {
    margin: 0 0 28px;
    padding-top: 10px;
    scroll-margin-top: 84px;
    position: relative;
    z-index: 1;
  }

  .step-index {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
  }

  .step-head h1 {
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.14;
    margin: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .step-head p,
  .section-context,
  .field label,
  .helper,
  .conditional-field label,
  .other-reveal label {
    overflow-wrap: anywhere;
  }

  .field {
    min-width: 0;
  }

  .choices {
    width: 100%;
    gap: 8px;
  }

  .choice {
    max-width: 100%;
  }

  .choice span {
    max-width: 100%;
    min-width: 0;
    padding: 10px 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .custom-select {
    min-width: 0;
  }

  .custom-select-trigger {
    min-height: 46px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }

  .custom-select-menu {
    max-height: min(300px, calc(100svh - 120px));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-sizing: border-box;
  }

  .custom-option {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }

  input[type=text],
  input[type=email],
  input[type=tel],
  input[type=date],
  input[type=number],
  textarea,
  .conditional-field textarea,
  .other-reveal input {
    max-width: 100%;
    box-sizing: border-box;
  }

  .date-input-wrap {
    max-width: 100%;
  }

  .date-input-wrap input[type="date"] {
    min-height: 50px;
    font-size: 16px;
    padding-left: 13px;
    padding-right: 54px;
  }

  .date-input-wrap input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    width: 32px;
    height: 32px;
  }

  .date-input-icon {
    display: block;
    right: 13px;
    font-size: 20px;
  }

  .conditional-field,
  .other-reveal,
  .upload-zone {
    max-width: 100%;
    overflow: hidden;
  }

  .wizard-nav {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 420px) {
  .mobile-header {
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }

  .mobile-header .logo {
    width: 96px;
  }

  .mobile-header .progressText,
  #progressText {
    font-size: 9px;
  }

  .form-area {
    padding-left: 14px;
    padding-right: 14px;
  }

  .form-area form {
    padding-top: 22px;
  }

  .step-head h1 {
    font-size: 27px;
  }

  .wizard-nav {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }
}

