.cf-page .cf-container {
  max-width: 820px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
}

.cf-form {
  display: grid;
  gap: 1.25rem;
  background: #fff;
  border: 1px solid var(--line, #d8dee8);
  border-radius: 0.5rem;
  padding: 1.25rem;
}

.cf-section {
  display: grid;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line, #d8dee8);
}

.cf-section:last-of-type {
  border-bottom: 0;
}

.cf-section h2 {
  margin: 0;
  color: var(--primary, #003366);
  font-size: 1.15rem;
}

.cf-field {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.cf-field-note {
  display: block;
  font-weight: 400;
  font-size: 0.9rem;
  color: #5a6573;
  line-height: 1.4;
}

.cf-field input:not([type="radio"]):not([type="checkbox"]),
.cf-field textarea,
.cf-field select {
  font-weight: 400;
  width: 100%;
  border: 1px solid var(--line, #d8dee8);
  border-radius: 0.35rem;
  padding: 0.55rem 0.65rem;
  font: inherit;
}

.cf-field input[type="radio"],
.cf-field input[type="checkbox"] {
  width: auto;
  margin: 0.15rem 0 0;
  flex-shrink: 0;
}

.cf-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 400;
  line-height: 1.45;
  cursor: pointer;
}

.cf-checkbox input[type="checkbox"] {
  margin-top: 0.2rem;
}

.cf-radio legend,
.cf-payment-method legend,
.cf-fee-selector legend {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.cf-radio-opt {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: 400;
  margin: 0.25rem 0;
  cursor: pointer;
}

.cf-payment-method,
.cf-radio,
.cf-fee-selector {
  display: block;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.cf-payment-method .cf-radio-opt,
.cf-radio .cf-radio-opt,
.cf-fee-selector .cf-radio-opt {
  align-items: center;
}

.cf-coupon-status {
  margin: 0.25rem 0 0;
  font-weight: 400;
  font-size: 0.9rem;
}

.cf-coupon-status.is-valid {
  color: #1b7a3d;
}

.cf-coupon-status.is-invalid {
  color: #b42318;
}

.cf-conditional.cf-hidden {
  display: none !important;
}

.cf-step-hidden {
  display: none;
}

.cf-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.cf-step-indicator {
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #556;
}

.cf-step-indicator.is-active {
  background: var(--primary, #003366);
  color: #fff;
}

.cf-step-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.cf-errors {
  background: #fde8e8;
  border: 1px solid #e8b4b4;
  color: #8a1f1f;
  padding: 0.75rem 1rem;
  border-radius: 0.35rem;
  margin-bottom: 1rem;
}

.cf-errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.cf-fee-total {
  font-size: 1.1rem;
  padding: 0.75rem;
  background: #f4f8fc;
  border-radius: 0.35rem;
}

.cf-payment-redirect {
  text-align: center;
}

.cf-payment-redirect .cf-note {
  font-weight: 400;
  color: #445;
}

.cf-payment-instructions {
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cf-payment-note {
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #445;
  margin-top: 0.35rem;
}

.cf-payment-note p {
  margin: 0;
}

.cf-heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
}

.cf-paragraph {
  margin: 0 0 0.85rem;
  font-weight: 400;
  line-height: 1.55;
  color: #334;
}

.cf-paragraph ul,
.cf-paragraph ol {
  margin: 0.25rem 0 0;
  padding-left: 1.35rem;
}

.cf-paragraph li {
  margin: 0.3rem 0;
}

.cf-paragraph p {
  margin: 0 0 0.55rem;
}

.cf-paragraph p:last-child {
  margin-bottom: 0;
}

.cf-continue-error {
  margin: 0.35rem 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e8b4b4;
  border-radius: 0.35rem;
  background: #fdf2f2;
  color: #8a1f1f;
  font-weight: 400;
  line-height: 1.45;
}

.cf-continue-error[hidden] {
  display: none !important;
}

.cf-next.is-disabled,
.cf-next:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.cf-word-limit-warning {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: #b42318;
}

.cf-form textarea.cf-word-limit-exceeded {
  border-color: #d92d20;
}

.cf-compress-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
}

.cf-compress-overlay[hidden] {
  display: none !important;
}

.cf-compress-dialog {
  width: min(420px, calc(100vw - 2rem));
  background: #fff;
  border-radius: 0.5rem;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.cf-compress-label {
  margin: 0 0 0.85rem;
  font-weight: 600;
  color: #123;
}

.cf-compress-track {
  height: 0.65rem;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}

.cf-compress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary, #003366);
  transition: width 0.15s ease;
}

.cf-compress-pct {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: #556;
  text-align: right;
}

.cf-heading a,
.cf-checkbox a,
.cf-field a {
  color: var(--primary, #003366);
  text-decoration: underline;
  font-weight: 400;
}

.cf-html {
  font-weight: 400;
  line-height: 1.55;
}

.cf-file-existing {
  margin: 0;
  font-weight: 400;
  color: #1f5f2e;
  background: #edf7ef;
  border: 1px solid #b8dcc0;
  border-radius: 0.35rem;
  padding: 0.45rem 0.65rem;
}

.cf-file-replace-note {
  margin: 0;
  font-weight: 400;
  font-size: 0.9rem;
  color: #5a6573;
}

.cf-captcha {
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

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

.cf-phone-intl-label,
.cf-signature-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.cf-phone-intl-row {
  display: grid;
  grid-template-columns: minmax(11rem, 0.9fr) minmax(8rem, 1.1fr);
  gap: 0.65rem;
  align-items: stretch;
}

.cf-phone-area-wrap,
.cf-phone-local-wrap {
  display: block;
  margin: 0;
}

.cf-phone-intl select,
.cf-phone-intl input[type="tel"] {
  width: 100%;
}

.cf-signature-hint {
  margin: 0 0 0.5rem;
  font-weight: 400;
  font-size: 0.92rem;
  color: #5a6573;
}

.cf-signature-pad-wrap {
  border: 1px solid #c9d4e4;
  border-radius: 0.35rem;
  background: #fff;
  overflow: hidden;
  touch-action: none;
}

.cf-signature-canvas {
  display: block;
  width: 100%;
  height: 180px;
  cursor: crosshair;
  touch-action: none;
  background: #fff;
}

.cf-signature-actions {
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .cf-phone-intl-row {
    grid-template-columns: 1fr;
  }
}

.cf-form .captcha-field {
  display: grid;
  gap: 0.35rem;
}

.cf-form .captcha-field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334d73;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cf-form .captcha-row {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
}

.cf-form .captcha-image {
  flex: 0 0 auto;
  width: 140px;
  height: 44px;
  border: 1px solid #c9d4e4;
  border-radius: 0.25rem;
  background: #eef2f8;
}

.cf-form .captcha-field input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: none;
  font-weight: 400;
  border: 1px solid var(--line, #d8dee8);
  border-radius: 0.35rem;
  padding: 0.55rem 0.65rem;
  font: inherit;
}

.filter-bar .inline-form {
  display: inline-flex;
  margin: 0;
}

.cf-complete-enquiries {
  margin-top: 1.5rem;
  line-height: 1.55;
}

.cf-complete-enquiries p {
  margin: 0;
}

.cf-complete-enquiries a {
  color: var(--primary, #003366);
}

.schema-editor textarea {
  min-height: 320px;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}
