/* Forms styling. Every value comes from the design tokens in
   theme/dfc/assets/css/dfc-tokens.css — see docs/design-system.md §1 and §11.
   Migrated 2026-08-08: this file previously carried 74 raw hex values and asked
   for Oswald and PT Serif, which were retired when the type system changed, so
   every form on the site was silently rendering in Arial and Georgia. */
/* MP DFC Forms — vanilla, no framework. DFC palette: navy var(--color-navy), yellow var(--color-yellow), blue var(--color-sky) */

/* Theme renders an entry-header on the Careers page that conflicts with our in-content "Current Openings" h2. Hide it whenever the apply-button shortcode is present. */
body.dfc-has-apply-button .entry-header,
body.dfc-has-apply-button h1.entry-title,
body.dfc-has-apply-button .page-header { display: none !important; }


.dfc-apply-wrap {
    display: inline-block;
}

/* Appearance comes from .dfc-btn / .dfc-btn--secondary in the theme's brand.css,
   so this trigger cannot drift from the rest of the site's buttons. What stays
   here is only the bit .dfc-btn does not do: lay the label and the arrow out on
   a row. Compounded onto .dfc-btn so it wins whichever order the two
   stylesheets load in.
   Removed 2026-09-04: a private font-weight/size/padding/radius set that made
   this the only button on the site at 500 weight, 0.95rem, a 10px radius and no
   44px touch target; a :hover that jumped to sky, which is in no button variant;
   and outline:none on :focus, which deleted the focus indicator (WCAG 2.4.7).
   Navy hover is now var(--color-navy-hover), 8.31:1 against a white label. */
.dfc-btn.dfc-apply-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background 0.15s ease;
}
.dfc-apply-arrow {
    display: inline-block;
    transition: transform 0.15s ease;
}
.dfc-apply-trigger:hover .dfc-apply-arrow {
    transform: translateX(3px);
}

/* The inline variant: an email address in the middle of a sentence that opens
   the same modal. It has to read as prose, not as a control, so it takes the
   body link treatment (navy, underlined) and inherits size and family from
   whatever paragraph it lands in. Deliberately NOT .dfc-btn — the button
   appearance above is compounded onto .dfc-btn precisely so this can share the
   .dfc-apply-trigger JS hook without inheriting a button's look. */
.dfc-inline-trigger {
    display: inline;
    font: inherit;
    color: var(--color-navy);
    text-decoration: underline;
    text-underline-offset: .18em;
    cursor: pointer;
}
.dfc-inline-trigger:hover {
    color: var(--color-navy-hover);
    text-decoration: underline;
}
.dfc-inline-trigger:focus-visible {
    outline: 2px solid var(--color-navy);
    outline-offset: 2px;
}

.dfc-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4vh 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.dfc-modal[hidden] {
    display: none !important;
}
.dfc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 50, 94, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1;
}
.dfc-modal-panel {
    position: relative;
    z-index: 2;
    background: var(--color-white);
    border-radius: 14px;
    max-width: 720px;
    width: 100%;
    padding: 1.75rem 1.75rem 1.5rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    font-family: var(--font-body);
}

.dfc-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: transparent;
    border: 0;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--color-navy);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
.dfc-modal-close:hover { color: var(--color-sky); }

.dfc-modal-header h2 {
    font-family: var(--font-label);
    font-weight: 600;
    /* --text-2xl (28px), not 1.5rem. The design system's h2 scale is 28-40px and
       24px sat under it, which the rendered audit fails on any page where a
       modal header is measured. 28px is the bottom of the range, so the modal
       heading stays the smallest h2 on the site without being off-scale. */
    font-size: var(--text-2xl);
    color: var(--color-navy);
    margin: 0 0 0.35rem 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.dfc-modal-subhead {
    color: var(--color-muted);
    font-size: var(--text-base);
    margin: 0 0 1.25rem 0;
}

.dfc-form { display: block; }
.dfc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.85rem;
}
@media (max-width: 560px) {
    .dfc-row { grid-template-columns: 1fr; }
}

.dfc-field {
    display: block;
    margin-bottom: 0.85rem;
}
.dfc-field label {
    display: block;
    font-family: var(--font-label);
    font-weight: 500;
    color: var(--color-navy);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.dfc-req { color: var(--color-error); }
.dfc-optional {
    text-transform: none;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--color-muted);
}
.dfc-field-hint {
    display: block;
    text-transform: none;
    font-weight: 400;
    color: var(--color-muted);
    font-size: 0.78rem;
    margin-top: 2px;
}

.dfc-field input[type="text"],
.dfc-field input[type="email"],
.dfc-field input[type="tel"],
.dfc-field textarea,
.dfc-field input[type="file"],
.dfc-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--color-border-strong);
    border-radius: 8px;
    font: inherit;
    color: var(--color-text);
    background: var(--color-off-white);
    transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.dfc-field textarea { min-height: 120px; resize: vertical; }
.dfc-field input:focus,
.dfc-field textarea:focus {
    outline: none;
    border-color: var(--color-sky);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(40, 168, 224, 0.15);
}

.dfc-field.dfc-error input,
.dfc-field.dfc-error textarea,
.dfc-field.dfc-error select {
    border-color: var(--color-error);
    background: var(--color-error-tint);
}
.dfc-field .dfc-error-message {
    color: var(--color-error);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.dfc-fieldset {
    border: 1px dashed var(--color-border-strong);
    border-radius: 10px;
    padding: 0.85rem 1rem 0.25rem;
    margin: 0 0 1rem 0;
}
.dfc-fieldset legend {
    font-family: var(--font-label);
    color: var(--color-navy);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dfc-turnstile-wrap { min-height: 70px; }

.dfc-file-policy {
    font-size: 0.8rem;
    color: var(--color-muted);
    background: var(--color-gray-light);
    border-left: 3px solid var(--color-yellow);
    padding: 0.6rem 0.85rem;
    border-radius: 0 6px 6px 0;
    margin: 0.5rem 0 1rem;
}

.dfc-form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.dfc-submit {
    background: var(--color-navy);
    color: var(--color-white);
    font-family: var(--font-label);
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s ease;
}
.dfc-submit:hover { background: var(--color-sky); }
.dfc-submit[disabled] { opacity: 0.65; cursor: progress; }

.dfc-cancel {
    background: transparent;
    color: var(--color-navy);
    border: 1px solid var(--color-border-strong);
    border-radius: 10px;
    padding: 0.75rem 1.2rem;
    cursor: pointer;
    font-family: var(--font-label);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.9rem;
}
.dfc-cancel:hover { background: var(--color-gray-light); }

.dfc-form-status {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
}
.dfc-form-status.dfc-status-success {
    background: var(--color-success-tint);
    color: var(--color-success);
    border-left: 4px solid var(--color-success);
}
.dfc-form-status.dfc-status-error {
    background: var(--color-error-tint);
    color: var(--color-error);
    border-left: 4px solid var(--color-error);
}

/* DFC Careers card layout. Standalone — used on the Careers page content. */
.dfc-careers-section { max-width: 1100px; margin: 0 auto; padding: 0 1rem; font-family: var(--font-body); }
.dfc-careers-header { text-align: center; padding: 3rem 1rem 1rem; }
.dfc-careers-header h2 {
    font-family: var(--font-label);
    font-weight: 700;
    font-size: 2.75rem;
    color: var(--color-navy);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 0.5rem;
}
.dfc-careers-header p { color: var(--color-muted); font-size: 1.05rem; margin: 0 auto 1rem; max-width: 540px; }
.dfc-location-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-warning-tint);
    color: var(--color-navy);
    border-radius: 999px;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    margin: 0.5rem auto 2rem;
    max-width: 720px;
}
.dfc-location-pill strong { color: var(--color-navy); }
.dfc-location-pill svg { width: 18px; height: 18px; fill: var(--color-navy); flex-shrink: 0; }

.dfc-job-card {
    background: var(--color-white);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(26, 50, 94, 0.08);
    padding: 2.25rem 2.25rem 2rem;
    margin: 0 auto 2rem;
    max-width: 880px;
}
.dfc-job-card h3 {
    font-family: var(--font-label);
    font-weight: 700;
    font-size: 2rem;
    color: var(--color-navy);
    margin: 0 0 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.dfc-careers-section .dfc-job-meta {
    display: flex !important;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    color: var(--color-navy);
    font-family: var(--font-label);
    font-size: 1rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.1rem;
    align-items: center;
    line-height: 1.2;
}
.dfc-careers-section .dfc-job-meta span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    line-height: 1.2;
    white-space: nowrap;
}
.dfc-careers-section .dfc-job-meta svg {
    width: 18px;
    height: 18px;
    fill: var(--color-sky);
    flex-shrink: 0;
    vertical-align: middle;
    display: inline-block;
}

.dfc-job-summary {
    color: var(--color-text);
    font-size: 1.02rem;
    line-height: 1.55;
    margin: 0 0 1rem;
}

/* Always-visible Position Summary content (sits directly inside .dfc-job-card) */
.dfc-job-card > h4,
.dfc-job-section-heading {
    font-family: var(--font-label);
    color: var(--color-navy);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 1.25rem 0 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.dfc-job-card > p {
    color: var(--color-text);
    font-size: 1.02rem;
    line-height: 1.6;
    margin: 0 0 0.95rem;
}
.dfc-job-bullets {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}
.dfc-job-bullets li {
    display: flex;
    gap: 0.65rem;
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.45;
    margin-bottom: 0.6rem;
}
.dfc-job-bullets li::before {
    content: "\2713";
    color: var(--color-sky);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.dfc-job-toggle {
    background: transparent;
    border: 0;
    color: var(--color-sky);
    font-family: var(--font-label);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem 0;
    margin-bottom: 1.25rem;
}
.dfc-job-toggle:hover { color: var(--color-navy); }
.dfc-job-toggle::after { content: " \25BC"; font-size: 0.8em; }
.dfc-job-toggle.is-open::after { content: " \25B2"; }

.dfc-job-full { display: none; }
.dfc-job-full.is-open { display: block; }
.dfc-job-full h4 {
    font-family: var(--font-label);
    color: var(--color-navy);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 1rem 0 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
/* --text-base (16px), not 0.98rem. 15.68px is under the 16-18px the body scale
   allows, and an arbitrary 0.98 multiplier is exactly the kind of off-token
   value the audit exists to catch. */
.dfc-job-full p, .dfc-job-full ul { color: var(--color-text); font-size: var(--text-base); line-height: 1.55; }
.dfc-job-full ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.dfc-job-full ul li { margin-bottom: 0.35rem; }

.dfc-job-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}
.dfc-job-footer .dfc-questions { color: var(--color-muted); font-size: 0.95rem; }
.dfc-job-footer .dfc-questions a { color: var(--color-sky); text-decoration: underline; }

body.dfc-modal-open { overflow: hidden; }

/* Inline contact form (card) */
.dfc-contact-form-wrap {
    background: var(--color-white);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(26, 50, 94, 0.08);
    padding: 2rem 2rem 1.75rem;
    max-width: 720px;
    margin: 0 auto;
    font-family: var(--font-body);
}
.dfc-contact-heading {
    font-family: var(--font-label);
    font-weight: 700;
    font-size: 1.85rem;
    color: var(--color-navy);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 1.25rem;
}
@media (max-width: 560px) {
    .dfc-contact-form-wrap { padding: 1.5rem 1.25rem; }
}

/* Site-wide promo bar (renders via wp_body_open) */
.dfc-promo-bar {
    background: var(--color-sky);
    color: var(--color-navy);        /* 4.72:1 on sky. Was #000, off-brand. */
    position: relative;
    z-index: var(--z-sticky);
    font-family: var(--font-label);
    font-size: 0.95rem;
    line-height: 1.3;
    letter-spacing: 0.02em;
    border-bottom: 2px solid var(--color-sky-hover);
}
.dfc-promo-bar[hidden] { display: none !important; }
.dfc-promo-bar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.7rem 3rem 0.7rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    flex-wrap: wrap;
    text-align: center;
}
.dfc-promo-bar-text { font-weight: 400; }
.dfc-promo-bar-text strong { font-weight: 700; }
.dfc-promo-bar-cta {
    display: inline-block;
    background: var(--color-navy);
    color: var(--color-white) !important;
    padding: 0.45rem 1.15rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.82rem;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.dfc-promo-bar-cta:hover,
.dfc-promo-bar-cta:focus {
    background: var(--color-navy);
    color: var(--color-white) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    outline: none;
}
.dfc-promo-bar-close {
    position: absolute;
    top: 50%;
    right: 0.6rem;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: var(--color-navy);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}
.dfc-promo-bar-close:hover { opacity: 1; }
@media (max-width: 640px) {
    .dfc-promo-bar { font-size: 0.85rem; }
    .dfc-promo-bar-inner { padding: 0.6rem 2.5rem 0.6rem 1rem; gap: 0.4rem 0.75rem; }
}

/* A trigger that replaced a wp:button is a <button>, while every block-button
   rule in the theme was written for the block's <a>. The classes carry the
   colour, size and the 2px navy border, so all that is left is the handful of
   UA button defaults an <a> never had. */
button.wp-block-button__link {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    /* NOT font-family: inherit -- this selector outranks theme.json's
       .wp-block-button__link rule, and inheriting would swap the label font
       for body copy. theme.json already sets the font for the element. */
}
.dfc-inforeq-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4, 16px);
}
.dfc-inforeq-buttons.is-content-justification-center {
    justify-content: center;
}

/* A constrained group centres its children with margin-inline:auto, and an
   inline-block ignores auto margins. So in the FAQs "Still Have Questions?"
   card the CTA landed hard against the card's 24px padding edge while the copy
   above it sat on the 780px measure -- 136px to its right, which read as the
   button falling out of the block.

   display:block lets those auto margins do their job, and zeroing .dfc-btn's
   own 6px margin (there for gaps in a row of buttons, wrong for a lone one)
   puts the left edge on the text's line instead of 6px inside it, and brings
   the gap above back to the card's own 24px rhythm.

   Scoped to constrained layouts on purpose: every other .dfc-apply-wrap on the
   site sits inside a wp-block-details, which is layout-flow and already lines
   up. This selector reaches none of them. */
.is-layout-constrained > .dfc-apply-wrap {
    display: block;
}
.is-layout-constrained > .dfc-apply-wrap > .dfc-btn {
    margin: 0;
}
