/* FCT forms + careers — complements the theme (main.css owns .field, .input, .btn, .notice, .check, .job-card).
   Base rules use :where() (zero specificity) so the theme always wins; they only matter without the FCT theme. */

/* ---------- Fallback base (no FCT theme) ---------- */
:where(.fct-form-wrap, .fct-jobs, .fct-job-detail) { --fct-teal: var(--teal-700, #0E6E64); --fct-ink: var(--ink-900, #22302C); --fct-muted: var(--ink-500, #55655F); --fct-line: var(--line, #E4DECF); --fct-border: var(--field-border, #7C8A85); --fct-err: #B3261E; --fct-focus: var(--focus, #0B57D0); }
:where(.fct-form-wrap) :where(.field) { margin-bottom: 20px; }
:where(.fct-form-wrap) :where(.field > label, .fieldset > legend, .fct-field > legend) { display: block; font-weight: 700; margin-bottom: 8px; color: var(--fct-ink); }
:where(.fct-form-wrap) :where(.input) { display: block; width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; color: var(--fct-ink); background: #fff; border: 1.5px solid var(--fct-border); border-radius: 10px; box-sizing: border-box; }
:where(.fct-form-wrap) :where(textarea.input) { min-height: 120px; resize: vertical; }
:where(.fct-form-wrap) :where(.input:focus) { outline: 3px solid rgba(11, 87, 208, .35); outline-offset: 1px; border-color: var(--fct-focus); }
:where(.fct-form-wrap) :where(.field-row) { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
:where(.fct-form-wrap) :where(.req) { color: var(--coral-text, #A33A0F); margin-left: 3px; }
:where(.fct-form-wrap, .fct-jobs, .fct-job-detail) :where(.notice) { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; border: 1.5px solid #E9CE94; background: #FBF0DA; color: #5E3C06; }
:where(.fct-form-wrap, .fct-jobs, .fct-job-detail) :where(.notice.teal) { background: #F1F8F6; border-color: #BCD9D3; color: #0A4F48; }
:where(.fct-form-wrap, .fct-jobs, .fct-job-detail) :where(.btn) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 2px solid transparent; font: 700 1rem/1.2 inherit; text-decoration: none; cursor: pointer; }
:where(.fct-form-wrap, .fct-jobs, .fct-job-detail) :where(.btn-teal) { background: var(--fct-teal); color: #fff; }
:where(.fct-form-wrap, .fct-jobs, .fct-job-detail) :where(.btn-coral) { background: var(--coral-700, #C2410C); color: #fff; }
:where(.fct-form-wrap, .fct-jobs, .fct-job-detail) :where(.btn-outline) { background: transparent; border-color: var(--fct-teal); color: var(--fct-teal); }
:where(.fct-form-wrap) :where(.check) { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
:where(.fct-form-wrap) :where(.check input) { width: 22px; height: 22px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--fct-teal); }
:where(.fct-form-wrap) :where(.check-grid) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
:where(.fct-form-wrap) :where(.fieldset) { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
:where(.fct-form-wrap) :where(.errmsg) { display: flex; gap: 7px; align-items: center; margin-top: 7px; font-weight: 600; font-size: .9375rem; color: var(--fct-err); }
:where(.fct-form-wrap) :where(.field.err .input) { border-color: var(--fct-err); border-width: 2px; }
:where(.fct-form-wrap) :where(.fct-hp) { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
:where(.fct-form-wrap, .fct-jobs, .fct-job-detail) :where(.screen-reader-text) { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Shared form additions ---------- */
.fct-form-wrap [hidden] { display: none !important; }
.fct-form-title { margin: 0 0 8px; }
.fct-form-intro { margin: 0 0 18px; color: var(--ink-500, #55655F); }
.fct-required-note { font-size: .9375rem; color: var(--ink-500, #55655F); margin: 0 0 18px; }
.fct-form-wrap .help { font-size: .9375rem; color: var(--ink-500, #55655F); margin: -2px 0 8px; line-height: 1.45; }
.fct-form-wrap .field-check .help { margin: 6px 0 0 32px; }
.fct-form-wrap .fct-sign-date { margin: 8px 0 0; }
.fct-form-wrap .check { min-height: 44px; align-items: center; }
.fct-form-wrap .check input { margin-top: 0; }
.fct-form-wrap .check a { text-decoration: underline; font-weight: 700; }
.fct-form-wrap .check-grid.is-inline { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.fct-form-wrap .fct-choice:focus { outline: none; }
.fct-form-wrap .fct-file { padding: 10px 12px; min-height: 52px; cursor: pointer; }
.fct-form-wrap .fct-file::file-selector-button { margin-right: 12px; min-height: 36px; padding: 6px 14px; border: 1.5px solid var(--teal-700, #0E6E64); border-radius: 999px; background: #fff; color: var(--teal-800, #0D5F57); font: 700 .9375rem/1 inherit; cursor: pointer; }
.fct-form-wrap .fct-readonly, .fct-form-wrap .fct-copied { background: var(--teal-50, #F1F8F6); }
.fct-form-wrap .errmsg .fct-err-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #B3261E; color: #fff; font-size: 12px; line-height: 1; flex-shrink: 0; }
.fct-form-wrap fieldset.field.err { border-left: 3px solid #B3261E; padding-left: 12px; }

/* Error summary */
.fct-form-wrap .fct-error-summary { margin-bottom: 20px; border-color: #B3261E; background: #FDF0EF; color: #5C1612; }
.fct-form-wrap .fct-error-summary:focus { outline: 3px solid rgba(179, 38, 30, .4); outline-offset: 2px; }
.fct-form-wrap .fct-error-summary p { margin: 0; }
.fct-form-wrap .fct-error-list { margin: 8px 0 0; padding-left: 20px; }
.fct-form-wrap .fct-error-list li { margin: 4px 0; }
.fct-form-wrap .fct-error-list a { color: #8C1D18; text-decoration: underline; font-weight: 600; }
.fct-form-wrap .fct-success:focus { outline: 3px solid rgba(14, 110, 100, .35); outline-offset: 2px; }

/* Groups inside a step (e.g. Scheduling / Billing / Signer) */
.fct-group { border: 0; border-top: 1px solid var(--line, #E4DECF); margin: 8px 0 0; padding: 18px 0 0; min-width: 0; }
.fct-group:first-child { border-top: 0; padding-top: 0; }
.fct-group-title { font: 700 1.0625rem/1.3 "Montserrat", "Noto Sans", Arial, sans-serif; color: var(--teal-900, #0A4F48); padding: 0; margin: 0 0 6px; }
.fct-group-help { margin: 0 0 14px !important; }

/* ---------- Multi-step ---------- */
.fct-step { border: 0; margin: 0; padding: 0; }
.fct-form.is-steps .fct-step + .fct-step { margin-top: 28px; padding-top: 24px; border-top: 2px solid var(--line, #E4DECF); }
.fct-form.is-enhanced.is-steps .fct-step + .fct-step { margin-top: 0; padding-top: 0; border-top: 0; }
.fct-step-title { display: flex; flex-direction: column; gap: 2px; font-size: 1.375rem; margin: 0 0 18px; }
.fct-step-title:focus { outline: 3px solid rgba(11, 87, 208, .35); outline-offset: 4px; border-radius: 4px; }
.fct-step-count { font: 700 .8125rem/1.2 "Montserrat", "Noto Sans", Arial, sans-serif; letter-spacing: .6px; text-transform: uppercase; color: var(--coral-text, #A33A0F); }
.fct-step-nav { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.fct-step-nav .fct-next, .fct-step-nav .fct-submit { margin-left: auto; }
.fct-step-nav .cf-turnstile { flex-basis: 100%; }
.fct-progress { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; counter-reset: none; }
.fct-progress li { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; font-weight: 600; color: var(--ink-500, #55655F); padding-top: 10px; border-top: 4px solid var(--line, #E4DECF); }
.fct-progress li.is-done { border-top-color: var(--teal-600, #158577); color: var(--teal-800, #0D5F57); }
.fct-progress li.is-current { border-top-color: var(--coral-700, #C2410C); color: var(--ink-900, #22302C); }
.fct-progress-num { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; background: var(--line, #E4DECF); color: var(--ink-900, #22302C); font-size: .8125rem; }
.fct-progress li.is-done .fct-progress-num { background: var(--teal-700, #0E6E64); color: #fff; }
.fct-progress li.is-current .fct-progress-num { background: var(--coral-700, #C2410C); color: #fff; }

/* ---------- Careers ---------- */
.fct-jobs-head { margin-bottom: 22px; }
.fct-jobs-title { margin: 10px 0 0; }
.fct-job-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.fct-job-card-title { margin: 0; font-size: 1.25rem; }
.fct-job-card-title a { color: inherit; text-decoration: none; }
.fct-job-card-title a:hover, .fct-job-card-title a:focus { text-decoration: underline; }
.fct-job-excerpt { margin: 12px 0 0; color: var(--ink-500, #55655F); max-width: 600px; }
.fct-jobs-empty { margin-bottom: 18px; }
.fct-jobs-empty a { text-decoration: underline; font-weight: 700; }
.fct-general-apply { margin-top: 24px; }
.fct-general-apply > summary { list-style: none; display: inline-flex; }
.fct-general-apply > summary::-webkit-details-marker { display: none; }
.fct-general-apply-body { margin-top: 18px; background: #fff; border: 1px solid var(--line, #E4DECF); border-radius: var(--radius-lg, 20px); padding: 28px; }
:where(.fct-jobs, .fct-job-detail) :where(.job-tags) { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
:where(.fct-jobs, .fct-job-detail) :where(.job-tag) { font-size: .875rem; font-weight: 700; color: var(--teal-800, #0D5F57); background: var(--teal-100, #E3F1EE); padding: 5px 12px; border-radius: 999px; }
:where(.fct-jobs) :where(.job-card) { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: #fff; border: 1px solid var(--line, #E4DECF); border-radius: 20px; padding: 26px 30px; }

.fct-job-detail .fct-job-title { margin: 0 0 6px; }
.fct-job-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 22px 0; padding: 0; }
.fct-job-facts > div { background: var(--teal-50, #F1F8F6); border: 1px solid var(--line, #E4DECF); border-radius: 14px; padding: 14px 16px; }
.fct-job-facts dt { font: 700 .8125rem/1.2 "Montserrat", "Noto Sans", Arial, sans-serif; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-500, #55655F); }
.fct-job-facts dd { margin: 4px 0 0; font-weight: 700; color: var(--ink-900, #22302C); }
.fct-job-cta { margin: 0 0 24px; }
.fct-job-content { margin-bottom: 28px; }
.fct-job-reqs { margin-bottom: 32px; }
.fct-job-reqs ul { list-style: none; padding: 0; }
.fct-job-reqs li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.fct-job-reqs li svg { width: 21px; height: 21px; flex-shrink: 0; margin-top: 3px; color: var(--teal-700, #0E6E64); }
.fct-job-apply { scroll-margin-top: 110px; background: #fff; border: 1px solid var(--line, #E4DECF); border-radius: var(--radius-lg, 20px); padding: 30px; }
.fct-job-apply > h2, .fct-job-apply > h3 { margin-top: 0; }
.fct-job-closed a { text-decoration: underline; font-weight: 700; }

@media (max-width: 640px) {
  :where(.fct-form-wrap) :where(.field-row) { grid-template-columns: 1fr; gap: 0; }
  .fct-form-wrap .check-grid { grid-template-columns: minmax(0, 1fr); }
  .fct-progress-label { font-size: .75rem; }
  .fct-step-nav .btn { flex: 1 1 100%; }
  .fct-step-nav .fct-next, .fct-step-nav .fct-submit { margin-left: 0; }
  :where(.fct-jobs) :where(.job-card) { flex-direction: column; align-items: flex-start; padding: 24px 22px; }
  .fct-job-card .btn { width: 100%; }
  .fct-job-apply, .fct-general-apply-body { padding: 20px 16px; }
}

/* High contrast mode (theme toggle) */
html.fct-hc .fct-progress li, html.fct-hc .fct-job-facts > div, html.fct-hc .fct-job-apply, html.fct-hc .fct-general-apply-body, html.fct-hc .fct-form-wrap .fct-error-summary { background: #000 !important; color: #fff !important; border-color: #fff !important; }
html.fct-hc .fct-form-wrap .fct-error-list a { color: #FFE600 !important; }
@media (prefers-reduced-motion: reduce) { .fct-form-wrap * { scroll-behavior: auto !important; } }

/* Buttons inside post content (job pages render inside .entry-content, whose link colors would otherwise win) */
.fct-job-detail a.btn, .fct-jobs a.btn, .fct-form-wrap a.btn { text-decoration: none; }
.fct-job-detail a.btn-teal, .fct-jobs a.btn-teal, .fct-job-detail a.btn-teal:hover, .fct-jobs a.btn-teal:hover { color: #fff; }
.fct-job-detail .btn svg, .fct-jobs .btn svg { color: currentColor; }
/* The client-side summary is a single block (the theme's .notice is a flex row) */
.fct-form-wrap .fct-client-summary { display: block; }
.fct-form-wrap .check > span { line-height: 1.45; }
