/*================================================================
 * Careers - Listing + detail pages
 * Tokens mapped to the ContractSafe palette. See [[design-tokens]]
 * ============================================================*/

.cr-page {
/* careers.css - scoped to cr-page. Values map to design-tokens; no new colors */
  --cr-ink:     #031723;    /* body text */
  --cr-muted:   #6b6b6b;    /* dates, captions */
  --cr-bg:      #f8f9fa;    /* page background */
  --cr-chip:    #F5F5F5;
  --cr-blue:    #0d4eb5;    /* links, panel borders, buttons */
  --cr-blue-hover: #11399B;
  --cr-gold:    #F8B951;    /* CTA pill, rules */
  --cr-pink:    #FF2370;    /* type chips, read-more arrow */
  --cr-purple:  #8039DE;    /* area chips */
  
  /* ---- new tokens: no brand equivalent exists ---- */
  --cr-line:    #E7E7EF;    /* borders */
  --cr-line-strong: #A5A5A5;
 
  /* --- shape & type ---*/
  --cr-radius: 10px;
  --cr-pill: 40px;
  --cr-display: 'Quicksand', sans-serif;
  --cr-body: 'Inter', sans-serif;
  color: var(--cr-ink);
  font-family: var(--cr-body);
}
  
.cr-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.cr-wrap--narrow {
  max-width: 780px;
}

.cr-h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
  color: var(--cr-ink);
  font-family: var(--cr-display);
}

.cr-mark {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--cr-gold);
  transform: rotate(12deg);
}

.cr-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cr-tag {
  padding: 4px 12px;
  border-radius: var(--cr-pill);
  background: var(--cr-chip);
  font: 500 13px/1.4 'Inter', sans-serif;
  color: var(--cr-ink);
  white-space: nowrap;
}

.cr-chip:focus-visible, .cr-card__link:focus-visible, .cr-btn:focus-visible,
.cr-back:focus-visible, .cr-others__card:focus-visible, .cr-note__link:focus-visible {
  outline: 2px solid var(--cr-blue);
  outline-offset: 3px;
}

/* -- Open roles -- */
.cr-roles {
  padding: 72px 0 88px;
  background: #fff;
  scroll-margin-top: 150px;
}

.cr-roles--pad-top {
  padding-top: 190px;
}

.cr-roles__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 20px;
}

.cr-roles__count {
  margin: 0;
  font: 14px 'Inter', sans-serif;
  color: var(--cr-muted);
}

.cr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.cr-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-pill);
  background: #fff;
  font: 700 14px/1 'Quicksand', sans-serif;
  color: var(--cr-ink);
  cursor: pointer;
}

.cr-chip:hover {
  background: var(--cr-chip);
}

.cr-chip.is-active {
  background: var(--cr-ink);
  border-color: var(--cr-ink);
  color: #fff;
}

.cr-chip__count {
  font-weight: 500;
  opacity: .7;
}

.cr-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cr-card[hidden] {
  display: none;
}

.cr-card__link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 20px 24px; 
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius);
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cr-card__link:hover {
  border-color: var(--cr-blue);
  box-shadow: 0 6px 18px rgba(3, 23, 35, .08);
  transform: translateY(-2px);
}
.cr-card__main {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cr-card__title { 
  font-size: 19px;
  font-weight: 700;
  font-family: var(--cr-display);
}
.cr-card__cta {
  font-size: 15px;
  font-weight: 700;
  color: var(--cr-blue);
  white-space: nowrap;
}
.cr-card__link:hover .cr-card__cta {
  text-decoration: underline;
}
.cr-empty {
  margin: 0;
  padding: 24px;
  border-radius: var(--cr-radius);
  background: var(--cr-bg);
  font: 16px/1.6 'Inter', sans-serif;
}
.cr-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 20px; 
  padding: 20px 24px;
  border: 1px dashed #A5A5A5;
  border-radius: var(--cr-radius);
  background: var(--cr-bg);
  font: 15px/1.5 'Inter', sans-serif;
}

.cr-note__text {
  flex: 1;
  min-width: 240px;
}
.cr-note__link { font-weight: 700; color: var(--cr-blue); text-decoration: none; white-space: nowrap; }
.cr-eeo { margin: 24px 0 0; font: 13px 'Inter', sans-serif; color: var(--cr-muted); }

/* ── Job description ── */
.cr-job {
  padding: 165px 0 85px;
  margin-bottom: 0;
  background: #fff;
}
.cr-back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cr-blue);
  text-decoration: none;
}
.cr-job__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--cr-line);
}

.cr-job__title { margin: 0; font-size: 40px; line-height: 1.15; color: var(--cr-ink); font-family: var(--cr-display); } /* global h1 is white — CR8 */
.cr-btn { align-self: flex-start; display: inline-flex; padding: 14px 28px; border-radius: var(--cr-pill); background: var(--cr-blue); color: #fff; font: 700 16px/1 'Quicksand', sans-serif; text-decoration: none; }
.cr-btn:hover { background: var(--cr-blue-hover); color: #fff; }
.cr-closed { margin-top: 24px; padding: 16px 20px; border-left: 4px solid var(--cr-gold); background: var(--cr-bg); font: 15px/1.5 'Inter', sans-serif; }
.cr-closed a { color: var(--cr-blue); font-weight: 700; }

.cr-job__section { padding-top: 32px; }
.cr-job__section h2, .cr-apply h2, .cr-others h2 { margin: 0 0 10px; font-size: 22px; line-height: 1.3; color: var(--cr-ink); font-family: var(--cr-display); }
.cr-rich { font: 16px/1.5 'Inter', sans-serif; }
.cr-rich p, .cr-rich li { font-size: 16px; line-height: 1.5; }
.cr-rich p { margin: 0 0 14px; }
.cr-rich ul, .cr-rich ol { margin: 0; padding-left: 20px; }
.cr-rich li + li { margin-top: 8px; }

.cr-steps { list-style: none; counter-reset: cr-step; display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; padding: 0; }
.cr-steps li { counter-increment: cr-step; position: relative; padding: 2px 0 24px 52px; font: 15px/1.5 'Inter', sans-serif; color: var(--cr-muted); }
.cr-steps li::before { content: counter(cr-step); position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #edf2ff; color: var(--cr-blue); font: 700 14px 'Quicksand', sans-serif; }
.cr-steps li::after { content: ""; position: absolute; left: 16px; top: 40px; bottom: 2px; width: 2px; background: var(--cr-line); }
.cr-steps li:last-child::after { display: none; }
.cr-steps strong { display: block; margin-bottom: 4px; font-size: 16px; color: var(--cr-ink); }

.cr-apply { margin-top: 40px; padding: 28px; border: 1px solid var(--cr-line); border-radius: var(--cr-radius); background: var(--cr-bg); scroll-margin-top: 150px; }
.cr-apply__lede { margin: 0 0 20px; font: 14px 'Inter', sans-serif; color: var(--cr-muted); }

/* --------------- Apply form styling --------------------*/
.cr-apply .hs-form fieldset, .cr-apply .hs-form fieldset.form-columns-1, .cr-apply .hs-form fieldset.form-columns-2 {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  border 0;
}

.cr-apply .hs-form-field {
  width: 100%;
  margin-bottom: 18px;
}

.cr-apply .hs-form .input {
  width: 100%;
  margin: 0;
}

.cr-apply .hs-form-field > label {
  display: block;
  margin-bottom: 6px;
  font: 600 14px/1.4 var(--cr-body);
  color: var(--var-ink);
}

.cr-apply .hs-form-required {
  margin-left: 2px;
  color: #dc3545;
}

.cr-apply .hs-field-desc {
  margin: 0 0 6px;
  font: 13px/1.5 var(--cr-body);
  color: var(--cr-muted);
}

/* Text inputs, textarea, select --*/

.cr-apply .hs-form input[type="text"],
.cr-apply .hs-form input[type="email"],
.cr-apply .hs-form input[type="tel"],
.cr-apply .hs-form input[type="url"],
.cr-apply .hs-form input[type="number"],
.cr-apply .hs-form textarea,
.cr-apply .hs-form select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--cr-line);
  border-radius: 8px;
  background: #fff;                    /* the panel is --cr-bg grey; inputs stay white */
  font: 15px/1.5 var(--cr-body);
  color: var(--cr-ink);
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}

.cr-apply .hs-form textarea {
  min-height: 120px;
  resize: vertical;
}

.cr-apply .hs-form ::placeholder {
  color: var(--cr-muted);
  opacity: 1;
}

.cr-apply .hs-form input:focus,
.cr-apply .hs-form textarea:focus,
.cr-apply .hs-form select:focus {
  outline: none;
  border-color: var(--cr-blue);
  box-shadow: 0 0 0 3px rgba(13, 78, 181, .15);
}

/* ---- Résumé upload ---- */

.cr-apply .hs-form input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px dashed var(--cr-line);
  border-radius: 8px;
  background: #fff;
  font: 14px/1.5 var(--cr-body);
  color: var(--cr-ink);
  cursor: pointer;
}

.cr-apply .hs-form input[type="file"]:focus {
  outline: none;
  border-color: var(--cr-blue);
  box-shadow: 0 0 0 3px rgba(13, 78, 181, .15);
}

.cr-apply .hs-form input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 7px 14px;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-pill);
  background: var(--cr-chip);
  font: 600 13px/1 var(--cr-display);
  color: var(--cr-ink);
  cursor: pointer;
}

.cr-apply .hs-form input[type="file"]::file-selector-button:hover {
  background: #ececec;
}

/* ---- Checkboxes / radios ---- */

.cr-apply .hs-form .inputs-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cr-apply .hs-form-checkbox label,
.cr-apply .hs-form-radio label,
.cr-apply .hs-form-booleancheckbox label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font: 14px/1.5 var(--cr-body);
  color: var(--cr-ink);
  cursor: pointer;
}

.cr-apply .hs-form input[type="checkbox"],
.cr-apply .hs-form input[type="radio"] {
  flex: none;
  width: auto;
  margin-top: 3px;
  accent-color: var(--cr-blue);
}

/* ---- Two-column rows (first / last name) ---- */

.cr-apply .hs-form .form-columns-2 {
  display: flex;
  gap: 16px;
}

.cr-apply .hs-form .form-columns-2 .hs-form-field {
  flex: 1 1 0;
  min-width: 0;
}

/* HubSpot sets inline percentage widths on these wrappers. */
.cr-apply .hs-form .form-columns-2 .hs-form-field > .input {
  margin-right: 0;
}

/* ---- Submit ---- */

.cr-apply .hs-form .hs_submit {
  margin-top: 4px;
}

.cr-apply .hs-form .actions {
  margin: 0;
  padding: 0;
}

.cr-apply .hs-form input[type="submit"],
.cr-apply .hs-form .hs-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--cr-pill);
  background: var(--cr-blue);
  font: 700 16px/1 var(--cr-display);
  color: #fff;
  cursor: pointer;
  transition: background .15s, transform .15s;
}

.cr-apply .hs-form input[type="submit"]:hover,
.cr-apply .hs-form .hs-button:hover {
  background: var(--cr-blue-hover);
  transform: translateY(-1px);
}

.cr-apply .hs-form input[type="submit"]:focus-visible,
.cr-apply .hs-form .hs-button:focus-visible {
  outline: 2px solid var(--cr-blue);
  outline-offset: 3px;
}

.cr-apply .hs-form input[type="submit"]:disabled,
.cr-apply .hs-form .hs-button:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

/* ---- Errors ---- */

.cr-apply .hs-form .hs-error-msgs {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.cr-apply .hs-form .hs-error-msg,
.cr-apply .hs-form .hs-error-msgs label {
  font: 13px/1.4 var(--cr-body);
  color: #dc3545;
}

.cr-apply .hs-form .hs-input.error,
.cr-apply .hs-form .hs-input.invalid {
  border-color: #dc3545;
  background: #fef6f7;
}

.cr-apply .hs-form .hs-input.error:focus,
.cr-apply .hs-form .hs-input.invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, .15);
}

/* ---- Consent / captcha ---- */

.cr-apply .hs-form .legal-consent-container {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--cr-line);
  font: 13px/1.5 var(--cr-body);
  color: var(--cr-muted);
}

.cr-apply .hs-form .legal-consent-container p:last-child {
  margin-bottom: 0;
}

.cr-apply .hs-form .legal-consent-container a {
  color: var(--cr-blue);
  text-decoration: underline;
}

.cr-apply .hs-form .grecaptcha-badge {
  margin-top: 12px;
}

/* ---- Inline thank-you ----
   response_response_type="inline" replaces the form with this,
   so it is the only confirmation the applicant sees. */

.cr-apply .submitted-message {
  margin: 0;
  padding: 28px 20px;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius);
  background: #fff;
  font: 16px/1.6 var(--cr-body);
  color: var(--cr-ink);
  text-align: center;
}

.cr-apply .submitted-message p {
  margin: 0;
}

/* ---- Mobile ---- */

@media (max-width: 600px) {
  .cr-apply .hs-form .form-columns-2 {
    display: block;
  }

  .cr-apply .hs-form input[type="submit"],
  .cr-apply .hs-form .hs-button {
    width: 100%;
  }
}


.cr-others { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--cr-line); }
.cr-others__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cr-others__card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px 16px; border: 1px solid var(--cr-line-strong); border-radius: var(--cr-radius); color: inherit; text-decoration: none; }
.cr-others__card:hover { border-color: var(--cr-blue); }
.cr-others__title { font-weight: 700; font-family: var(--cr-display); }
.cr-others__meta { font: 13px 'Inter', sans-serif; color: var(--cr-muted); }

@media (max-width: 991px) {
  .cr-job { padding-top: 110px; }
  .cr-roles--pad-top { padding-top: 140px; }
}
@media (max-width: 768px) {
  .cr-h2 { font-size: 26px; }
  .cr-job__title { font-size: 30px; }
  .cr-card__link, .cr-apply { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .cr-card__link { transition: none; }
  .cr-card__link:hover { transform: none; }
}