/* ==========================================================================
   Careers — the public job application, offer and reference pages.
   Built on the CoS vocabulary (cos-home.css .hb-*) and wilma-modern-tokens.
   Everything here is .cr-* or scoped under .cr, so nothing reaches another page.
   ========================================================================== */

html, body.cr-body { background: var(--w-bg, #f4f7fb); }
body.cr-body { margin: 0; font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--w-ink, #33506b);
    min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }

/* ---- Top bar ---------------------------------------------------------------- */
.cr-top { background: #fff; border-top: 4px solid #2d8a00; border-bottom: 1px solid var(--w-line, #e3e9f0); }
.cr-top-in { max-width: 1120px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; min-height: 64px; }
.cr-brand { display: inline-flex; align-items: center; min-width: 0; text-decoration: none; min-height: 40px; }
.cr-brand-img { max-height: 40px; max-width: 220px; width: auto; display: block; }
.cr-brand { gap: 12px; }
/* The register page's letter tile (auth-modern .auth-tenant__monogram), for a practice with no logo uploaded. */
.cr-brand-mono { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1a3a14, #2d8a00); color: #fff; font: 700 18px/1 'Roboto', sans-serif; }
.cr-brand-text { font: 600 18px/1.2 var(--w-font-semibold, sans-serif); color: var(--w-navy, #0f3a5d);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.cr-top-tag { margin-left: auto; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--w-muted, #7c98b6); }

/* ---- Main ------------------------------------------------------------------- */
.hb.cr { flex: 1 0 auto; width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 20px 48px; box-sizing: border-box; }
.cr-narrow { max-width: 640px; margin: 0 auto; }
.cr-mid { max-width: 820px; margin: 0 auto; }
.cr .hb-headline { font-size: 26px; }
.cr-lead { font-size: 15px; line-height: 1.6; color: var(--hb-ink); margin: 0 0 6px; max-width: 720px; }
.cr .hb-card { overflow: visible; }
.cr .hb-card-body { padding: 8px 20px 20px; font-size: 14px; }
.cr .hb-card-head { padding: 18px 20px 6px; }
.cr .hb-card-head h2 { font-size: 16px; }

/* ---- Footer ----------------------------------------------------------------- */
.cr-foot { flex-shrink: 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px;
    padding: 18px 20px 24px; font-size: 12px; color: var(--w-muted, #7c98b6); }
.cr-foot-sep { width: 1px; height: 14px; background: var(--w-line, #e3e9f0); }
.cr-powered { display: inline-flex; align-items: center; gap: 6px; }
.cr-powered-img { height: 16px; width: auto; display: block; }

/* ---- Positions ---------------------------------------------------------------- */
.cr-positions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 18px; }
.cr-position { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.cr-position h3 { font: 600 15px/1.35 var(--w-font-semibold, sans-serif); color: var(--hb-navy); margin: 0; }
.cr-position .cr-position-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-position .hb-btn { margin-top: auto; align-self: flex-start; }
.cr-other { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; }

/* ---- Buttons ---------------------------------------------------------------- */
.cr .hb-btn { min-height: 40px; font-size: 14px; }
.cr .hb-btn.primary:disabled, .cr .hb-btn:disabled { opacity: .55; cursor: not-allowed; }
.cr .hb-btn.danger { color: var(--hb-red); border-color: #f2c4bf; }
.cr .hb-btn.danger:hover { background: #fff5f4; color: #b42318; }
.cr .hb-btn.link { border-color: transparent; background: transparent; color: var(--hb-blue); padding-left: 6px; padding-right: 6px; }
.cr .hb-btn.link:hover { text-decoration: underline; background: transparent; }
.cr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.cr-actions .cr-spacer { flex: 1 1 auto; }

/* ---- Inputs (own controls + the shared field partial, restyled) -------------- */
.cr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.cr-grid .cr-span { grid-column: 1 / -1; }
.cr-field { margin-bottom: 16px; min-width: 0; }
.cr .cr-label, .cr .ft-field > label:first-child {
    display: block !important; font-size: 13px !important; font-weight: 600 !important; color: var(--hb-navy) !important; margin: 0 0 6px !important; }
.cr .ft-field { margin-bottom: 16px !important; min-width: 0; }
.cr .ft-field > small { display: block !important; color: var(--hb-muted) !important; font-size: 12px !important; margin: -2px 0 6px !important; }
.cr .cr-input, .cr .ft-field input[type=text], .cr .ft-field input[type=email], .cr .ft-field input[type=tel],
.cr .ft-field input[type=number], .cr .ft-field input[type=date], .cr .ft-field select, .cr .ft-field textarea {
    width: 100% !important; box-sizing: border-box; border: 1px solid #cfdae6 !important; border-radius: 10px !important; background: #fff !important;
    color: var(--hb-navy) !important; font-size: 15px !important; min-height: 44px; height: auto !important; padding: 9px 12px !important;
    font-family: inherit; transition: border-color .15s, box-shadow .15s; }
.cr .ft-field textarea, .cr textarea.cr-input { min-height: 96px; line-height: 1.5; resize: vertical; }
.cr .cr-input:focus, .cr .ft-field input:focus, .cr .ft-field select:focus, .cr .ft-field textarea:focus {
    outline: none; border-color: var(--hb-blue) !important; box-shadow: 0 0 0 3px rgba(26, 138, 241, .15); }
.cr .is-invalid, .cr .ft-field.has-error input, .cr .ft-field.has-error select, .cr .ft-field.has-error textarea { border-color: var(--hb-red) !important; }
.cr .cr-err { display: block; color: #b42318; font-size: 12.5px; margin-top: 5px; }
.cr .ft-field > label:not(:first-child) { display: inline-flex !important; align-items: center; gap: 10px !important; min-height: 32px; cursor: pointer; font-size: 14px !important; }
.cr .ft-field > label:not(:first-child) input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--hb-green); }

/* Choice groups (multiselect / radio from the field partial) */
.cr .ft-choice-group { display: flex; flex-wrap: wrap; gap: 8px; }
.cr .ft-choice { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #cfdae6; border-radius: 999px; padding: 8px 14px;
    min-height: 40px; cursor: pointer; background: #fff; color: var(--hb-ink); font-size: 14px; margin: 0; user-select: none; }
.cr .ft-choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--hb-green); flex: 0 0 auto; }
.cr .ft-choice:has(input:checked) { border-color: var(--hb-green); background: #f1f9ea; color: var(--hb-green-dark); }
.cr .ft-choice:focus-within { box-shadow: 0 0 0 3px rgba(26, 138, 241, .15); }
.cr-check { display: inline-flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; min-height: 32px; padding: 4px 0; }
.cr-check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--hb-green); flex: 0 0 auto; }

/* ---- Wizard ----------------------------------------------------------------- */
.cr-wizard { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.cr-steps { position: sticky; top: 16px; padding: 10px; }
.cr-steps ol { list-style: none; margin: 0; padding: 0; }
.cr-step-link { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; text-align: left;
    padding: 9px 10px; border-radius: 10px; color: var(--hb-ink); font-size: 13.5px; min-height: 40px; cursor: pointer; }
.cr-step-link:hover { background: var(--hb-soft); }
.cr-step-link .cr-step-n { width: 24px; height: 24px; border-radius: 50%; background: #eef4fb; color: var(--hb-blue);
    display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.cr-step-link[aria-current="step"] { background: #eef4fb; color: var(--hb-navy); font-weight: 600; }
.cr-step-link[aria-current="step"] .cr-step-n { background: var(--hb-navy); color: #fff; }
.cr-step-link.is-done .cr-step-n { background: #e8f5de; color: var(--hb-green-dark); }
.cr-steps-foot { border-top: 1px solid #f0f3f7; margin-top: 8px; padding: 10px 6px 4px; display: flex; flex-direction: column; gap: 4px; }
.cr-mobile-progress { display: none; }
.cr-panel-foot { display: none; margin-top: 10px; }
.cr-panel[hidden] { display: none !important; }
.cr-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cr-panel-desc { color: var(--hb-muted); font-size: 13.5px; margin: 2px 0 14px; line-height: 1.5; }
.cr-field[hidden], .cr .ft-field.cr-hidden { display: none !important; }

/* Repeaters */
.cr-rows { display: flex; flex-direction: column; gap: 12px; }
.cr-row { border: 1px solid var(--hb-line); border-radius: 12px; padding: 14px 14px 2px; background: #fbfcfe; }
.cr-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cr-row-title { font-weight: 600; color: var(--hb-navy); font-size: 14px; }
.cr-row-remove { appearance: none; border: 0; background: transparent; color: var(--hb-red); font-size: 13px; min-height: 32px; min-width: 32px;
    padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.cr-row-remove:hover { background: #fff1f0; }
.cr-row-locked { font-size: 12px; color: var(--hb-muted); }
.cr-empty-rows { color: var(--hb-muted); font-size: 13.5px; padding: 6px 0 12px; }

/* Review */
.cr-review-sec { border-top: 1px solid #f0f3f7; padding: 14px 0 6px; }
.cr-review-sec:first-child { border-top: 0; padding-top: 4px; }
.cr-review-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.cr-review-head h3 { font: 600 14px/1.3 var(--w-font-semibold, sans-serif); color: var(--hb-navy); margin: 0; }
.cr-dl { display: grid; grid-template-columns: minmax(140px, 38%) minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 13.5px; }
.cr-dl dt { color: var(--hb-muted); font-weight: 500; overflow-wrap: anywhere; }
.cr-dl dd { margin: 0; color: var(--hb-navy); overflow-wrap: anywhere; white-space: pre-line; }
.cr-dl dd.cr-missing { color: #95600a; }
.cr-attest { background: var(--hb-soft); border: 1px solid var(--hb-line); border-radius: 12px; padding: 14px 16px; font-size: 13px;
    line-height: 1.6; max-height: 260px; overflow: auto; color: var(--hb-ink); }
.cr-attest p { margin: 0 0 10px; }
.cr-attest p:last-child { margin: 0; }
.cr-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.cr-upload input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cr-file-name { font-size: 13px; color: var(--hb-green-dark); overflow-wrap: anywhere; }
.cr-missing-list { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }
.cr-missing-list a { color: var(--hb-blue); }

/* Code entry */
.cr-code { font-size: 26px !important; letter-spacing: 10px; text-align: center; max-width: 240px; font-variant-numeric: tabular-nums; }
.cr-note { font-size: 13px; color: var(--hb-muted); }
/* A text link inside a note ("Sign in"): a 24px hit area from an invisible layer, the drawn link unchanged. */
.cr-note a { position: relative; }
.cr-note a::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 24px; transform: translateY(-50%); }
.cr-banner { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 14px 16px; font-size: 14px; line-height: 1.5; }
.cr-banner i { margin-top: 3px; }
.cr-banner.good { background: #eef8e6; color: var(--hb-green-dark); }
.cr-banner.warn { background: #fdf4e3; color: #8a5a07; }
.cr-banner.bad { background: #fdecea; color: #a12a1e; }
.cr-banner.info { background: #eef4fb; color: #1d5f9e; }

/* Big status icon */
.cr-hero-icon { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-size: 26px; margin-bottom: 12px; }
.cr-hero-icon.good { background: #e8f5de; color: var(--hb-green-dark); }
.cr-hero-icon.info { background: #eef4fb; color: var(--hb-blue); }
.cr-hero-icon.warn { background: #fdf0d9; color: #b7780f; }
.cr-center { text-align: center; }
.cr-center .cr-actions { justify-content: center; }

/* Offer letter */
.cr-letter { background: #fff; border: 1px solid var(--hb-line); border-radius: 12px; padding: 24px 26px; font-size: 14.5px; line-height: 1.65;
    color: #1f3347; overflow-wrap: anywhere; }
.cr-letter img { max-width: 100%; height: auto; }
.cr-letter table { width: 100%; max-width: 100%; }
.cr-sigpad { border: 2px dashed #cbd6e2; border-radius: 12px; background: #f6faf5; width: 100%; max-width: 520px; overflow: hidden; touch-action: none; }
.cr-sigpad canvas { display: block; width: 100% !important; }
.cr-sig-tools { display: flex; justify-content: space-between; align-items: center; max-width: 520px; margin-top: 6px; }

/* Reference questions */
.cr-q { margin-bottom: 18px; }
.cr-q-label { font-size: 14px; font-weight: 600; color: var(--hb-navy); margin-bottom: 8px; line-height: 1.45; display: block; }

/* ---- Responsive ------------------------------------------------------------- */
@media (max-width: 900px) {
    .cr-wizard { grid-template-columns: minmax(0, 1fr); }
    .cr-steps { display: none; }
    .cr-mobile-progress { display: block; margin-bottom: 12px; }
    .cr-panel-foot { display: flex; }
    .cr-mp-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--hb-muted); margin-bottom: 6px; }
    .cr-mp-row strong { color: var(--hb-navy); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cr-mp-bar { height: 6px; border-radius: 999px; background: #e6edf5; overflow: hidden; }
    .cr-mp-fill { height: 100%; background: var(--hb-green); border-radius: 999px; transition: width .25s; }
}
@media (max-width: 600px) {
    .hb.cr { padding: 18px 14px 36px; }
    .cr-top-in { padding: 10px 14px; }
    .cr .hb-headline { font-size: 22px; }
    .cr-grid { grid-template-columns: minmax(0, 1fr); }
    .cr .hb-card-body { padding: 6px 14px 16px; }
    .cr .hb-card-head { padding: 14px 14px 4px; }
    .cr-dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
    .cr-dl dd { margin-bottom: 8px; }
    .cr-actions .hb-btn.primary { flex: 1 1 100%; }
    .cr-letter { padding: 16px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .cr-mp-fill { transition: none; } }

/* Interview self-scheduling: one card per proposed time. */
.cr-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cr-slot { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--hb-line); border-radius: 12px; padding: 12px 14px;
    background: #fbfcfe; cursor: pointer; min-height: 48px; }
.cr-slot:hover { border-color: var(--hb-blue); }
.cr-slot input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--hb-green); flex: 0 0 auto; }
.cr-slot:has(input:checked) { border-color: var(--hb-green); background: #f3faee; box-shadow: 0 0 0 1px var(--hb-green); }
.cr-slot.is-off { cursor: not-allowed; opacity: .6; background: #f6f7f9; }
.cr-slot-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-slot-day { font-weight: 600; color: var(--hb-navy); font-size: 14px; }
.cr-slot-time { font-size: 13.5px; color: var(--hb-ink); }
.cr-slot-why { font-size: 12px; color: #b42318; }

/* "Application sent": the next step. */
.cr-next { text-align: left; max-width: 480px; margin: 18px auto 0; padding: 14px 16px; border: 1px solid var(--hb-line); border-radius: 12px; background: #fbfcfe; }
.cr-next-h { font: 600 15px/1.3 var(--w-font-semibold, sans-serif); color: var(--hb-navy); margin: 0 0 8px; }
.cr-next-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.55; color: var(--hb-ink); }
.cr-next-list li + li { margin-top: 4px; }

/* ---- The start of an application on the register page's look (partials.auth.tenant-shell) ---- */
html:has(.cr-shell), body.cr-body:has(.cr-shell) { background: #f4f6f2; }
.cr-shell .auth-form .cr-field { display: flex; flex-direction: column; gap: 6px; }
.cr-shell .cr-err { font-size: 12px; color: #dc2626; margin: 2px 0 0; }
.cr-shell .cr-hint { font-size: 11.5px; color: #6b7280; line-height: 1.45; }
.cr-shell .cr-notice { font-size: 12px; line-height: 1.55; color: #4b5563; margin: 0; }
.cr-shell .cr-notice a, .cr-shell .cr-back a { color: #2d8a00; font-weight: 500; }
.cr-shell .cr-back { font-size: 13px; color: #4b5563; text-align: center; margin: 16px 0 0; }
.cr-shell .auth-submit i { margin-left: 6px; }
@media (max-width: 560px) { .cr-shell .auth-field-row { grid-template-columns: 1fr; } }

