/* Option 3 theme tokens retain the existing product layout and interaction hierarchy. */
:root {
  color-scheme: light;
  --ink: #182b32;
  --ink-soft: #30444b;
  --muted: #64748b;
  --paper: #f8fafc;
  --surface: #ffffff;
  --line: #e5e7eb;
  --lime: #2563eb;
  --lime-dark: #0f172a;
  --orange: #fff0d9;
  --danger: #a84b43;
  --shadow: 0 14px 40px #0f172a0a;
  --radius: 22px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

/* The shared document surface stays fluid without hiding overflow or focus indicators. */
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f8fafc; font-size: 14px; line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, a { touch-action: manipulation; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #2563eb; outline-offset: 4px; }
svg { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(28px, 3vw, 38px); line-height: 1.16; letter-spacing: -1.5px; font-weight: 750; }
h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.6px; }
h3 { font-size: 16px; line-height: 1.4; letter-spacing: -.2px; }
small { font-size: 12px; }

/* Desktop navigation is a quiet, fixed-width column beside the application viewport. */
.app-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); max-width: 1160px; min-height: 100dvh; margin: 0 auto; background: var(--paper); box-shadow: 0 0 70px #0f172a08; }
.app-content { min-width: 0; position: relative; }
.sidebar { display: flex; flex-direction: column; gap: 7px; padding: 33px 20px 24px; border-right: 1px solid var(--line); background: #ffffff; min-height: 100dvh; position: sticky; top: 0; height: 100dvh; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 23px; letter-spacing: -1.1px; font-weight: 800; text-decoration: none; margin-bottom: 42px; }
.brand-mark { display: grid; place-items: center; height: 36px; width: 36px; background: var(--lime); border-radius: 12px; transform: rotate(-7deg); font-size: 26px; line-height: 1; color: var(--ink); }
.brand-mark svg { transform: rotate(7deg); }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; border: 0; border-radius: 12px; padding: 11px 14px; color: #475569; background: transparent; text-align: left; font-weight: 600; }
.nav-item:hover { background: #f8fafc; }
.nav-item.active { background: var(--ink); color: white; }
.nav-item.active svg { color: var(--lime); }
.sidebar-bottom { margin-top: auto; padding: 20px 9px 0; color: var(--muted); font-size: 12px; }
.sidebar-bottom p + p { margin-top: 6px; }
.sidebar .eyebrow { padding: 0 13px; margin-bottom: 7px; }

/* The header and demo strip separate ordinary navigation from prototype controls. */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 86px; padding: 0 36px; border-bottom: 1px solid var(--line); }
.topbar .brand { display: none; margin: 0; }
.location { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #475569; }
.location svg { width: 16px; height: 16px; }
.avatar-button { border: 0; background: var(--ink); color: white; border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; font-size: 12px; font-weight: 700; overflow: hidden; padding: 0; }
.avatar-button img { width: 100%; height: 100%; object-fit: cover; }
.demo-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 46px; padding: 9px 36px; background: #f8fafc; border-bottom: 1px solid var(--line); color: #475569; font-size: 11px; }
.demo-bar select { border: 0; background: transparent; color: var(--ink); font-size: 12px; font-weight: 650; padding: 3px 18px 3px 3px; max-width: 180px; }
.demo-bar button { background: transparent; border: 0; padding: 4px 6px; color: #475569; font-size: 11px; }
.demo-bar button:hover { color: var(--ink); text-decoration: underline; }
.demo-bar label, .demo-bar > div { display: flex; align-items: center; gap: 8px; }
.main { padding: 32px 36px 44px; max-width: 944px; margin: 0 auto; }
.page-head { margin-bottom: 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.page-head p { margin-top: 9px; color: var(--muted); max-width: 500px; }
.eyebrow { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: #64748b; font-weight: 750; margin-bottom: 8px; }
.muted { color: var(--muted); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 27px 0 15px; }
.section-heading h2 { font-size: 18px; }
.section-heading .muted { font-size: 12px; }

/* Pills and action controls have consistent hierarchy and adequate finger targets. */
.pill, .chip, .badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%; padding: 5px 9px; border-radius: 7px; background: #f8fafc; font-size: 10px; line-height: 1.5; font-weight: 650; }
.pill.green { background: #e5e7eb; color: #0f172a; }
.pill.dark { background: #ffffff19; color: #f8fafc; }
.pill.orange { background: var(--orange); color: #95641e; }
.pill.blue { background: #e7eff5; color: #486b83; }
.pill svg, .badge svg { width: 12px; height: 12px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px; padding: 12px 18px; border: 1px solid transparent; border-radius: 12px; font-size: 13px; line-height: 1.35; font-weight: 700; text-decoration: none; transition: background .15s, transform .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button.primary { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.button.primary:hover:not(:disabled) { background: #2563eb; }
.button.secondary { color: white; background: var(--ink); }
.button.secondary:hover:not(:disabled) { background: #0f172a; }
.button.ghost { color: var(--ink); background: var(--surface); border-color: var(--line); }
.button.ghost:hover:not(:disabled) { background: #f8fafc; }
.button.danger { background: #faeeeb; color: var(--danger); }
.button.small { min-height: 36px; padding: 8px 12px; font-size: 11px; border-radius: 10px; }
.button.full { width: 100%; }
.button svg { width: 17px; height: 17px; }
.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; flex-shrink: 0; }
.icon-button:hover { background: #f8fafc; }
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: #475569; font-size: 12px; padding: 0; margin-bottom: 17px; }
.back-link svg { width: 16px; height: 16px; }
.count { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 50%; background: var(--lime); font-size: 10px; color: var(--ink); font-weight: 750; }

/* Home combines a focused job card with three small, direct category entries. */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.feature-job { position: relative; overflow: hidden; padding: 27px; border-radius: var(--radius); background: var(--ink); color: white; min-height: 240px; display: flex; flex-direction: column; align-items: flex-start; gap: 17px; }
.feature-job h2 { font-size: 28px; max-width: 380px; letter-spacing: -.8px; }
.feature-job p { color: #cbd5e1; font-size: 13px; max-width: 350px; }
.feature-job .muted { color: #cbd5e1; }
.feature-job .button { margin-top: auto; }
.feature-job .summary-row { width: 100%; border-color: #ffffff22; }
.feature-job .job-photo { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .16; z-index: 0; border-radius: inherit; }
.feature-job > :not(.job-photo) { position: relative; z-index: 1; }
.job-photo { width: 100%; height: 160px; object-fit: cover; border-radius: 16px; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.category-card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 20px 15px; text-align: left; color: var(--ink); min-height: 146px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; transition: border-color .15s, transform .15s; }
.category-card:hover { border-color: #64748b; transform: translateY(-2px); }
.category-card > svg { width: 26px; height: 26px; padding: 0; color: #475569; margin-bottom: 4px; }
.category-card p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.category-card strong { font-size: 13px; }
.mini-list { display: grid; gap: 10px; }
.mini-job { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: white; border: 1px solid var(--line); border-radius: 14px; text-align: left; width: 100%; color: var(--ink); }
.mini-job > div { flex: 1; min-width: 0; }
.mini-job img { width: 54px; height: 54px; object-fit: cover; border-radius: 12px; }
.mini-job p { color: var(--muted); font-size: 11px; margin-top: 4px; }
.mini-job > svg { color: #475569; }
.empty { text-align: center; padding: 40px 24px; border: 1px dashed #cbd5e1; border-radius: 20px; color: var(--muted); background: #ffffff; }
.empty h2, .empty h3 { color: var(--ink); margin-bottom: 8px; }
.empty .button { margin-top: 18px; }
.empty > svg { width: 36px; height: 36px; color: #64748b; margin-bottom: 14px; }

/* Shared data rows display counts and money without nesting another layer of cards. */
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.summary-row:last-child { border-bottom: 0; }
.summary-row.total { font-size: 16px; font-weight: 750; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.stat { padding: 15px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.stat strong { display: block; font-size: 23px; letter-spacing: -.8px; }
.stat span, .stat small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.split { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Compact forms use explicit labels and selectable choices instead of lengthy onboarding. */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label, label.field > span { color: var(--ink); font-size: 12px; font-weight: 650; }
.field small { color: var(--muted); font-size: 11px; }
.field-wide { grid-column: 1 / -1; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select { width: 100%; color: var(--ink); background: white; border: 1px solid #e5e7eb; border-radius: 11px; padding: 12px 13px; min-height: 46px; }
textarea { resize: vertical; min-height: 90px; }
input::placeholder, textarea::placeholder { color: #64748b; }
input[type=checkbox], input[type=radio] { accent-color: #0f172a; width: 17px; height: 17px; }
input[type=range] { width: 100%; accent-color: #475569; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice, .radio-card { padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line); background: white; color: var(--ink); text-align: left; font-size: 12px; min-height: 44px; }
.choice.selected, .radio-card.selected { border-color: #475569; background: #f8fafc; box-shadow: inset 0 0 0 1px #475569; }
.radio-card { display: flex; align-items: center; gap: 11px; }
.step-indicator { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; margin: 0 0 24px; }
.step-indicator span { height: 4px; flex: 1; border-radius: 4px; background: #e5e7eb; }
.step-indicator .active, .step-indicator .done { background: #475569; }

/* Matching gives the portrait prominence while keeping three performance summaries visible. */
.browse-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 17px; flex-wrap: wrap; }
.candidate-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(205px, 1fr); gap: 20px; align-items: start; }
.candidate-card { border: 1px solid var(--line); border-radius: var(--radius); background: white; overflow: hidden; box-shadow: var(--shadow); touch-action: pan-y; transition: transform .18s, opacity .18s; }
.portrait { position: relative; height: 290px; overflow: hidden; background: #e5e7eb; }
.portrait > img { height: 100%; width: 100%; object-fit: cover; object-position: center 33%; }
.portrait-shade { position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, #0f172ac4); pointer-events: none; }
.portrait-caption { position: absolute; bottom: 20px; left: 22px; right: 22px; color: white; }
.portrait-caption h2 { font-size: 29px; letter-spacing: -.9px; }
.portrait-caption p { font-size: 12px; margin-top: 5px; color: #f8fafc; }
.portrait > .pill { position: absolute; top: 16px; left: 16px; background: #f8fafcf0; }
.portrait .icon-button { position: absolute; top: 14px; right: 14px; border: 0; border-radius: 50%; background: #ffffffde; }
.candidate-body { padding: 20px 22px 22px; }
.candidate-body > p { color: #475569; font-size: 12px; line-height: 1.7; margin: 14px 0; }
.score-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 15px; }
.score-cell { padding: 0 10px; border-left: 1px solid var(--line); text-align: center; min-width: 0; }
.score-cell:first-child { border-left: 0; padding-left: 0; }
.score-cell:last-child { padding-right: 0; }
.score-cell strong { display: block; font-size: 24px; line-height: 1.2; letter-spacing: -.8px; }
.score-cell span { display: block; font-size: 10px; color: #475569; margin-top: 5px; }
.score-cell small { display: block; color: #64748b; font-size: 9px; margin-top: 3px; }
.card-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.card-actions > .button { flex: 1; }
.card-actions > .icon-button { width: 46px; height: 46px; border-radius: 14px; }
.match-details { margin: 16px 0; }
.match-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; font-size: 11px; color: #475569; }
.match-item svg { width: 16px; height: 16px; color: #475569; }
.match-item strong { display: block; color: var(--ink); margin-bottom: 2px; font-size: 12px; }
.swipe-hint { text-align: center; color: #64748b; font-size: 10px; margin-top: 12px; }
.shortlist-panel { background: #f8fafc; border-radius: 18px; padding: 20px; }
.shortlist-panel h3 { margin-bottom: 5px; }
.shortlist-panel > p { color: #64748b; font-size: 11px; line-height: 1.7; }
.shortlist-panel .person-row { border-color: #e5e7eb; }
.shortlist-panel .button.full { margin-top: 17px; }
.person-row { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.person-row > div { flex: 1; min-width: 0; }
.person-row strong { display: block; font-size: 12px; }
.person-row small { display: block; color: var(--muted); font-size: 10px; }
.person-avatar { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; flex-shrink: 0; }
.person-row .icon-button { width: 30px; height: 30px; background: transparent; border: 0; }
.person-row .icon-button svg { width: 15px; height: 15px; }
.avatar-stack { display: flex; padding-left: 0; align-items: center; }
.avatar-stack img { width: 32px; height: 32px; object-fit: cover; border: 2px solid white; border-radius: 50%; margin-left: -8px; }
.avatar-stack img:first-child { margin-left: 0; }

/* Job state, completion evidence and payment remain legible in a single vertical journey. */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 5px 0 22px; }
.tab { background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 12px 16px; color: var(--muted); font-size: 12px; font-weight: 600; }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.timeline { margin: 22px 0; }
.timeline-item { position: relative; padding: 0 0 24px 31px; color: #64748b; border-left: 1px solid #e5e7eb; margin-left: 9px; font-size: 12px; }
.timeline-item::before { content: ""; position: absolute; top: 1px; left: -6px; width: 11px; height: 11px; background: #e5e7eb; border: 3px solid var(--paper); border-radius: 50%; box-sizing: content-box; }
.timeline-item strong { display: block; font-size: 13px; margin-bottom: 3px; }
.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-item.done, .timeline-item.current { color: var(--ink); }
.timeline-item.done::before { background: #475569; }
.timeline-item.current::before { background: var(--ink); box-shadow: 0 0 0 3px #e5e7eb; }
.payment-box { background: white; border: 1px solid var(--line); border-radius: 17px; padding: 20px; margin: 18px 0; }
.payment-box h3 { margin-bottom: 8px; }
.checklist { display: grid; gap: 8px; margin: 16px 0; }
.check-row { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; padding: 7px 0; }
.check-row svg { width: 17px; height: 17px; color: #475569; }
.check-row input { margin: 0; flex-shrink: 0; }
.notice, .notification { background: #f8fafc; border: 1px solid #e5e7eb; padding: 15px 17px; border-radius: 13px; font-size: 12px; line-height: 1.65; margin: 16px 0; }
.notification { display: flex; align-items: center; gap: 12px; border-color: #2563eb; background: #e5e7eb; }
.notification > div { flex: 1; }
.notification p { font-size: 11px; color: #475569; }

/* Profile groups expose one layer of skills and distinguish evidence from certifications. */
.profile-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; }
.profile-image { width: 100px; height: 110px; object-fit: cover; border-radius: 21px; }
.profile-info h1, .profile-info h2 { margin-bottom: 6px; }
.profile-info p { color: var(--muted); font-size: 12px; margin-bottom: 9px; }
.skill-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.skill-group { border: 1px solid var(--line); background: white; border-radius: 17px; padding: 20px; }
.skill-group > .split { margin-bottom: 15px; }
.skill-group > .split > strong { font-size: 25px; letter-spacing: -.6px; }
.skill-leaf { padding: 13px 0; border-top: 1px solid var(--line); }
.skill-leaf > .split { font-size: 12px; }
.skill-leaf small { color: var(--muted); font-size: 10px; }
.skill-leaf button { color: #475569; background: none; border: 0; padding: 5px 0; font-size: 10px; }
.bar-track { height: 5px; background: #f8fafc; border-radius: 8px; overflow: hidden; margin: 10px 0 6px; }
.bar-fill { height: 100%; background: #64748b; border-radius: inherit; }
.badge-row { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0; }
.badge { background: #f8fafc; border: 1px solid #e5e7eb; color: #475569; }
button.badge { cursor: pointer; }
.review-list { display: grid; gap: 12px; margin-top: 12px; }
.review-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review-item p { font-size: 12px; color: #475569; margin-top: 8px; }
.review-item .split { font-size: 11px; }
.review-stars { display: flex; gap: 9px; margin: 17px 0; }
.star { color: #cbd5e1; background: transparent; border: 1px solid #e5e7eb; width: 43px; height: 43px; border-radius: 11px; font-size: 24px; padding: 0; }
.star.selected { color: #475569; background: #e5e7eb; border-color: #64748b; }
.rating-chart { display: grid; gap: 9px; margin: 18px 0; }
.rating-bar { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.rating-bar .bar-track { flex: 1; height: 7px; margin: 0; }
.rating-bar > span:first-child { width: 25px; }
.rating-bar > span:last-child { width: 20px; text-align: right; color: var(--muted); }
.progress-ring { display: grid; place-items: center; width: 58px; height: 58px; border: 4px solid #2563eb; border-radius: 50%; font-size: 16px; font-weight: 750; }

/* Local conversation bubbles remain distinct from payment and state controls. */
.message-list { display: flex; flex-direction: column; gap: 10px; max-height: 310px; overflow-y: auto; padding: 12px 0 18px; }
.message { background: #f8fafc; color: var(--ink); max-width: 84%; padding: 12px 14px; border-radius: 14px 14px 14px 3px; font-size: 12px; align-self: flex-start; }
.message.own { background: var(--ink); color: white; align-self: flex-end; border-radius: 14px 14px 3px 14px; }
.message small { display: block; font-size: 9px; color: #64748b; margin-top: 5px; }
.message.own small { color: #cbd5e1; }
.compose { display: flex; align-items: center; gap: 8px; }
.compose input { min-width: 0; flex: 1; }

/* Dialogs scroll independently and keep their close action reachable on small screens. */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: #0f172a65; backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { width: min(100%, 500px); max-height: min(90dvh, 850px); overflow-y: auto; background: var(--paper); border-radius: 25px; box-shadow: 0 24px 90px #0f172a2e; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 23px 25px 17px; position: sticky; top: 0; background: var(--paper); z-index: 2; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 21px; }
.modal-body { padding: 24px 25px; }
.modal-body > p { color: #475569; font-size: 13px; margin-bottom: 17px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 0 25px 24px; }
.modal-actions .button { flex: 1; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 13px 20px; border-radius: 13px; background: var(--ink); color: #f8fafc; font-size: 12px; max-width: min(440px, 90vw); z-index: 200; box-shadow: 0 8px 30px #0f172a33; }
.demo-menu { display: grid; gap: 10px; }
.demo-menu button { text-align: left; justify-content: flex-start; }

/* The initial role selector explains the two perspectives with direct, purposeful choices. */
.welcome { max-width: 700px; margin: 40px auto 60px; text-align: center; }
.welcome > .brand { justify-content: center; margin-bottom: 34px; }
.welcome h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -2px; }
.welcome > p { max-width: 430px; margin: 16px auto 28px; color: #475569; font-size: 14px; }
.welcome-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; text-align: left; }
.role-card { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; border: 1px solid var(--line); border-radius: 22px; padding: 26px; color: var(--ink); background: white; text-align: left; min-height: 240px; transition: transform .15s, border-color .15s; }
.role-card:hover { transform: translateY(-3px); border-color: #64748b; }
.role-card > svg { width: 30px; height: 30px; margin-bottom: 6px; }
.role-card p { font-size: 12px; line-height: 1.7; color: #64748b; }
.role-card .button { margin-top: auto; }
.role-card:first-child { background: var(--ink); color: white; border-color: var(--ink); }
.role-card:first-child p { color: #cbd5e1; }
.role-card:first-child > svg { color: var(--lime); }
.role-pick { font-size: 12px; display: flex; align-items: center; gap: 8px; }

/* Bottom navigation and utility helpers are kept out of the desktop content flow. */
.bottom-nav { display: none; }
.hidden { display: none !important; }
.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; }
.stack { display: grid; gap: 15px; }
.spacer { margin-top: 22px; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* Narrow desktop widths retain the navigation column while reducing content gutters. */
@media (min-width: 701px) and (max-width: 960px) {
  .app-shell { grid-template-columns: 184px minmax(0, 1fr); }
  .sidebar { padding: 30px 14px 20px; }
  .main { padding: 28px 24px 36px; }
  .topbar { padding: 0 24px; }
  .demo-bar { padding-left: 24px; padding-right: 24px; }
  .candidate-layout { grid-template-columns: minmax(0, 1fr); }
  .shortlist-panel { display: block; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Mobile uses the device width, safe edges, and a persistent three-item bottom bar. */
@media (max-width: 700px) {
  body { background: var(--paper); font-size: 14px; }
  .app-shell { display: block; min-height: 100dvh; }
  .sidebar { display: none; }
  .topbar { height: 70px; padding: max(8px, env(safe-area-inset-top)) 20px 8px; }
  .topbar .brand { display: flex; font-size: 22px; }
  .topbar .brand-mark { width: 31px; height: 31px; border-radius: 10px; font-size: 22px; }
  .location { font-size: 10px; gap: 5px; }
  .location svg { width: 13px; height: 13px; }
  .avatar-button { width: 33px; height: 33px; font-size: 10px; }
  .demo-bar { padding: 7px 20px; font-size: 9px; min-height: 40px; gap: 4px; }
  .demo-bar select { min-height: 28px; font-size: 10px; max-width: 145px; padding: 3px; }
  .demo-bar button { font-size: 10px; }
  .main { padding: 25px 20px calc(102px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 23px; align-items: flex-start; gap: 12px; }
  .page-head h1 { font-size: 29px; letter-spacing: -1px; }
  .page-head p { font-size: 12px; margin-top: 8px; }
  .page-head > .button { padding: 9px 11px; font-size: 10px; min-height: 35px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.4px; }
  .section-heading { margin: 25px 0 14px; }
  .section-heading h2 { font-size: 17px; }
  .home-grid, .candidate-layout { grid-template-columns: minmax(0, 1fr); }
  .feature-job { min-height: 230px; padding: 23px; }
  .feature-job h2 { font-size: 27px; }
  .feature-job p { font-size: 12px; }
  .category-grid { gap: 9px; }
  .category-card { padding: 16px 11px; min-height: 143px; border-radius: 14px; gap: 9px; }
  .category-card strong { font-size: 11px; }
  .category-card p { font-size: 10px; }
  .category-card > svg { width: 23px; height: 23px; }
  .mini-job { padding: 14px; gap: 11px; }
  .mini-job img { width: 46px; height: 46px; }
  .mini-job strong { font-size: 12px; }
  .stats-grid { gap: 8px; }
  .stat { padding: 12px 10px; }
  .stat strong { font-size: 22px; }
  .stat span, .stat small { font-size: 9px; }
  .form-grid { gap: 17px 12px; }
  .candidate-card { border-radius: 21px; }
  .portrait { height: 285px; }
  .portrait-caption { left: 20px; bottom: 19px; }
  .candidate-body { padding: 18px 19px 20px; }
  .score-cell strong { font-size: 24px; }
  .score-cell span { font-size: 10px; }
  .shortlist-panel { padding: 18px; }
  .candidate-layout { gap: 17px; }
  .card-actions { margin-top: 15px; }
  .browse-toolbar { font-size: 11px; }
  .profile-hero { gap: 15px; }
  .profile-image { width: 83px; height: 94px; border-radius: 19px; }
  .profile-info h1 { font-size: 25px; }
  .profile-info p { font-size: 11px; }
  .skill-group { padding: 18px; }
  .tabs { gap: 0; }
  .tab { flex: 1; padding: 11px 9px; font-size: 11px; }
  .bottom-nav { display: flex; align-items: stretch; justify-content: space-around; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; height: calc(70px + env(safe-area-inset-bottom)); padding: 8px 12px calc(6px + env(safe-area-inset-bottom)); background: #fffffff5; border-top: 1px solid var(--line); backdrop-filter: blur(12px); }
  .bottom-nav button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; flex: 1; padding: 5px 12px; border: 0; background: transparent; border-radius: 12px; color: #64748b; font-size: 9px; font-weight: 650; }
  .bottom-nav button svg { width: 21px; height: 21px; }
  .bottom-nav button.active { color: var(--ink); background: #f8fafc; }
  .bottom-nav button.active svg { color: #475569; }
  .modal-backdrop { padding: 14px; align-items: center; }
  .modal { max-height: 88dvh; border-radius: 21px; }
  .modal-head { padding: 18px 20px 14px; }
  .modal-head h2 { font-size: 19px; }
  .modal-body { padding: 20px; }
  .modal-actions { padding: 0 20px 20px; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); font-size: 11px; }
  .welcome { margin: 22px auto 0; }
  .welcome > .brand { margin-bottom: 28px; }
  .welcome h1 { font-size: 38px; letter-spacing: -1.8px; }
  .welcome > p { font-size: 12px; margin: 13px auto 23px; }
  .welcome-grid { gap: 12px; }
  .role-card { padding: 21px 18px; min-height: 247px; border-radius: 19px; gap: 12px; }
  .role-card h2 { font-size: 22px; }
  .role-card p { font-size: 11px; }
  .role-card .button { font-size: 11px; padding: 10px 11px; width: 100%; }
}

/* Very small screens retain readable forms and avoid squeezing the role choice text. */
@media (max-width: 370px) {
  .main { padding-left: 15px; padding-right: 15px; }
  .topbar, .demo-bar { padding-left: 15px; padding-right: 15px; }
  .topbar .location { display: none; }
  .form-grid, .welcome-grid { grid-template-columns: minmax(0, 1fr); }
  .role-card { min-height: 190px; }
  .portrait { height: 250px; }
  .category-card { padding: 13px 9px; }
}

/* Motion preferences suppress decorative transitions while preserving state changes. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
