:root {
  --navy: #1F2350;
  --navy-dark: #14162e;
  --navy-light: #363B7A;
  --blue: #2AA9E0;
  --blue-light: #5CC4F0;
  --accent-gradient: linear-gradient(135deg, #2AA9E0 0%, #1F2350 100%);
  --accent-gradient-hover: linear-gradient(135deg, #35B4EB 0%, #282D63 100%);
  --grey-bg: #F3F5FB;
  --border: #E4E8F2;
  --text: #232645;
  --text-muted: #6B7089;
  --ok: #1E8E3E;
  --ok-bg: #E4F7E9;
  --warn: #B8860B;
  --warn-bg: #FFF4D6;
  --fail: #C5221F;
  --fail-bg: #FDEAE9;
  --info-bg: #EAF3FB;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(31, 35, 80, 0.06), 0 1px 1px rgba(31, 35, 80, 0.04);
  --shadow-md: 0 6px 20px rgba(31, 35, 80, 0.08), 0 2px 6px rgba(31, 35, 80, 0.05);
  --shadow-lg: 0 16px 40px rgba(31, 35, 80, 0.14), 0 4px 12px rgba(31, 35, 80, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1100px 500px at 100% -10%, rgba(42, 169, 224, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(31, 35, 80, 0.06), transparent 55%),
    var(--grey-bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- topbar ---
   White (not navy) so the logo's dark wordmark stays legible — the previous
   dark-on-dark topbar swallowed the "TECHN" half of the logo entirely.
   The gradient accent strip underneath keeps the brand's navy/blue identity
   present without needing a white/reversed logo file. */
.topbar {
  background: #fff;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 3px solid transparent;
  border-image: var(--accent-gradient) 1;
}
.topbar img { height: 36px; display: block; }
.topbar .nav { display: flex; align-items: center; }
.topbar .nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.topbar .nav a:hover { color: var(--navy); background: var(--grey-bg); }
.topbar .user {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
  font-weight: 500;
}

.container { max-width: 1020px; margin: 0 auto; padding: 28px 24px 60px; }

/* ------------------------------------------------------------------ cards --- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.hero {
  background: var(--accent-gradient);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 70%);
}
.hero h1 { color: #fff; margin: 0 0 6px; }
.hero p { color: rgba(255,255,255,0.85); margin: 0; }
.hero .btn { margin-top: 16px; }

h1, h2, h3 { color: var(--navy); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 16px; margin-top: 0; margin-bottom: 14px; }
h2::before {
  content: "";
  display: inline-block;
  width: 4px; height: 14px;
  background: var(--accent-gradient);
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: -1px;
}

/* ---------------------------------------------------------------- buttons --- */
a.btn, button.btn {
  display: inline-block;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}
a.btn:hover, button.btn:hover {
  background: var(--accent-gradient-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
a.btn:active, button.btn:active { transform: translateY(0); }

a.btn.secondary, button.btn.secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
  box-shadow: none;
}
a.btn.secondary:hover, button.btn.secondary:hover {
  background: var(--grey-bg);
  box-shadow: none;
  border-color: var(--blue);
}
a.btn.danger, button.btn.danger { background: var(--fail); }
a.btn.danger:hover, button.btn.danger:hover { background: #a81c17; }
button.btn.success, a.btn.success { background: linear-gradient(135deg, #2FAE55, #1E8E3E); }
button.btn.success:hover, a.btn.success:hover { background: linear-gradient(135deg, #34C05F, #1E8E3E); }

/* ----------------------------------------------------------------- tables --- */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th {
  text-align: left; color: var(--text-muted); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 12px;
  border-bottom: 2px solid var(--border);
}
table.list td {
  padding: 13px 12px; border-bottom: 1px solid var(--border);
  overflow-wrap: break-word; word-break: break-word;
}
table.list tr:last-child td { border-bottom: none; }
table.list tr:hover td { background: var(--grey-bg); }

/* ----------------------------------------------------------------- badges --- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.01em;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge.draft { background: #EEF0F7; color: #5B5F7A; }
.badge.pending_review { background: var(--warn-bg); color: var(--warn); }
.badge.changes_requested { background: var(--fail-bg); color: var(--fail); }
.badge.approved { background: var(--ok-bg); color: var(--ok); }
.badge.sent_for_signature { background: var(--info-bg); color: var(--blue); }
.badge.filing { background: var(--info-bg); color: var(--blue); }
.badge.signed, .badge.filed { background: var(--ok-bg); color: var(--ok); }
.badge.pass { background: var(--ok-bg); color: var(--ok); }
.badge.warning { background: var(--warn-bg); color: var(--warn); }
.badge.fail { background: var(--fail-bg); color: var(--fail); }
.badge.cancelled { background: #EEF0F7; color: #5B5F7A; }

/* ------------------------------------------------------------ check items --- */
.check {
  padding: 12px 14px; border-radius: 8px; margin-bottom: 8px; font-size: 14px; line-height: 1.45;
  overflow-wrap: break-word; word-break: break-word;
}
.check.pass { background: var(--ok-bg); border-left: 4px solid var(--ok); }
.check.warning { background: var(--warn-bg); border-left: 4px solid var(--warn); }
.check.fail { background: var(--fail-bg); border-left: 4px solid var(--fail); }
.check.info { background: var(--info-bg); border-left: 4px solid var(--blue); }

/* --------------------------------------------------------- contract header --- */
.card.page-header {
  background: linear-gradient(180deg, rgba(42, 169, 224, 0.06) 0%, #fff 140px);
  position: relative;
  overflow: hidden;
}
.card.page-header::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--accent-gradient);
}
.card.page-header h1 { margin-bottom: 10px; }
.page-header .meta-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 8px;
  margin: 0 0 18px;
  font-size: 14px; color: var(--text-muted); font-weight: 500;
}
.page-header .actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--border);
}
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: var(--grey-bg); border: 1px solid var(--border); border-radius: 5px;
  padding: 2px 6px; font-size: 12.5px;
  overflow-wrap: break-word; word-break: break-all;
}

/* -------------------------------------------------------------- stepper --- */
.stepper { display: flex; align-items: flex-start; margin: 4px 0 20px; }
.stepper .step { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.stepper .step:not(:first-child)::before {
  content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px;
  background: var(--border); z-index: 0;
}
.stepper .step.done:not(:first-child)::before,
.stepper .step.current:not(:first-child)::before { background: var(--blue); }
.stepper .step-dot {
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  border: 2.5px solid var(--border); display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1; flex: none;
}
.stepper .step.done .step-dot { background: var(--accent-gradient); border-color: transparent; }
.stepper .step.done .step-dot::after { content: ""; width: 5px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) translate(-1px, -1px); }
.stepper .step.current .step-dot { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(42, 169, 224, 0.15); }
.stepper .step.current .step-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.stepper .step-label {
  margin-top: 7px; font-size: 11.5px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.01em; max-width: 90px;
}
.stepper .step.done .step-label, .stepper .step.current .step-label { color: var(--navy); }
.owner-line { font-size: 13px; color: var(--text-muted); margin: -4px 0 16px; }
.owner-line strong { color: var(--navy); font-weight: 700; }

/* ------------------------------------------------------------------ forms --- */
form.stacked label { display: block; margin: 14px 0 5px; font-size: 13px; font-weight: 700; color: #444; }
form.stacked input, form.stacked select, form.stacked textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--text);
  background: #fbfbfd;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
form.stacked input:focus, form.stacked select:focus, form.stacked textarea:focus {
  outline: none; border-color: var(--blue); background: #fff;
  box-shadow: 0 0 0 3px rgba(42, 169, 224, 0.15);
}
form.stacked textarea { min-height: 90px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

/* ------------------------------------------------------------------ flash --- */
.flash {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px;
  font-weight: 600; box-shadow: var(--shadow-sm);
}
.flash.error { background: var(--fail-bg); color: var(--fail); }
.flash.success { background: var(--ok-bg); color: var(--ok); }

/* ------------------------------------------------------------- doc preview --- */
.doc-preview { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow-sm); }
.doc-preview h3 { border-bottom: 2px solid var(--blue); padding-bottom: 6px; }
.doc-preview ul { margin: 6px 0 12px; padding-left: 22px; }
.doc-preview ul li { margin-bottom: 4px; }

/* Long reference documents (letter of offer, agreement text) open in a
   floating, scrollable modal on demand instead of expanding inline — keeps
   the page a short action-first summary rather than a wall of contract text. */
.doc-preview-trigger { padding: 0; }
.doc-preview-toggle {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%;
  padding: 22px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.doc-preview-toggle h2 { margin: 0; flex: 1; }
.doc-preview-toggle .chev {
  width: 9px; height: 9px; flex: none;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.doc-preview-toggle:hover .chev { border-color: var(--blue); }

dialog.doc-modal {
  width: min(720px, 92vw);
  max-height: 82vh;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.28);
}
dialog.doc-modal::backdrop { background: rgba(15, 23, 42, 0.55); }
.doc-modal-header {
  position: sticky; top: 0; z-index: 1; background: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 26px; border-bottom: 1px solid var(--border);
}
.doc-modal-header h2 { margin: 0; font-size: 18px; }
.doc-modal-close {
  border: none; background: transparent; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--text-muted);
  padding: 4px 9px; border-radius: 6px;
}
.doc-modal-close:hover { background: var(--border); color: var(--navy); }
.doc-modal-body {
  padding: 20px 28px 28px;
  overflow-y: auto;
  max-height: calc(82vh - 62px);
}
.doc-modal-body h3 { border-bottom: 2px solid var(--blue); padding-bottom: 6px; }
.doc-modal-body h3:first-child { margin-top: 0; }
.doc-modal-body ul { margin: 6px 0 12px; padding-left: 22px; }
.doc-modal-body ul li { margin-bottom: 4px; }

/* Generic collapsible section (e.g. the dashboard's "Cancelled" list) —
   same disclosure-triangle mechanics as the doc-preview sections above,
   but without their padding-reset since this one doesn't need it. */
summary.collapsible-summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; color: var(--navy); font-size: 16px;
}
summary.collapsible-summary::-webkit-details-marker { display: none; }
summary.collapsible-summary .chev {
  width: 9px; height: 9px; flex: none;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
details[open] > summary.collapsible-summary .chev { transform: rotate(-135deg); }
.collapsible-body { margin-top: 16px; }

.muted { color: var(--text-muted); font-size: 13px; }
.hint {
  color: #1c3f57; font-size: 13px; background: var(--info-bg); border-left: 4px solid var(--blue);
  padding: 12px 14px; border-radius: 8px; margin-top: 14px;
}
hr.rule { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

/* ------------------------------------------------------------------- auth --- */
.auth-wrap {
  min-height: calc(100vh - 200px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 40px 40px 36px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: var(--accent-gradient);
}
.auth-icon { margin-bottom: 8px; }
.auth-icon img { height: 64px; }
.auth-card h1 { font-size: 21px; margin-bottom: 4px; }
.auth-card .muted { margin-bottom: 22px; }
.auth-card form.stacked { text-align: left; }
.auth-btn { width: 100%; text-align: center; margin-top: 6px; padding: 12px 18px; font-size: 15px; }

::selection { background: rgba(42, 169, 224, 0.25); }

/* ==========================================================================
   CANDIDATE ONBOARDING WIZARD  (.onb-*)
   --------------------------------------------------------------------------
   Everything here is scoped to the public /onboard/<token> page. This is the
   only page in the portal a candidate ever sees — often on a phone, often
   before they've signed anything — so it gets a proper branded treatment
   rather than the plain internal-admin styling the rest of the app uses.

   Scoped deliberately: the generic `form.stacked h2 { margin-top: 0 }` rule
   the internal pages rely on was what made section headings collide with the
   field row above them here.
   ========================================================================== */

.onb-page { max-width: 860px; margin: 0 auto; }

/* ------------------------------------------------------------- hero band --- */
.onb-hero {
  background: var(--accent-gradient);
  border-radius: var(--radius);
  padding: 28px 30px;
  color: #fff;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.onb-hero::after {
  content: "";
  position: absolute;
  right: -60px; top: -80px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.onb-hero .onb-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.72); margin: 0 0 8px;
}
.onb-hero h1 { color: #fff; margin: 0 0 8px; font-size: 26px; line-height: 1.25; }
.onb-hero p { margin: 0; color: rgba(255, 255, 255, 0.88); font-size: 14.5px; line-height: 1.6; max-width: 60ch; }
.onb-role {
  display: inline-block; margin-top: 14px; padding: 6px 14px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px; font-size: 13px; font-weight: 600;
}

/* --------------------------------------------------------------- stepper --- */
.onb-steps { display: flex; align-items: center; gap: 8px; margin: 22px 0 18px; }
.onb-step { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.onb-step-num {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  background: #fff; color: var(--text-muted);
  border: 2px solid var(--border);
}
.onb-step-label { font-size: 13.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.onb-step.is-active .onb-step-num { background: var(--accent-gradient); color: #fff; border-color: transparent; }
.onb-step.is-active .onb-step-label { color: var(--navy); }
.onb-step.is-done .onb-step-num { background: var(--ok); color: #fff; border-color: transparent; }
.onb-step-bar { flex: 1 1 auto; height: 2px; background: var(--border); border-radius: 2px; min-width: 16px; }
.onb-step-bar.is-done { background: var(--ok); }

/* ----------------------------------------------------------------- cards --- */
.onb-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 26px 28px; margin-bottom: 18px;
}
.onb-card > h2:first-child { margin-top: 0; }
.onb-section {
  margin: 30px 0 0; padding-top: 22px; border-top: 1px solid var(--border);
}
.onb-section:first-of-type { margin-top: 6px; padding-top: 0; border-top: 0; }
.onb-section h2 {
  font-size: 15px; margin: 0 0 4px; display: flex; align-items: center; gap: 10px;
}
.onb-section h2::before { display: none; }
.onb-badge {
  width: 24px; height: 24px; border-radius: 7px; flex: 0 0 24px;
  background: var(--info-bg); color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.onb-section > p.onb-help { margin: 0 0 4px; font-size: 13px; color: var(--text-muted); line-height: 1.55; }

/* ----------------------------------------------------------------- forms --- */
.onb-form label { display: block; margin: 16px 0 6px; font-size: 12.5px; font-weight: 700; color: var(--navy); }
.onb-form input[type=text], .onb-form input[type=email], .onb-form input[type=tel],
.onb-form input[type=date], .onb-form input[type=number], .onb-form select, .onb-form textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 14.5px; font-family: inherit; color: var(--text); background: #fbfcfe;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.onb-form input:focus, .onb-form select:focus, .onb-form textarea:focus {
  outline: none; border-color: var(--blue); background: #fff;
  box-shadow: 0 0 0 3px rgba(42, 169, 224, 0.16);
}
.onb-form textarea { min-height: 84px; resize: vertical; }
.onb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.onb-grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 20px; }
.onb-req { color: var(--fail); font-weight: 700; }

/* Checkboxes must not inherit the full-width input rule — that stretched the
   box across the row and pushed it far from its own label. */
.onb-form input[type=checkbox], .onb-form input[type=radio],
form.stacked input[type=checkbox], form.stacked input[type=radio] {
  width: auto; min-width: 0; display: inline-block;
}
.onb-form label.onb-check, .onb-check {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--grey-bg); cursor: pointer; font-weight: 400;
  margin: 4px 0 0; font-size: 14px; line-height: 1.55; color: var(--text); font-weight: 400;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.onb-check:hover { border-color: var(--blue); background: #fff; }
.onb-check input { margin: 2px 0 0; width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--blue); }
.onb-check.is-checked { border-color: var(--blue); background: var(--info-bg); }

/* ------------------------------------------------------- contract viewer --- */
.onb-doc {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: #f7f8fc; box-shadow: inset 0 1px 3px rgba(31, 35, 80, 0.06);
}
.onb-doc-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-muted); font-weight: 600;
}
.onb-doc-bar a { color: var(--blue); text-decoration: none; font-weight: 700; }
.onb-doc-bar a:hover { text-decoration: underline; }
.onb-doc iframe { width: 100%; height: 560px; border: 0; display: block; background: #f7f8fc; }

/* The contract itself, rendered as HTML rather than an embedded PDF (see
   app._contract_view_blocks for why). On desktop it scrolls inside its own
   panel so the page stays a manageable length; on a phone the inner scroll
   is removed entirely and it flows into the page, because a scroll area
   nested inside a scrolling page is miserable to read on touch. */
.onb-contract {
  max-height: 560px; overflow-y: auto; padding: 22px 26px; background: #fff;
  font-size: 14.5px; line-height: 1.65; color: var(--text);
  -webkit-overflow-scrolling: touch;
}
.onb-contract:focus { outline: 2px solid var(--blue); outline-offset: -2px; }
.onb-contract p { margin: 0 0 11px; }
.onb-contract ul { margin: 0 0 12px; padding-left: 20px; }
.onb-contract li { margin-bottom: 5px; }
.onb-contract-title {
  font-size: 16px; color: var(--navy); font-weight: 800; margin: 26px 0 12px;
  padding-bottom: 8px; border-bottom: 2px solid var(--blue); letter-spacing: 0.01em;
}
.onb-contract-title:first-child { margin-top: 0; }
.onb-contract-heading { font-size: 14px; color: var(--navy); font-weight: 700; margin: 20px 0 7px; }

/* --------------------------------------------------------- signature pad --- */
.onb-sigwrap {
  border: 2px dashed var(--border); border-radius: 12px; background: #fff;
  padding: 10px 10px 6px; max-width: 460px; position: relative; touch-action: none;
  transition: border-color 0.15s ease;
}
.onb-sigwrap.has-ink { border-color: var(--blue); border-style: solid; }
.onb-sigwrap canvas { width: 100%; height: 150px; display: block; cursor: crosshair; border-radius: 6px; }
.onb-sigline {
  border-top: 1.5px solid var(--navy); margin: 0 12px;
  display: flex; justify-content: space-between; padding-top: 5px;
}
.onb-sigline span { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.onb-sighint {
  position: absolute; inset: 10px 10px 30px; display: flex;
  align-items: center; justify-content: center; pointer-events: none;
  color: #b9bfd4; font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
}
.onb-sigwrap.has-ink .onb-sighint { display: none; }

/* ------------------------------------------------------------- uploaders --- */
.onb-file {
  border: 2px dashed var(--border); border-radius: 10px; background: #fbfcfe;
  padding: 16px; transition: border-color 0.15s ease, background 0.15s ease;
}
.onb-file:hover { border-color: var(--blue); background: #fff; }
.onb-file input[type=file] { width: 100%; font-size: 13.5px; color: var(--text-muted); }
.onb-filelist { margin: 10px 0 0; padding: 0; list-style: none; }
.onb-filelist li {
  font-size: 12.5px; color: var(--navy); background: var(--info-bg);
  border-radius: 6px; padding: 5px 10px; margin-top: 5px;
  display: flex; justify-content: space-between; gap: 10px; font-weight: 600;
}
.onb-filelist li span:last-child { color: var(--text-muted); font-weight: 500; }
.onb-size {
  margin-top: 12px; font-size: 12.5px; font-weight: 700; color: var(--text-muted);
}
.onb-size.is-over { color: var(--fail); }

/* --------------------------------------------------------------- notices --- */
.onb-note {
  border-left: 3px solid var(--blue); background: var(--info-bg);
  padding: 12px 16px; border-radius: 0 8px 8px 0; font-size: 13.5px;
  line-height: 1.6; color: var(--text); margin: 14px 0;
}
.onb-error {
  border-left: 3px solid var(--fail); background: var(--fail-bg); color: var(--fail);
  padding: 12px 16px; border-radius: 0 8px 8px 0; font-size: 13.5px;
  font-weight: 600; margin: 14px 0; display: none;
}
.onb-error.is-shown { display: block; }

/* --------------------------------------------------------------- actions --- */
.onb-actions {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border);
}
.onb-actions .btn { padding: 13px 26px; font-size: 15px; }
.onb-actions .onb-spacer { flex: 1 1 auto; }
.onb-privacy { font-size: 12px; color: var(--text-muted); margin: 18px 0 0; line-height: 1.6; }

/* ------------------------------------------------------ submit overlay ----- */
.onb-overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(20, 22, 46, 0.82); backdrop-filter: blur(3px);
}
.onb-overlay.is-shown { display: flex; }
.onb-overlay-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 34px 34px 30px; max-width: 440px; width: 100%; text-align: center;
}
.onb-overlay-card h2 { margin: 0 0 10px; font-size: 19px; }
.onb-overlay-card h2::before { display: none; }
.onb-overlay-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0 0 20px; }
.onb-spin {
  width: 42px; height: 42px; margin: 0 auto 20px; border-radius: 50%;
  border: 4px solid var(--border); border-top-color: var(--blue);
  animation: onb-spin 0.9s linear infinite;
}
@keyframes onb-spin { to { transform: rotate(360deg); } }
.onb-progress { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.onb-progress i {
  display: block; height: 100%; width: 0%; border-radius: 3px;
  background: var(--accent-gradient); transition: width 0.6s ease;
}
.onb-tasks { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; }
.onb-tasks li {
  font-size: 13px; color: var(--text-muted); padding: 5px 0 5px 26px;
  position: relative; transition: color 0.2s ease;
}
.onb-tasks li::before {
  content: "○"; position: absolute; left: 6px; color: var(--border); font-size: 13px;
}
.onb-tasks li.is-done { color: var(--navy); font-weight: 600; }
.onb-tasks li.is-done::before { content: "✓"; color: var(--ok); font-weight: 700; }

/* ------------------------------------------------------------ thank-you ----- */
.onb-done-icon {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--ok-bg); color: var(--ok);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700;
}

/* ----------------------------------------------------------------- phone --- */
@media (max-width: 720px) {
  .onb-hero { padding: 22px 20px; border-radius: 10px; }
  .onb-hero h1 { font-size: 21px; }
  .onb-card { padding: 20px 18px; border-radius: 10px; }
  .onb-grid, .onb-grid-3 { grid-template-columns: 1fr; gap: 0; }
  .onb-doc iframe { height: 62vh; min-height: 340px; }
  .onb-contract { max-height: none; overflow-y: visible; padding: 18px 16px; font-size: 15px; }
  .onb-step-label { display: none; }
  .onb-steps { gap: 6px; }
  .onb-actions { flex-direction: column-reverse; align-items: stretch; }
  .onb-actions .btn { width: 100%; text-align: center; }
  .onb-actions .onb-spacer { display: none; }
}

/* A control the browser rejected on submit. Native validation only marks the
   one control it is pointing at; this keeps every outstanding field visibly
   flagged while the candidate works back through the form. */
.onb-form .onb-invalid,
.onb-form .onb-invalid:focus {
  border-color: var(--fail);
  background: var(--fail-bg);
  box-shadow: 0 0 0 3px rgba(197, 34, 31, 0.12);
}
.onb-form label.onb-check:has(.onb-invalid) { border-color: var(--fail); background: var(--fail-bg); }
