:root {
  --gf-bg: #f7f4f1;
  --gf-card: #ffffff;
  --gf-accent: #D68352;
  --gf-accent-soft: #c06e3d;
  --gf-accent-light: #f3e4da;
  --gf-border: #e7ddd4;
  --gf-text: #2b2320;
  --gf-muted: #8b7f76;
  --gf-link: #D68352;
  --gf-input-line: #cbbdb3;
  --gf-radius: 10px;
  --gf-shadow: 0 1px 2px rgba(36, 27, 22, 0.04), 0 6px 18px rgba(36, 27, 22, 0.06);
  --gf-font: "Outfit", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

body.form-a-body {
  margin: 0;
  min-height: 100vh;
  background: var(--gf-bg);
  color: var(--gf-text);
  font-family: var(--gf-font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.form-a-lock {
  overflow: hidden;
}

.form-a-shell {
  width: min(720px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 72px;
}

.form-a-banner {
  position: relative;
  width: 100%;
  min-height: 168px;
  border-radius: var(--gf-radius) var(--gf-radius) 0 0;
  overflow: hidden;
  background: #DBDBDB;
  isolation: isolate;
}

.form-a-banner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.form-a-banner__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #DBDBDB;
  pointer-events: none;
}

.form-a-banner__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 168px;
  padding: 24px 28px;
}

.form-a-banner__left,
.form-a-banner__right {
  display: flex;
  align-items: center;
  min-width: 0;
}

.form-a-banner__left {
  flex: 0 0 auto;
}

.form-a-banner__right {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.form-a-banner__logo {
  display: block;
  height: 96px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
}

.form-a-banner__partners {
  display: block;
  height: 48px;
  width: auto;
  max-width: min(340px, 100%);
  object-fit: contain;
  object-position: right center;
}

@media (max-width: 640px) {
  .form-a-banner {
    min-height: 0;
  }

  .form-a-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 16px;
    min-height: 0;
  }

  .form-a-banner__right {
    width: 100%;
    justify-content: flex-start;
  }

  .form-a-banner__logo {
    height: 72px;
    max-width: 240px;
  }

  .form-a-banner__partners {
    height: auto;
    max-height: 72px;
    width: 100%;
    max-width: 100%;
    object-position: left center;
  }
}

.form-a-card {
  background: var(--gf-card);
  border: 1px solid var(--gf-border);
  border-radius: var(--gf-radius);
  box-shadow: var(--gf-shadow);
  margin-top: 12px;
  padding: 24px 26px;
  position: relative;
}

.form-a-card--title {
  border-top: 8px solid #D68352;
  margin-top: 0;
  border-radius: 0 0 var(--gf-radius) var(--gf-radius);
  padding-bottom: 0;
}

.form-a-progress {
  margin: 18px -26px 0;
  padding: 14px 26px 18px;
  border-top: 1px solid var(--gf-border);
}

.form-a-progress__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gf-text);
}

.form-a-progress__meta span:last-child {
  color: var(--gf-accent);
  font-variant-numeric: tabular-nums;
}

.form-a-progress__track {
  height: 5px;
  border-radius: 999px;
  background: #ebe3da;
  overflow: hidden;
}

.form-a-progress__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--gf-accent);
  transition: width 0.3s ease;
}

.form-a-card--section {
  padding: 0;
  overflow: hidden;
}

.form-a-section-bar {
  background: #D68352;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 14px 24px;
}

.form-a-section-body {
  padding: 18px 24px 22px;
  color: var(--gf-muted);
  font-size: 16px;
  line-height: 1.65;
}

.form-a-title {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 600;
  color: var(--gf-text);
  letter-spacing: -0.02em;
}

.form-a-intro {
  color: var(--gf-text);
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.65;
}

.form-a-intro--contact {
  display: block;
}

.form-a-intro--contact p {
  margin: 0 0 4px;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.form-a-intro--contact p:last-child {
  margin-bottom: 0;
}

.form-a-intro a {
  color: #1a73e8;
  font-weight: 400;
  text-decoration: underline;
  word-break: break-all;
}

.form-a-intro a:hover {
  color: #174ea6;
}

.form-a-intro--prospectus {
  margin-top: 0;
}

.form-a-required-note {
  color: #d93025;
  margin: 16px 0 0;
  font-size: 14.5px;
  font-weight: 500;
}

.form-a-label {
  display: block;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 14px;
  color: var(--gf-text);
  line-height: 1.45;
}

.form-a-req {
  color: #d93025;
  margin-left: 2px;
}

.form-a-input {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid var(--gf-input-line);
  padding: 10px 0;
  font: inherit;
  background: transparent;
  outline: none;
  color: var(--gf-text);
  transition: border-color 0.15s ease;
}

.form-a-input:focus {
  border-bottom: 2px solid #D68352;
}

.form-a-date-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.form-a-date {
  display: block;
  width: 100%;
  border: 1.5px solid var(--gf-border);
  border-radius: 10px;
  padding: 14px 16px;
  padding-right: 44px;
  font: inherit;
  font-size: 17px;
  color: var(--gf-text);
  background: #fbf8f6;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  color-scheme: light;
}

.form-a-date:focus {
  border-color: #D68352;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(214, 131, 82, 0.18);
}

.form-a-date-wrap__icon {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: var(--gf-muted);
  pointer-events: none;
}

/* ---------------------------------------------------------------------- */
/* Flatpickr calendar theme                                                */
/* ---------------------------------------------------------------------- */

.flatpickr-calendar {
  font-family: var(--gf-font);
  border-radius: 14px;
  box-shadow: 0 14px 38px rgba(43, 35, 32, 0.16), 0 2px 8px rgba(43, 35, 32, 0.08);
  border: 1px solid var(--gf-border);
  width: min(320px, calc(100vw - 24px)) !important;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after { display: none; }

.flatpickr-months {
  padding: 12px 10px 4px;
  align-items: center;
}

.flatpickr-months .flatpickr-month {
  color: var(--gf-text);
  fill: var(--gf-text);
  height: 34px;
}

.flatpickr-current-month {
  font-size: 15.5px;
  font-weight: 600;
  padding: 0;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-weight: 600;
  border-radius: 6px;
}

.flatpickr-current-month input.cur-year {
  font-weight: 600;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  padding: 8px;
  border-radius: 8px;
  color: var(--gf-muted);
  fill: var(--gf-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  background: var(--gf-accent-light);
  color: var(--gf-accent);
  fill: var(--gf-accent);
}

.flatpickr-weekdays { margin-top: 4px; }

span.flatpickr-weekday {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gf-muted);
  text-transform: uppercase;
}

.flatpickr-days { padding: 4px 8px 10px; }
.dayContainer { width: 100%; min-width: 100%; }

.flatpickr-day {
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--gf-text);
  max-width: none;
}

.flatpickr-day.today {
  border-color: var(--gf-accent);
}

.flatpickr-day:hover,
.flatpickr-day:focus {
  background: var(--gf-accent-light);
  border-color: var(--gf-accent-light);
  color: var(--gf-accent-soft);
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
  background: var(--gf-accent);
  border-color: var(--gf-accent);
  color: #fff;
  box-shadow: 0 4px 10px rgba(214, 131, 82, 0.35);
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: var(--gf-muted);
  opacity: 0.55;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: var(--gf-muted);
  opacity: 0.35;
  cursor: not-allowed;
}

.numInputWrapper:hover { background: transparent; }

.flatpickr-innerContainer,
.flatpickr-rContainer { width: 100%; }

.form-a-radio,
.form-a-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 10px 0;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.12s ease;
  font-size: 17px;
}

.form-a-radio:hover,
.form-a-check:hover {
  background: var(--gf-accent-light);
}

.form-a-radio input,
.form-a-check input {
  margin-top: 3px;
  accent-color: #D68352;
}

.form-a-error {
  color: #d93025;
  font-size: 14px;
  font-weight: 500;
  margin-top: 10px;
  display: none;
}

.form-a-card.is-invalid .form-a-error,
.form-a-field.is-invalid .form-a-error {
  display: block;
}

.form-a-card.is-invalid,
.form-a-field.is-invalid {
  outline: 1.5px solid #d93025;
  outline-offset: -1px;
  background: #fff8f7;
}

.form-a-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.form-a-nav__spacer { flex: 1; }

.form-a-btn {
  appearance: none;
  border: 1.5px solid var(--gf-border);
  background: #fff;
  color: #D68352;
  border-radius: 8px;
  padding: 12px 24px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.form-a-btn:hover {
  background: var(--gf-accent-light);
  border-color: #D68352;
}

.form-a-btn--submit {
  background: #D68352;
  border-color: #D68352;
  color: #fff;
}

.form-a-btn--submit:hover {
  background: var(--gf-accent-soft);
  border-color: var(--gf-accent-soft);
}

.form-a-btn--danger {
  background: #d93025;
  border-color: #d93025;
  color: #fff;
}

.form-a-btn--danger:hover {
  background: #b3261e;
  border-color: #b3261e;
}

.form-a-clear {
  color: var(--gf-muted);
  background: none;
  border: none;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  padding: 8px;
}

.form-a-clear:hover {
  color: #D68352;
  text-decoration: underline;
}

.form-a-help {
  color: var(--gf-muted);
  font-size: 14.5px;
  margin-top: 8px;
  line-height: 1.55;
}

.form-a-file {
  margin-top: 14px;
  position: relative;
}

.form-a-file__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 112px;
  padding: 20px 16px;
  border: 1.5px dashed var(--gf-border);
  border-radius: 12px;
  background: #fbf8f6;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}

.form-a-file__box:hover,
.form-a-file.is-dragover .form-a-file__box {
  border-color: #D68352;
  background: var(--gf-accent-light);
  box-shadow: 0 0 0 3px rgba(214, 131, 82, 0.12);
}

.form-a-file__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--gf-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D68352;
}

.form-a-file__icon svg {
  width: 20px;
  height: 20px;
}

.form-a-file__title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--gf-text);
}

.form-a-file__title span {
  color: #D68352;
}

.form-a-file__hint {
  font-size: 13.5px;
  color: var(--gf-muted);
}

.form-a-file input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

.form-a-file-name {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef7f0;
  border: 1px solid #cfe8d4;
  color: #1f6b3a;
  font-size: 14.5px;
  font-weight: 500;
  word-break: break-all;
}

.form-a-file-name[hidden] {
  display: none;
}

.is-invalid .form-a-file__box {
  border-color: #d93025;
  background: #fff5f4;
}

.form-a-member {
  margin-top: 16px;
  border: 1px solid var(--gf-border);
  border-radius: var(--gf-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--gf-shadow);
}

.form-a-member__title {
  background: #D68352;
  color: #fff;
  font-size: 16.5px;
  font-weight: 600;
  padding: 12px 20px;
}

.form-a-member__body {
  padding: 4px 12px 14px;
  background: #fbf8f6;
}

.form-a-member__body .form-a-card {
  margin-top: 10px;
  box-shadow: none;
}

.form-a-list {
  margin: 8px 0 0 18px;
  padding: 0;
  color: var(--gf-text);
  font-size: 15.5px;
}

.form-a-other {
  margin-top: 8px;
  margin-left: 28px;
}

.form-a-alert {
  border-left: 4px solid #d93025;
}

.form-a-alert ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.form-a-thanks {
  text-align: left;
}

.form-a-thanks h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--gf-text);
}

.form-a-thanks__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 28px;
}

.form-a-thanks__links a {
  color: #D68352;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(214, 131, 82, 0.35);
  padding-bottom: 1px;
}

.form-a-thanks__links a:hover {
  border-bottom-color: #D68352;
}

.form-a-thanks__sep {
  color: var(--gf-muted);
  font-weight: 400;
}

/* Upload overlay */
.form-a-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(43, 35, 32, 0.48);
  backdrop-filter: blur(3px);
}

.form-a-overlay[hidden] {
  display: none !important;
}

.form-a-overlay__card {
  width: min(400px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 28px 26px 24px;
  text-align: center;
  box-shadow: 0 18px 48px rgba(36, 27, 22, 0.22);
}

.form-a-overlay__title {
  margin: 16px 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: var(--gf-text);
}

.form-a-overlay__text {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--gf-muted);
}

.form-a-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid var(--gf-accent-light);
  border-top-color: #D68352;
  animation: form-a-spin 0.8s linear infinite;
}

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

.form-a-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #efe6df;
  overflow: hidden;
}

.form-a-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #D68352, #e09a6d);
  transition: width 0.28s ease;
}

/* Clear confirm modal */
.form-a-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.form-a-modal[hidden] {
  display: none !important;
}

.form-a-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 35, 32, 0.45);
}

.form-a-modal__dialog {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 26px 24px 20px;
  box-shadow: 0 18px 48px rgba(36, 27, 22, 0.22);
}

.form-a-modal__dialog h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 600;
}

.form-a-modal__dialog p {
  margin: 0;
  color: var(--gf-muted);
  font-size: 15.5px;
  line-height: 1.55;
}

.form-a-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 640px) {
  .form-a-shell {
    width: calc(100% - 16px);
    padding-bottom: 56px;
  }

  body.form-a-body { font-size: 16px; }
  .form-a-title { font-size: 26px; }
  .form-a-label { font-size: 18px; }
  .form-a-intro { font-size: 16px; }
  .form-a-card { padding: 16px; }
  .form-a-progress {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .form-a-section-bar { padding: 12px 16px; font-size: 17px; }
  .form-a-section-body { padding: 14px 16px 18px; font-size: 15.5px; }
  .form-a-radio,
  .form-a-check { font-size: 16px; }

  .form-a-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .form-a-nav__spacer {
    display: none;
  }

  .form-a-clear {
    flex-basis: 100%;
    width: auto;
    text-align: center;
    padding: 8px;
    margin-top: 12px;
  }

  .form-a-member__body {
    padding: 4px 8px 12px;
  }

  .form-a-thanks__links {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .form-a-thanks__sep {
    display: none;
  }

  .form-a-modal__actions {
    flex-direction: column-reverse;
  }

  .form-a-modal__actions .form-a-btn {
    width: 100%;
  }
}

@media (max-width: 400px) {
  .form-a-label { font-size: 17px; }
  .form-a-banner__logo {
    height: 56px;
    max-width: 200px;
  }
}

@media (min-width: 1024px) {
  .form-a-shell {
    width: min(760px, calc(100% - 32px));
  }
}
