:root {
  --text: var(--ink);
  --muted: var(--ink-muted);
  --background: var(--canvas);
  --surface: var(--panel);
  --surface-raised: var(--panel-strong);
  --accent: var(--lime);
}

.path-hero,
.path-layout {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.path-hero {
  padding: 74px 0 46px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 42px;
  align-items: end;
}

.path-hero h1 {
  max-width: 830px;
  margin: 8px 0 20px;
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.path-intro {
  max-width: 760px;
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--muted);
}

.privacy-card,
.path-sidebar,
.questions-box,
.ats-checks,
.prompt-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.privacy-card {
  padding: 24px;
}

.privacy-card strong { font-size: 1.1rem; }
.privacy-card p { color: var(--muted); line-height: 1.55; }
.privacy-card span { color: var(--accent); font-size: 0.82rem; font-weight: 700; }

.path-steps {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 36px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.path-steps li {
  padding: 14px 12px;
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
  border-right: 1px solid var(--line);
}

.path-steps li:last-child { border-right: 0; }
.path-steps li > span:first-child { flex: 0 0 auto; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--line); border-radius: 50%; }
.path-steps .step-copy { min-width: 0; }
.path-steps .is-current { color: var(--text); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.path-steps .is-current > span:first-child, .path-steps .is-done > span:first-child { background: var(--accent); border-color: var(--accent); color: #071713; }
.path-steps .is-done { color: var(--text); }

.path-layout {
  --text: var(--ink);
  --muted: var(--ink-muted);
  --background: var(--canvas);
  --surface: var(--panel);
  --surface-raised: var(--panel-strong);
  --accent: var(--lime);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
  padding-bottom: 80px;
}

.path-main { display: grid; gap: 22px; }
.path-panel { padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: 22px; background: color-mix(in srgb, var(--surface) 93%, transparent); }
.path-panel h2 { margin: 4px 0 12px; font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: -0.035em; }
.path-panel > p { color: var(--muted); line-height: 1.65; }
.step-label { margin: 0; color: var(--accent) !important; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.16em; font-weight: 800; }
.panel-heading, .preview-heading { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.local-badge, .open-source-badge { border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 7px 11px; font-size: 0.72rem; white-space: nowrap; }

.consent-row { display: flex; gap: 12px; align-items: start; margin: 24px 0 18px; line-height: 1.5; }
.consent-row input { margin-top: 4px; accent-color: var(--accent); }
.upload-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.file-picker { position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border: 1px dashed var(--accent); border-radius: 10px; color: var(--accent); cursor: pointer; font-weight: 700; }
.file-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.inline-status { min-height: 24px; margin: 14px 0 0; color: var(--muted); }
.selected-file { margin-top: 16px; padding: 15px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: center; border: 1px solid color-mix(in srgb, var(--accent) 58%, var(--line)); border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 11%, var(--surface-raised)), var(--surface-raised)); box-shadow: 0 14px 38px rgb(0 0 0 / .12); }
.selected-file[hidden] { display: none; }
.selected-file-symbol { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #071713; font-size: 1.05rem; font-weight: 900; box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 11%, transparent); }
.selected-file-copy { min-width: 0; display: grid; gap: 3px; }
.selected-file-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file-copy small { color: var(--muted); line-height: 1.35; }
.selected-file-badge { padding: 6px 9px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 999px; color: var(--accent); font-size: .68rem; font-weight: 800; white-space: nowrap; }
.cv-error-dialog { width: min(520px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--surface); color: var(--text); box-shadow: 0 24px 80px rgb(0 0 0 / .45); }
.cv-error-dialog::backdrop { background: rgb(0 0 0 / .72); backdrop-filter: blur(3px); }
.cv-error-dialog > div { padding: 28px; }
.cv-error-dialog h2 { margin: 6px 0 12px; }
.cv-error-dialog p:not(.step-label) { color: var(--muted); line-height: 1.6; }
.cv-error-dialog button { margin-top: 8px; }
.stored-cv { margin-top: 18px; padding: 16px; border-radius: 12px; background: var(--surface-raised); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.stored-cv div { display: grid; gap: 4px; }
.stored-cv span { color: var(--muted); font-size: 0.82rem; }

.direction-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; border: 0; padding: 0; margin: 24px 0 16px; }
.direction-options label { display: block; cursor: pointer; }
.direction-options input { position: absolute; opacity: 0; }
.direction-options span { display: grid; gap: 8px; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, background .15s; }
.direction-options small { color: var(--muted); line-height: 1.45; }
.direction-options input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.direction-options input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.target-role-field { display: grid; gap: 7px; margin: 0 0 22px; font-size: .84rem; font-weight: 700; }
.target-role-field input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--background); color: var(--text); font: inherit; }
.target-role-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.target-role-field small { color: var(--muted); font-weight: 400; line-height: 1.45; }

.evidence-grid { display: grid; gap: 12px; margin: 24px 0; }
.evidence-card { padding: 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--surface-raised); }
.evidence-card.is-confirmed { border-color: color-mix(in srgb, var(--accent) 58%, var(--line)); }
.evidence-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.evidence-card-heading strong { display: block; }
.evidence-status, .question-progress, .ats-check-heading span { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent); font-size: .69rem; font-weight: 800; letter-spacing: .02em; }
.evidence-card q { color: var(--muted); line-height: 1.55; }
.evidence-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.evidence-actions button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.evidence-reject { color: var(--muted); }
.questions-box, .ats-checks, .prompt-card { padding: 20px; margin-top: 18px; }
.questions-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.questions-heading h3 { margin: 0; }
.questions-box > p { color: var(--muted); line-height: 1.55; }
.answer-language-help { padding: 12px 14px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); color: var(--text) !important; font-weight: 700; }
.questions-box ul, .ats-checks ul, .path-sidebar ul { margin: 12px 0 0; padding-left: 20px; }
.questions-box li, .ats-checks li, .path-sidebar li { margin-bottom: 11px; line-height: 1.5; }
.ats-checks ul { display: grid; gap: 10px; padding: 0; list-style: none; }
.ats-checks li { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-raised); }
.ats-check-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ats-check-heading strong { line-height: 1.4; }
.ats-checks li > p { margin: 8px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.ats-check-action { margin-top: 10px; }
.check-pass .ats-check-heading strong { color: var(--accent); }
.check-review .ats-check-heading strong { color: #f4c96b; }
.check-review .ats-check-heading span { background: rgb(244 201 107 / .1); color: #f4c96b; }
.answer-grid { display: grid; gap: 14px; margin: 18px 0; }
.answer-card { display: grid; gap: 8px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-raised); }
.answer-card label { display: grid; gap: 7px; font-weight: 750; line-height: 1.45; }
.answer-card small { color: var(--accent); font-weight: 700; }
.answer-card textarea { width: 100%; min-height: 110px; padding: 12px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; background: var(--background); color: var(--text); font: inherit; line-height: 1.5; }
.answer-card textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.ai-panel { background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface)); }
.ai-capability { font-weight: 700; color: var(--text) !important; }
.ai-result { margin-top: 20px; padding: 18px; border-radius: 14px; background: var(--surface-raised); }
.ai-result p { line-height: 1.6; }

.ats-form { display: grid; gap: 16px; margin: 28px 0; }
.draft-readiness { margin: 22px 0 8px; padding: 17px 18px; border: 1px solid #f4c96b; border-radius: 14px; background: rgb(244 201 107 / .07); }
.draft-readiness[data-ready="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.draft-readiness > strong { display: block; color: #f4c96b; font-size: 1rem; }
.draft-readiness[data-ready="true"] > strong { color: var(--accent); }
.draft-readiness p { margin: 7px 0 0; color: var(--muted); line-height: 1.5; }
.draft-readiness ul { margin: 10px 0 0; padding-left: 20px; color: #f4c96b; font-size: .82rem; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ats-form label { display: grid; gap: 7px; font-size: .84rem; font-weight: 700; }
.ats-form input, .ats-form textarea, .prompt-card textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--background); color: var(--text); padding: 12px; font: inherit; line-height: 1.5; }
.ats-form textarea, .prompt-card textarea { resize: vertical; }
.ats-form input:focus, .ats-form textarea:focus, .prompt-card textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.full-field { grid-column: 1 / -1; }
.preview-heading { align-items: center; margin-top: 30px; }
.preview-heading div { display: flex; gap: 8px; }
.ats-preview { min-height: 420px; max-height: 680px; overflow: auto; padding: 24px; white-space: pre-wrap; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #111; font: 14px/1.55 Arial, sans-serif; }

.next-panel { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.next-panel > .primary-action { margin: 10px 0 18px; }
.prompt-card h3 { margin-top: 0; }
.prompt-card p { color: var(--muted); line-height: 1.55; }
.prompt-card button { margin-top: 12px; }
.invite-card { background: var(--surface-raised); }

.path-sidebar { position: sticky; top: 92px; padding: 25px; }
.path-sidebar h2 { margin-top: 0; font-size: 1.35rem; }
.path-sidebar ul { padding-left: 0; list-style: none; }
.path-sidebar li { padding-bottom: 13px; border-bottom: 1px solid var(--line); color: var(--muted); }
.path-sidebar strong { color: var(--text); }

.quiet-button { border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--text); min-height: 42px; padding: 0 14px; cursor: pointer; }
.quiet-button:hover { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: .5; cursor: not-allowed; }
#path-toast { position: fixed; right: 20px; bottom: 20px; max-width: 360px; padding: 14px 18px; border-radius: 10px; background: var(--accent); color: #071713; font-weight: 700; z-index: 30; }

@media (max-width: 900px) {
  .path-hero, .path-layout { grid-template-columns: 1fr; }
  .path-sidebar { position: static; order: -1; }
  .direction-options { grid-template-columns: 1fr; }
  .path-steps { grid-template-columns: 1fr; }
  .path-steps li { border-right: 0; border-bottom: 1px solid var(--line); }
  .path-steps li:last-child { border-bottom: 0; }
}

@media (max-width: 620px) {
  .path-hero, .path-layout, .path-steps { width: min(100% - 24px, 1180px); }
  .path-hero { padding-top: 46px; }
  .form-grid { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .panel-heading, .preview-heading, .stored-cv, .questions-heading, .ats-check-heading { align-items: stretch; flex-direction: column; }
  .preview-heading div { flex-wrap: wrap; }
  .local-badge, .open-source-badge { align-self: start; }
  .selected-file { grid-template-columns: auto minmax(0, 1fr); }
  .selected-file-badge { grid-column: 1 / -1; justify-self: start; }
}
