:root {
  /* ---- COLOUR ---- */
  --bg-primary: #fafaf8;       /* off-white page background */
  --bg-dark: #1a1a1a;          /* dark sections */
  --surface: #ffffff;          /* cards sit just above the off-white */
  --text-primary: #1a1a1a;
  --text-secondary: #5a5550;
  --text-tertiary: #8a8580;
  --text-inverse: #fafaf8;     /* text on dark */
  --border-quiet: rgba(26, 26, 26, 0.08);
  --border-default: rgba(26, 26, 26, 0.15);
  --border-strong: #1a1a1a;
  --accent-error: #7a1f1f;     /* danger / delete only */
  --accent-success: #4a6b54;   /* refined desaturated green */

  /* ---- TYPOGRAPHY ---- */
  --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: var(--font-sans);
  --size-display: 38px;        /* hero headlines */
  --size-statement: 28px;      /* section statements */
  --size-heading: 22px;        /* page headings */
  --size-subheading: 17px;     /* card / list item titles */
  --size-body: 14px;
  --size-small: 13px;
  --size-eyebrow: 10px;        /* letter-spaced caps labels */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* ---- SPACING (vertical rhythm) ---- */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; margin: 0; min-height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: var(--weight-regular);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  /* position:relative is required for overflow-x:hidden to clip on iOS Safari */
  position: relative;
  overflow-x: hidden;
  width: 100%;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--text-primary); }
::selection { background: #1a1a1a; color: #fafaf8; }

/* shared small letter-spaced caps label */
.eyebrow { font-size: var(--size-eyebrow); letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-tertiary); font-weight: var(--weight-regular); margin: 0 0 var(--space-md); }

/* ---- topbar (editorial restraint) ---- */
.topbar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-quiet);
  padding: 1.4rem 1.5rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand { font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--text-primary); text-decoration: none; font-weight: var(--weight-regular); flex: 1; }
.brand span { color: var(--text-secondary); font-weight: var(--weight-regular); }
.topbar nav { display: flex; gap: 1.6rem; align-items: center; }
.topbar nav a { text-decoration: none; font-size: 12px; letter-spacing: 0.06em; color: var(--text-secondary); }
#nav-auth { display: inline-flex; align-items: center; gap: 1rem; }
#user-button { display: flex; align-items: center; }
.topbar nav a:hover { color: var(--text-primary); }
.topbar nav a.nav-signin { color: var(--text-inverse); background: var(--text-primary); padding: 0.5rem 1rem; border-radius: 0; }
.topbar nav a.nav-signin:hover { background: #000; }

#app { flex: 1; max-width: 760px; width: 100%; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }

/* ---- system states ---- */
.loading { color: var(--text-tertiary); padding: 3rem 0; text-align: center; font-size: var(--size-small); }
.empty { color: var(--text-secondary); font-size: var(--size-body); padding: 2rem 0; }
.notfound { padding: 3rem 0; }
.notfound .eyebrow { margin-bottom: var(--space-md); }
.notfound h1 { font-size: var(--size-statement); font-weight: var(--weight-light); margin: 0 0 1rem; }
.notfound a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 4px; font-size: var(--size-small); }

/* ---- cards ---- */
.card { background: var(--surface); border: 1px solid var(--border-default); border-radius: 0; padding: 1.75rem; }
.card.error { color: var(--accent-error); border-color: var(--accent-error); }
.card.muted { color: var(--text-secondary); }

/* ---- buttons ---- */
.btn {
  font-family: inherit; border: 1px solid var(--border-strong); background: transparent; color: var(--text-primary);
  font-size: var(--size-small); font-weight: var(--weight-regular); letter-spacing: 0.01em; text-transform: none;
  padding: 0.8rem 1.4rem; border-radius: 0; cursor: pointer; text-decoration: none; display: inline-block; line-height: 1;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--text-primary); border-color: var(--text-primary); color: var(--text-inverse); }
.btn.primary { background: var(--text-primary); color: var(--text-inverse); border-color: var(--text-primary); }
.btn.primary:hover { background: #000; border-color: #000; }
.btn.block { display: block; width: 100%; text-align: center; padding: 0.95rem; font-size: var(--size-body); }
.btn.small { padding: 0.55rem 1rem; font-size: 12px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; color: var(--text-primary); border-color: var(--border-strong); }
.btn.primary:disabled:hover { background: var(--text-primary); color: var(--text-inverse); }

/* ---- form controls ---- */
input, select, textarea {
  font-family: inherit; font-size: var(--size-body); padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-default); border-radius: 0; background: var(--surface);
  color: var(--text-primary); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--border-strong); }
textarea { resize: vertical; }
label { font-size: var(--size-eyebrow); font-weight: var(--weight-regular); text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-secondary); }

/* ---- jobs board (editorial list rows) ---- */
.bespoke-note { font-size: var(--size-small); color: var(--text-secondary); margin: -1rem 0 1.75rem; line-height: 1.6; }
.consent-legal { font-size: var(--size-small); color: var(--text-tertiary); line-height: 1.6; margin: 1.25rem 0 0.75rem; }
.consent-legal a { color: var(--text-secondary); text-underline-offset: 2px; }
.page-head { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 2rem; }
.page-head h2 { font-size: var(--size-heading); font-weight: var(--weight-light); color: var(--text-primary); margin: 0; letter-spacing: -0.01em; }
.page-head .count { color: var(--text-tertiary); font-weight: var(--weight-regular); font-size: var(--size-small); }
.filters { display: flex; gap: 0.6rem; margin-bottom: 2rem; flex-wrap: wrap; }
.filters input { flex: 1; min-width: 120px; height: 42px; border-radius: 4px; }
.filters .btn { flex-shrink: 0; height: 42px; border-radius: 4px; }
.jobs { display: flex; flex-direction: column; border-top: 1px solid var(--border-default); }
.job-card { position: relative; display: block; padding: 2.2rem 0.25rem; border-bottom: 1px solid var(--border-default); text-decoration: none; color: var(--text-primary); transition: padding-left 0.2s ease, background 0.2s ease; }
.job-card:hover { padding-left: 0.8rem; background: rgba(26, 26, 26, 0.02); }
.job-bar { display: none; }
.job-main { padding: 0; min-width: 0; }
.job-main h3 { font-size: 1.5rem; font-weight: var(--weight-medium); color: var(--text-primary); margin: 0 0 0.35rem; letter-spacing: -0.01em; line-height: 1.25; }
.featured-label { display: inline-block; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #8a7a5a; border: 1px solid #c9b97a; border-radius: 20px; padding: 0.15em 0.7em; margin-left: 0.75rem; vertical-align: middle; position: relative; top: -1px; }
.job-client { color: var(--text-secondary); font-weight: var(--weight-regular); font-size: var(--size-small); font-style: italic; margin-bottom: 0.5rem; }
.job-client.lg { font-size: var(--size-body); margin: 0.4rem 0; }
.job-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 0; font-size: var(--size-small); color: var(--text-secondary); font-weight: var(--weight-regular); }
.job-meta span + span::before { content: '·'; margin-right: 1.5rem; color: var(--border-default); }
.job-meta .salary { font-weight: var(--weight-medium); color: var(--text-primary); }
.job-meta.lg { font-size: var(--size-body); margin: 0.5rem 0 1rem; }
.job-blurb { color: var(--text-tertiary); font-size: var(--size-small); line-height: 1.6; margin: 0.65rem 0 0; max-width: 62ch; }
.job-posted { color: var(--text-tertiary); font-size: 12px; margin-top: 0.65rem; }

/* ---- job detail ---- */
.back { display: inline-block; margin-bottom: 1.5rem; color: var(--text-secondary); font-size: var(--size-small); text-decoration: none; }
.back:hover { color: var(--text-primary); }
.job-detail h1 { font-size: var(--size-statement); font-weight: var(--weight-light); color: var(--text-primary); line-height: 1.2; letter-spacing: -0.01em; margin: 0; }
.job-desc { line-height: 1.7; color: var(--text-secondary); background: transparent; border-left: 1px solid var(--border-default); padding: 0.1rem 0 0.1rem 1.5rem; border-radius: 0; margin: 1.5rem 0; font-size: var(--size-body); }
/* rendered markdown inside the job description */
.job-desc.md > :first-child { margin-top: 0; }
.job-desc.md h3 { font-size: 1.05rem; font-weight: var(--weight-regular); color: var(--text-primary); letter-spacing: 0; margin: 1.6rem 0 0.6rem; }
.job-desc.md h4, .job-desc.md h5 { font-size: 12px; font-weight: var(--weight-regular); text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-tertiary); margin: 1.2rem 0 0.5rem; }
.job-desc.md p { margin: 0 0 0.8rem; }
.job-desc.md ul { margin: 0 0 0.9rem; padding-left: 1.15rem; }
.job-desc.md li { margin: 0.25rem 0; }
.job-desc.md strong { color: var(--text-primary); font-weight: var(--weight-regular); }
.apply-note { font-size: var(--size-small); color: var(--text-tertiary); text-align: center; margin: 0.6rem 0 0; }
.applied-note { background: transparent; border-left: 2px solid var(--accent-success); border-radius: 0; padding: 0.85rem 0 0.85rem 1.25rem; color: var(--accent-success); font-weight: var(--weight-regular); font-size: var(--size-small); }

/* ---- modals ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(26, 26, 26, 0.45); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 1.5rem; }
.modal { background: var(--bg-primary); border-radius: 0; padding: 2.25rem; width: 100%; max-width: 460px; box-shadow: 0 30px 60px rgba(26, 26, 26, 0.25); }
.modal h2 { font-size: var(--size-heading); font-weight: var(--weight-light); color: var(--text-primary); margin: 0 0 1rem; line-height: 1.25; }
.modal p { margin: 0 0 1.5rem; line-height: 1.6; color: var(--text-secondary); font-size: var(--size-body); }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; }

/* ---- apply success ---- */
.apply-success { text-align: center; padding: 3rem 2rem; }
.apply-success .tick { width: 52px; height: 52px; border-radius: 50%; background: transparent; border: 1px solid var(--text-primary); color: var(--text-primary); font-size: 1.4rem; font-weight: var(--weight-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; }
.apply-success h2 { font-size: var(--size-heading); font-weight: var(--weight-light); color: var(--text-primary); margin: 0 0 0.5rem; }
.apply-success p { color: var(--text-secondary); margin: 0 0 1.75rem; font-size: var(--size-body); }

/* ---- profile ---- */
.card.prof { margin-bottom: 1rem; }
.prof h3 { font-size: var(--size-eyebrow); font-weight: var(--weight-regular); text-transform: uppercase; letter-spacing: 0.22em; color: var(--text-tertiary); margin: 0 0 1.25rem; }
.prof form label { display: block; margin: 1.1rem 0 0.4rem; }
.prof form .btn { margin-top: 1.5rem; }
.prof input:disabled, .prof textarea:disabled, .prof select:disabled { background: var(--bg-primary); color: var(--text-secondary); border-color: var(--border-quiet); }
.prof-id { display: flex; align-items: center; gap: 1.75rem; margin-bottom: 1.25rem; min-width: 0; }
.id-checklist { display: flex; flex-direction: column; gap: 1rem; flex: 1; min-width: 0; }
.id-check-row { display: flex; align-items: center; gap: 0.85rem; }
.id-check-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-default); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; color: transparent; }
.check-done .id-check-dot { background: #2d7a52; border-color: #2d7a52; color: #fff; }
.check-failed .id-check-dot { background: var(--accent-error); border-color: var(--accent-error); color: #fff; }
.id-check-text { font-size: var(--size-small); color: var(--text-secondary); display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; line-height: 1.5; }
.check-done .id-check-text { color: var(--text-tertiary); }
.check-failed .id-check-text { color: var(--accent-error); }
@keyframes nudge { 0%,100% { transform: scale(1); } 40% { transform: scale(1.08); } }
.btn-nudge { animation: nudge 0.35s ease 0.2s 2; }
.avatar-edit-btn { background: none; border: 3px solid transparent; padding: 0; cursor: pointer; position: relative; border-radius: 50%; flex-shrink: 0; transition: border-color 0.15s; }
.avatar-edit-btn:hover, .avatar-edit-btn:focus-visible { border-color: var(--border-strong); outline: none; }
.avatar-edit-overlay { position: absolute; inset: 0; border-radius: 50%; background: rgba(26,26,26,0.52); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.avatar-edit-btn:hover .avatar-edit-overlay, .avatar-edit-btn:focus-visible .avatar-edit-overlay { opacity: 1; }
/* When no photo is set: show the overlay and dashed border always so it's obvious */
.avatar-edit-btn.no-photo { border: 3px dashed var(--border-default); }
.avatar-edit-btn.no-photo .avatar-edit-overlay { opacity: 1; background: rgba(26,26,26,0.45); }
.avatar-photo-hint { margin: 0.35rem 0 0; font-size: var(--size-small); color: var(--text-secondary); }
.avatar-lg { width: 160px; height: 160px; border-radius: 50%; background: var(--text-primary); color: var(--text-inverse); display: flex; align-items: center; justify-content: center; font-weight: var(--weight-light); font-size: 3rem; overflow: hidden; }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
/* Profile photo modal */
.photo-modal-overlay { position: fixed; inset: 0; background: rgba(26,26,26,0.6); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.photo-modal { background: var(--bg-primary); border-radius: 0; padding: 2rem; width: 100%; max-width: 380px; box-shadow: 0 30px 60px rgba(26,26,26,0.3); }
.photo-modal-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.photo-modal-close { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--text-tertiary); padding: 0 0.1rem; }
.photo-modal-close:hover { color: var(--text-primary); }
.photo-modal-note { font-size: var(--size-small); color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.6; }
.photo-modal-opts { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.photo-modal-video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 0; background: #000; display: block; margin-bottom: 0.75rem; }
.photo-modal-canvas { display: block; width: 220px; height: 220px; border-radius: 50%; margin: 0 auto 0.75rem; object-fit: cover; }
.photo-modal-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.dna-wrap { margin: 0; padding: 0.95rem 0; border-top: 1px solid var(--border-quiet); }
.dna-label { display: block; font-size: var(--size-body); color: var(--text-primary); line-height: 1.45; margin-bottom: 0.3rem; }
.dna-hint { font-size: var(--size-small); color: var(--text-secondary); margin: 0 0 0.6rem; }
.dna-input { width: 100%; }
.photo-crop-wrap { margin-bottom: 0.5rem; }
.photo-crop-circle { width: 220px; height: 220px; border-radius: 50%; overflow: hidden; position: relative; cursor: grab; margin: 0 auto; border: 2px solid var(--border-default); touch-action: none; user-select: none; }
.photo-crop-circle:active { cursor: grabbing; }
.photo-crop-img { position: absolute; max-width: none; pointer-events: none; user-select: none; }
.photo-crop-hint { text-align: center; font-size: var(--size-small); color: var(--text-tertiary); margin: 0.5rem 0 0; }
.checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0.5rem 0; }
.chk { display: inline-flex; align-items: center; gap: 0.45rem; text-transform: none; font-weight: var(--weight-regular); letter-spacing: 0; font-size: var(--size-small); color: var(--text-primary); cursor: pointer; margin: 0; }
.chk input { width: auto; }
.prof-toggle { font-family: inherit; background: none; border: none; color: var(--text-primary); font-weight: var(--weight-regular); font-size: var(--size-small); cursor: pointer; padding: 0; text-transform: none; text-decoration: underline; text-underline-offset: 3px; }
.acct-note { color: var(--text-secondary); font-size: var(--size-small); line-height: 1.6; margin: 0 0 1.25rem; }
.acct-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.btn.danger { border-color: var(--accent-error); color: var(--accent-error); background: transparent; }
.btn.danger:hover { background: var(--accent-error); border-color: var(--accent-error); color: var(--text-inverse); }
.btn.danger:disabled { opacity: 0.4; }
.btn.danger:disabled:hover { background: transparent; color: var(--accent-error); }

/* ---- identity verify modal (CP7) ---- */
/* Identity verification status (profile) */
.verify-status { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.verify-status .unverified { color: var(--text-secondary); font-size: var(--size-small); }
.verify-status .verify-failed { color: var(--accent-error); font-size: var(--size-small); }
.apply-success-link { display: inline-block; margin-top: 0.9rem; color: var(--text-secondary); font-size: var(--size-small); text-decoration: underline; text-underline-offset: 3px; }
.apply-success-link:hover { color: var(--text-primary); }

.verify-modal { text-align: center; }
.verify-modal .eyebrow { color: var(--text-tertiary); }
.verify-modal h2 { text-align: center; }
.verify-modal p { text-align: center; }
.verify-note { color: var(--text-tertiary); font-size: var(--size-small); font-style: italic; }
.verify-modal .modal-actions { justify-content: center; }

/* ---- NDA modal (wider, scrollable body) ---- */
.nda-modal { max-width: 620px !important; }
.nda-body { max-height: 42vh; overflow-y: auto; padding: 1.1rem 1rem; margin: 1rem 0 0; background: var(--bg-secondary, #f5f4f1); border: 1px solid var(--border-default); font-size: var(--size-small); line-height: 1.75; color: var(--text-secondary); white-space: pre-wrap; }

/* ---- candidate message overlay ---- */
.msg-modal { max-width: 580px !important; }
.msg-modal h2 { margin-bottom: 0.25rem; }
.msg-body { max-height: 50vh; overflow-y: auto; padding: 1.1rem 1rem; margin: 1rem 0 1.5rem; background: var(--bg-secondary, #f5f4f1); border: 1px solid var(--border-default); font-size: var(--size-small); line-height: 1.75; color: var(--text-secondary); white-space: pre-wrap; }

/* ---- message history list ---- */
.msg-history { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.msg-history-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border-default); font-size: var(--size-small); }
.msg-history-row:last-child { border-bottom: none; }
.msg-subject { color: var(--text-primary); font-weight: var(--weight-medium); }
.msg-meta { font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
.unread-badge { background: var(--accent, #1a1a1a); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 3px; font-weight: var(--weight-semibold); letter-spacing: 0.05em; text-transform: uppercase; vertical-align: middle; }

/* ---- delete-account confirmation (CP6) ---- */
.del-prompt { margin: 0 0 0.5rem; font-size: var(--size-small); color: var(--text-secondary); }
.del-input { width: 100%; box-sizing: border-box; margin-bottom: 1.5rem; letter-spacing: 0.2em; font-weight: var(--weight-regular); text-align: center; text-transform: uppercase; border: 1px solid var(--accent-error); border-radius: 0; padding: 0.7rem; color: var(--accent-error); }
.del-input:focus { outline: none; border-color: var(--accent-error); box-shadow: 0 0 0 2px rgba(122, 31, 31, 0.12); }

/* ---- welcome celebration ---- */
.celebrate-overlay { position: fixed; inset: 0; background: rgba(26, 26, 26, 0.88); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 1.5rem; }
.celebrate-card { background: var(--bg-primary); border-radius: 0; padding: 3rem 2rem; max-width: 380px; width: 100%; text-align: center; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4); animation: celebrate-pop 0.35s ease-out; }
@keyframes celebrate-pop { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.celebrate-tick { margin-bottom: 1.5rem; }
.celebrate-tick svg { display: block; margin: 0 auto; }
.tick-path { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw-tick 0.5s ease-out 0.2s forwards; }
@keyframes draw-tick { to { stroke-dashoffset: 0; } }
.celebrate-card h2 { font-family: var(--font-sans); font-weight: var(--weight-light); font-size: var(--size-statement); color: var(--text-primary); margin: 0 0 0.5rem; line-height: 1.2; }
.celebrate-card p { font-family: var(--font-sans); font-weight: var(--weight-regular); font-size: var(--size-body); color: var(--text-secondary); margin: 0 0 1.75rem; line-height: 1.6; }
.celebrate-card .btn { margin-bottom: 0.85rem; }
.celebrate-profile { display: inline-block; color: var(--text-secondary); font-weight: var(--weight-regular); font-size: var(--size-small); text-decoration: underline; text-underline-offset: 3px; }
.celebrate-profile:hover { color: var(--text-primary); }
@media (prefers-reduced-motion: reduce) {
  .celebrate-card { animation: none; }
  .tick-path { animation: none; stroke-dashoffset: 0; }
}

/* ---- welcome wizard ---- */
.wiz-progress { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0 1.5rem; }
.wiz-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-default); }
.wiz-dot.on { background: var(--text-primary); }
.wiz-step { margin-left: auto; font-size: var(--size-eyebrow); font-weight: var(--weight-regular); text-transform: uppercase; letter-spacing: 0.22em; color: var(--text-tertiary); }
.wiz-card { border: 1px solid var(--border-default); border-radius: 0; padding: 2rem; box-shadow: none; }
/* CV analysis progress bar */
.cv-analyse { padding: 2rem 0 1rem; text-align: center; }
.cv-analyse-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 1rem; }
.cv-analyse-track { height: 2px; background: var(--border-default); border-radius: 2px; overflow: hidden; }
.cv-analyse-bar { height: 100%; width: 0%; background: var(--text-primary); border-radius: 2px; transition: width 0.3s ease; }

.wiz-welcome-card { padding: 2.5rem 2rem; }
.wiz-welcome-card .eyebrow { margin-bottom: 1rem; }
.wiz-welcome-card h2 { font-size: clamp(26px, 3vw, 36px); margin-top: 0; margin-bottom: 1.5rem; }
.wiz-welcome-card p { font-size: 15px; line-height: 1.75; color: var(--text-secondary); margin: 0; }
.wiz-card h2 { font-size: var(--size-heading); font-weight: var(--weight-light); color: var(--text-primary); margin: 0 0 0.5rem; line-height: 1.25; }
.wiz-card h3 { font-size: var(--size-eyebrow); font-weight: var(--weight-regular); text-transform: uppercase; letter-spacing: 0.22em; color: var(--text-tertiary); margin: 1.75rem 0 0.85rem; }
.wiz-card form label { display: block; margin: 1.1rem 0 0.4rem; }
.wiz-card form label.radio, .wiz-card form label.toggle-row { margin: 0; }
.row2 { display: flex; gap: 0.6rem; }
.row2 input { flex: 1; }
.row2 select { flex: 0 0 90px; }
.help { font-size: var(--size-small); color: var(--text-tertiary); margin: 0.4rem 0 0.5rem; font-style: italic; }
.field-note { display: block; font-size: 12px; font-weight: 400; color: var(--text-tertiary); margin-top: 0.2rem; font-style: italic; letter-spacing: 0; text-transform: none; }
.dropzone { border: 1px dashed var(--border-default); border-radius: 0; padding: 2.25rem 1.25rem; text-align: center; cursor: pointer; background: var(--surface); margin: 0.5rem 0 1rem; transition: background 0.15s, border-color 0.15s; }
.dropzone:hover { background: rgba(26, 26, 26, 0.02); border-color: var(--text-tertiary); }
.dz-arrow { font-size: 1.6rem; color: var(--text-tertiary); font-weight: var(--weight-light); }
.dropzone p { margin: 0.4rem 0; }
.dz-browse { color: var(--text-primary); font-weight: var(--weight-regular); text-decoration: underline; text-underline-offset: 3px; }
.cv-status { margin-bottom: 1rem; font-size: var(--size-small); }
.cv-current { font-size: var(--size-body); }
.small { font-size: var(--size-small); }
.wiz-actions { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.5rem; }
.radios { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.5rem 0; }
.radio { display: flex; align-items: flex-start; gap: 0.6rem; text-transform: none; font-weight: var(--weight-regular); font-size: var(--size-body); letter-spacing: 0; color: var(--text-primary); cursor: pointer; line-height: 1.4; }
.radio input { width: auto; margin-top: 0.2rem; flex-shrink: 0; }
.toggle-row { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--border-quiet); text-transform: none; font-weight: var(--weight-regular); letter-spacing: 0; cursor: pointer; }
.toggle-row .switch-label { flex: 1; font-size: var(--size-body); color: var(--text-primary); line-height: 1.45; }

/* iOS-style toggle — monochrome (position is the signal, not colour). The real
   checkbox sits transparent over the track for a11y / keyboard / form submission. */
.switch { position: relative; display: inline-block; flex-shrink: 0; width: 46px; height: 28px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch-track { position: absolute; inset: 0; border-radius: 999px; background: var(--border-default); transition: background 200ms ease; pointer-events: none; }
.switch-track::before { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 200ms ease; }
.switch input:checked + .switch-track { background: var(--text-primary); }
.switch input:checked + .switch-track::before { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--text-primary); }

/* visually hidden but focusable / announced */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Editorial "Yes · No" consent choice. fieldset/legend for a11y; the radios are
   visually hidden (focusable) and the words are the control. Position is the
   signal — selected word is near-black/medium, unselected muted. */
/* Consent toggle rows */
.consent-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0.95rem 0; border-bottom: 1px solid var(--border-quiet); }
.ct-label { flex: 1; min-width: 0; }
.ct-statement { display: block; font-size: var(--size-body); color: var(--text-primary); line-height: 1.45; }
.ct-date { display: block; margin-top: 0.2rem; font-size: var(--size-small); color: var(--text-tertiary); }
/* Toggle switch */
.toggle-sw { position: relative; flex-shrink: 0; cursor: pointer; }
.toggle-sw input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-track { display: block; width: 44px; height: 24px; border-radius: 12px; background: var(--border-default); transition: background 180ms ease; }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 180ms ease; }
.toggle-sw input:checked ~ .toggle-track { background: var(--text-primary); }
.toggle-sw input:checked ~ .toggle-track .toggle-thumb { transform: translateX(20px); }
.toggle-sw input:focus-visible ~ .toggle-track { outline: 2px solid var(--text-primary); outline-offset: 2px; }
/* Profile dashboard */
.prof-dashboard { background: var(--bg-card); border: 1px solid var(--border-quiet); border-radius: var(--card-radius); padding: 1.8rem; margin-bottom: 1.2rem; }
.pd-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.pd-greeting { font-size: clamp(20px, 2.2vw, 26px); font-weight: 300; letter-spacing: -0.01em; margin: 0 0 0.5rem; }
.pd-meta { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.pd-status-chip { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); background: var(--bg-primary); border: 1px solid var(--border-quiet); border-radius: 3px; padding: 3px 8px; white-space: nowrap; }
.pd-cv-date { font-size: var(--size-small); color: var(--text-tertiary); }
.pd-comp-header { display: flex; justify-content: space-between; font-size: var(--size-small); color: var(--text-secondary); margin-bottom: 0.5rem; }
.pd-comp-header strong { color: var(--text-primary); }
.pd-comp-bar { height: 4px; background: var(--border-quiet); border-radius: 2px; overflow: hidden; }
.pd-comp-fill { height: 100%; background: var(--text-primary); border-radius: 2px; transition: width 0.4s ease; }
.pd-comp-tips { margin: 0.5rem 0 0; font-size: var(--size-small); color: var(--text-tertiary); }
.pd-comp-done { color: var(--text-secondary); }
.form-error { color: var(--accent-error); font-weight: var(--weight-regular); font-size: var(--size-small); margin: 0.75rem 0; }

/* ---- claim confirmation ---- */
.claim-wrap { max-width: 560px; margin: 0.5rem auto; }
.claim-card { border: 1px solid var(--border-default); border-radius: 0; padding: 2rem; box-shadow: none; }
.claim-card h2 { font-size: var(--size-statement); font-weight: var(--weight-light); color: var(--text-primary); margin: 0 0 1rem; line-height: 1.2; letter-spacing: -0.01em; }
.claim-card p { line-height: 1.6; margin: 0 0 1rem; color: var(--text-secondary); font-size: var(--size-body); }
.claim-card p strong { color: var(--text-primary); font-weight: var(--weight-regular); }
.claim-card h3 { font-size: var(--size-eyebrow); font-weight: var(--weight-regular); text-transform: uppercase; letter-spacing: 0.22em; color: var(--text-tertiary); margin: 1.75rem 0 0.85rem; }
.id-card { background: var(--surface); border: 1px solid var(--border-default); border-radius: 0; padding: 1.1rem 1.25rem; margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; }
.id-row { display: flex; flex-direction: column; gap: 0.15rem; }
.id-label { font-size: var(--size-eyebrow); font-weight: var(--weight-regular); text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-tertiary); }
.id-value { font-size: var(--size-body); font-weight: var(--weight-regular); color: var(--text-primary); }
.claim-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.claim-actions .btn { text-transform: none; letter-spacing: 0.01em; font-weight: var(--weight-regular); font-size: var(--size-body); padding: 0.85rem 1.1rem; }
.fresh-confirm { margin-top: 1rem; background: var(--surface); border: 1px solid var(--border-default); border-radius: 0; padding: 1rem 1.25rem; }
.fresh-confirm p { font-size: var(--size-body); margin: 0 0 0.8rem; }
.fresh-confirm-actions { display: flex; gap: 0.6rem; justify-content: flex-end; }

/* ---- cookie notice + toast ---- */
.cookie { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; background: var(--bg-dark); color: var(--text-inverse); border-radius: 0; padding: 0.9rem 1.1rem; display: flex; align-items: center; gap: 1rem; font-size: var(--size-small); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); z-index: 40; }
.cookie span { flex: 1; }
.cookie .btn { background: var(--text-inverse); border-color: var(--text-inverse); color: var(--text-primary); flex-shrink: 0; }
.cookie .btn:hover { background: #e8e6e1; border-color: #e8e6e1; }
.toast { position: fixed; bottom: 5.5rem; left: 50%; transform: translateX(-50%); background: var(--bg-dark); color: var(--text-inverse); padding: 0.8rem 1.2rem; border-radius: 0; font-size: var(--size-small); font-weight: var(--weight-regular); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); z-index: 50; max-width: 90%; text-align: center; }
.hidden { display: none !important; }

/* ---- footer ---- */
.footer {
  border-top: 1px solid var(--border-quiet);
  padding: 1.5rem;
  background: var(--bg-primary);
}
.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-brand {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-primary);
  font-weight: var(--weight-regular);
  text-decoration: none;
  flex: 1;
  white-space: nowrap;
}
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-links a { font-size: 12px; color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--text-primary); }
.footer-copy { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }

/* ---- CV meta block ---- */
.cv-meta { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 0.1rem; }
.cv-meta-name { font-size: var(--size-body); color: var(--text-primary); }
.cv-meta-date { font-size: 12px; color: var(--text-secondary); }
/* ---- CV buttons — equal width side by side ---- */
.cv-btns { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.75rem; }
.cv-btns .btn { flex: 1; text-align: center; white-space: nowrap; }

/* ---- mobile nav ---- */
@media (max-width: 560px) {
  /* Prevent iOS Safari auto-zoom on input focus (triggers when font-size < 16px) */
  input, select, textarea { font-size: 16px; }
  .topbar { padding: 1rem 1.2rem; flex-wrap: nowrap; overflow: hidden; }
  .brand { font-size: 10px; letter-spacing: 0.18em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand span { display: none; }
  .topbar nav { gap: 0.8rem; flex-shrink: 0; }
  /* hide "My profile" text link — Clerk avatar stays as the profile entry point */
  .nav-profile { display: none; }
  #user-button { margin-left: 0 !important; }
  /* shrink avatar on mobile so it doesn't dominate the identity card */
  .avatar-lg { width: 100px; height: 100px; font-size: 2rem; }
  .footer-inner { gap: 1rem; }
  .footer-links { gap: 0.9rem; }
  /* dashboard header: stack greeting and button vertically on small screens */
  .pd-top { flex-direction: column; gap: 0.75rem; }
  .pc-trigger { margin-left: 0; width: 100%; }
  /* account buttons: stack full-width so all three are the same size */
  .acct-actions { flex-direction: column; }
}

/* ---- Profile card ---- */
.page-head { justify-content: space-between; align-items: center; }
.pc-trigger { margin-left: auto; flex-shrink: 0; }

/* ---- Profile card ---- */
.pc-overlay { position: fixed; inset: 0; z-index: 900; display: flex; align-items: flex-end; justify-content: center; }
.pc-backdrop { position: absolute; inset: 0; background: rgba(10,10,10,0.7); opacity: 0; transition: opacity 0.35s ease; backdrop-filter: blur(2px); }
.pc-sheet { position: relative; background: var(--bg-primary); width: 100%; max-height: 96vh; max-height: 96dvh; overflow-y: auto; transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.32,0.72,0,1); border-radius: 20px 20px 0 0; display: flex; flex-direction: column; }
.pc-open .pc-backdrop { opacity: 1; }
.pc-open .pc-sheet { transform: translateY(0); }

.pc-close { position: absolute; top: 1.1rem; right: 1.3rem; z-index: 10; background: rgba(250,250,248,0.15); border: none; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: rgba(250,250,248,0.8); cursor: pointer; transition: background 0.15s; }
.pc-close:hover { background: rgba(250,250,248,0.25); color: #fafaf8; }

/* Dark header */
.pc-header { background: var(--text-primary); padding: 2.5rem 2rem 2.2rem; position: sticky; top: 0; z-index: 2; }
.pc-header-top { display: flex; gap: 1.5rem; align-items: flex-start; }
.pc-avatar { width: 100px; height: 100px; border-radius: 50%; background: rgba(250,250,248,0.1); border: 1.5px solid rgba(250,250,248,0.2); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 300; color: rgba(250,250,248,0.7); flex-shrink: 0; overflow: hidden; }
.pc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pc-avatar.no-photo { border-style: dashed; }
.pc-header-id { min-width: 0; padding-top: 0.25rem; }
.pc-eyebrow { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(250,250,248,0.4); margin: 0 0 0.6rem; }
.pc-name { font-size: 24px; font-weight: 300; color: #fafaf8; margin: 0 0 0.4rem; letter-spacing: -0.01em; line-height: 1.15; }
.pc-title { font-size: 13px; color: rgba(250,250,248,0.6); margin: 0 0 0.75rem; line-height: 1.5; }
.pc-sep { margin: 0 0.4em; opacity: 0.4; }
.pc-verified-badge { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #6ec99a; margin: 0; }
.pc-tick { font-size: 10px; }

/* Body */
.pc-body { padding: 0 2rem 1.5rem; flex: 1; }
.pc-section { padding: 1.4rem 0; border-bottom: 1px solid var(--border-quiet); }
.pc-section:first-child { border-top: none; }
.pc-section-label { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-tertiary); margin: 0 0 0.9rem; }
.pc-summary { font-size: 14px; color: var(--text-secondary); line-height: 1.75; margin: 0; }

.pc-meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.5rem; }
.pc-meta-item { display: flex; flex-direction: column; gap: 0.2rem; }
.pc-meta-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); }
.pc-meta-value { font-size: 14px; color: var(--text-primary); line-height: 1.4; }
.pc-link { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }

.pc-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.pc-chip { font-size: 12px; color: var(--text-primary); background: transparent; border: 1px solid var(--border-default); border-radius: 3px; padding: 0.3rem 0.7rem; letter-spacing: 0.02em; line-height: 1.4; }

.pc-missing { padding: 1.2rem 0 0; }
.pc-missing-text { font-size: 12px; color: var(--text-tertiary); margin: 0; font-style: italic; }

/* Footer brand bar */
.pc-footer-brand { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 2rem; border-top: 1px solid var(--border-quiet); }
.pc-footer-name { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-tertiary); }
.pc-footer-tag { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--border-default); }

@media (min-width: 640px) {
  .pc-overlay { align-items: center; }
  .pc-sheet { border-radius: 16px; max-width: 620px; max-height: 88vh; max-height: 88dvh; }
  .pc-open .pc-sheet { transform: translateY(0) scale(1); animation: pc-pop 0.35s cubic-bezier(0.34,1.4,0.64,1); }
  @keyframes pc-pop { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
  .pc-header { padding: 3rem 2.5rem 2.5rem; border-radius: 16px 16px 0 0; }
  .pc-avatar { width: 120px; height: 120px; font-size: 2.5rem; }
  .pc-name { font-size: 30px; }
  .pc-body { padding: 0 2.5rem 2rem; }
  .pc-footer-brand { padding: 1.1rem 2.5rem; }
}
