:root {
  color-scheme: light;
  --ink: #131827;
  --paper: #f7f8f2;
  --white: #ffffff;
  --lime: #c9ff4a;
  --coral: #ff6b56;
  --blue: #3f63ff;
  --muted: #697081;
  --line: #d9ddd3;
  --shadow: 0 18px 50px rgba(19, 24, 39, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 12%, rgba(63, 99, 255, 0.12), transparent 25rem),
    linear-gradient(180deg, #fff 0, var(--paper) 42rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button, input, textarea { font: inherit; }
button, label, input[type="checkbox"] { cursor: pointer; }

.topbar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -0.02em; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--ink); color: var(--lime); font-size: 0.72rem; letter-spacing: -0.08em; }

main { max-width: 1240px; margin: 0 auto; padding: 28px clamp(20px, 4vw, 48px) 80px; }
.search-shell { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(520px, 1.2fr); gap: clamp(42px, 6vw, 88px); align-items: center; padding: 42px 0 68px; }
.eyebrow { margin: 0 0 12px; color: var(--blue); font-size: 0.78rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
h1 { max-width: 650px; margin: 0; font-size: clamp(2.8rem, 6vw, 5.65rem); line-height: 0.94; letter-spacing: -0.07em; }
.major-line { margin: 28px 0 0; font-weight: 720; }
.major-line span { display: inline-block; margin-right: 10px; padding: 5px 9px; border-radius: 6px; background: var(--lime); font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.08em; }

.search-panel { position: relative; padding: clamp(24px, 4vw, 40px); background: var(--ink); color: var(--white); border-radius: 26px 8px 26px 8px; box-shadow: var(--shadow); }
.search-panel::before { content: ""; position: absolute; right: -10px; top: -10px; width: 54px; height: 54px; border-radius: 50%; background: var(--coral); z-index: -1; }
.field-label, legend { display: block; margin-bottom: 11px; font-weight: 800; }
.location-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
input[type="text"] { width: 100%; min-height: 52px; padding: 0 16px; color: var(--ink); background: var(--white); border: 2px solid transparent; border-radius: 10px; outline: none; }
input[type="text"]:focus { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(201, 255, 74, 0.18); }
button { min-height: 52px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--lime); color: var(--ink); font-weight: 850; }
button:hover { background: #d8ff78; }
button:disabled { cursor: wait; opacity: 0.72; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
fieldset { margin: 24px 0 18px; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 10px; }
fieldset legend { width: 100%; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; padding: 10px 13px; border: 1px solid #475064; border-radius: 999px; color: #cbd0dc; font-size: 0.9rem; font-weight: 720; }
.choice input:checked + span { color: var(--ink); background: var(--white); border-color: var(--white); }
.choice input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 2px; }
.stretch-choice { display: flex; gap: 12px; align-items: flex-start; padding-top: 18px; border-top: 1px solid #394052; }
.stretch-choice input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--lime); }
.stretch-choice span { display: grid; }
.stretch-choice small { color: #aeb5c4; font-size: 0.82rem; }
.form-message { min-height: 1.4em; margin: 10px 0 0; color: #ffd1ca; font-weight: 700; }
.field-hint { margin: 8px 0 0; color: #aeb5c4; font-size: 0.8rem; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.pipeline-button { min-height: 38px; padding: 6px 8px 6px 13px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-size: 0.84rem; }
.pipeline-button span { display: inline-grid; min-width: 24px; height: 24px; margin-left: 6px; place-items: center; border-radius: 999px; background: var(--ink); color: var(--white); font-size: 0.72rem; }

.profile-bar { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-bottom: 58px; padding: 26px 30px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.82); box-shadow: 0 8px 26px rgba(19,24,39,0.04); }
.profile-bar h2 { font-size: clamp(1.65rem, 3vw, 2.45rem); }
.profile-summary { margin: 10px 0 0; color: var(--muted); }
.profile-actions { display: flex; flex: 0 0 auto; gap: 10px; }
.resume-button { color: var(--blue); background: var(--white); border: 1px solid #bdc8ff; }
.resume-button:hover { background: #edf0ff; }
.secondary-button { flex: 0 0 auto; color: var(--white); background: var(--blue); }
.secondary-button:hover { background: #2f50dc; }

.results-section { padding-top: 36px; border-top: 1px solid var(--line); }
.results-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1; letter-spacing: -0.055em; }
.count-pill { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.82rem; font-weight: 800; }
.results-summary { margin: 12px 0 0; color: var(--muted); }
.result-group { display: grid; gap: 14px; }
.opportunity-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 22px; padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 24px rgba(19, 24, 39, 0.05); }
.opportunity-card:hover { border-color: #b7beb0; transform: translateY(-1px); transition: transform 160ms ease, border-color 160ms ease; }
.card-index { color: var(--muted); font-weight: 850; }
.card-kicker { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; }
.match { padding: 5px 8px; border-radius: 5px; }
.match.direct { background: var(--lime); color: var(--ink); }
.match.stretch { background: #ffe3de; color: #9b2f20; }
.card-main h3 { margin: 14px 0 2px; font-size: 1.55rem; line-height: 1.1; letter-spacing: -0.035em; }
.employer { margin: 0; font-weight: 780; }
.meta { margin: 9px 0 0; color: var(--muted); }
.score { min-width: 82px; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--ink); color: var(--white); }
.score strong { font-size: 1.55rem; line-height: 1; }
.score span { font-size: 0.68rem; margin-top: 3px; text-transform: uppercase; letter-spacing: 0.08em; }
.card-details { grid-column: 2 / -1; border-top: 1px solid var(--line); padding-top: 16px; }
.card-details summary { width: max-content; color: var(--blue); font-weight: 800; cursor: pointer; }
.fit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.fit-item { padding: 16px; background: var(--paper); border-radius: 12px; }
.fit-item h4 { margin: 0 0 7px; font-size: 0.92rem; }
.fit-item p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.card-actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.action-links { display: flex; align-items: center; gap: 9px; }
.save-role { min-height: 43px; padding: 9px 14px; border: 1px solid var(--line); color: var(--ink); background: var(--white); }
.save-role:hover, .save-role.is-saved { background: var(--paper); border-color: #adb4aa; }
.evidence { margin: 0; color: var(--muted); font-size: 0.82rem; }
.apply-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--ink); border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 850; }
.apply-link:hover { background: var(--ink); color: var(--white); }
.stretch-section { margin-top: 34px; }
.section-divider { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.section-divider span { padding: 6px 10px; border-radius: 6px; background: #ffe3de; color: #9b2f20; font-weight: 850; }
.section-divider p { margin: 0; color: var(--muted); }
.empty-state { padding: 64px 24px; text-align: center; background: var(--white); border: 1px dashed #adb4aa; border-radius: 18px; }
.empty-state span { font-size: 2.5rem; color: var(--coral); }
.empty-state h3 { margin: 8px 0; font-size: 1.45rem; }
.empty-state p { margin: 0; color: var(--muted); }
dialog { width: min(680px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 22px; color: var(--ink); background: var(--white); box-shadow: 0 30px 90px rgba(19,24,39,0.28); }
dialog::backdrop { background: rgba(19,24,39,0.68); backdrop-filter: blur(4px); }
#profile-form { padding: clamp(24px, 5vw, 40px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.dialog-heading h2 { font-size: clamp(2rem, 5vw, 3rem); }
.icon-button { min-width: 44px; min-height: 44px; padding: 0; border-radius: 50%; color: var(--ink); background: var(--paper); font-size: 1.7rem; line-height: 1; }
.dialog-intro { margin: 18px 0 24px; color: var(--muted); }
.resume-panel { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px 18px; padding: 18px; border: 1px solid #bdc8ff; border-radius: 14px; background: #f5f7ff; }
.resume-panel h3 { margin: 1px 0 2px; font-size: 1.08rem; }
.resume-panel p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.resume-kicker { color: var(--blue) !important; font-size: 0.72rem !important; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.file-button { align-self: center; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border-radius: 9px; color: var(--white); background: var(--blue); font-weight: 820; }
.file-button:hover { background: #2f50dc; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.resume-privacy, .resume-status, .resume-suggestions { grid-column: 1 / -1; }
.resume-privacy { padding-top: 10px; border-top: 1px solid #d7ddff; }
.resume-status { min-height: 1.3em; color: #253cae !important; font-weight: 720; }
.resume-status.is-error { color: #a12f20 !important; }
.resume-suggestions { display: grid; gap: 8px; padding: 12px; border-radius: 10px; background: var(--white); }
.resume-suggestions[hidden] { display: none; }
.resume-suggestions div { display: grid; gap: 2px; }
.resume-suggestions strong { font-size: 0.82rem; }
.resume-suggestions span { color: var(--muted); font-size: 0.84rem; }
.dialog-label { display: block; margin: 18px 0 7px; font-weight: 820; }
textarea { width: 100%; padding: 12px 14px; resize: vertical; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; outline: none; }
textarea:focus { border-color: var(--blue); }
.dialog-message { min-height: 1.4em; margin: 8px 0; color: #a12f20; font-weight: 750; }
.dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 10px; }
.text-button { padding: 0; color: var(--blue); background: transparent; }
.text-button:hover { color: var(--ink); background: transparent; }
.pipeline-shell { padding: clamp(24px, 5vw, 40px); }
.pipeline-list { display: grid; gap: 12px; }
.pipeline-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 22px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.pipeline-item h3 { margin: 0; font-size: 1.04rem; }
.pipeline-item p { margin: 4px 0; color: var(--muted); }
.pipeline-item small { color: var(--muted); }
.pipeline-controls { display: flex; align-items: end; gap: 10px; }
.pipeline-controls label { display: grid; gap: 4px; }
.pipeline-controls label span { color: var(--muted); font-size: 0.75rem; font-weight: 750; }
.pipeline-controls select { min-height: 38px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.pipeline-controls a { min-height: 38px; display: inline-flex; align-items: center; color: var(--blue); font-weight: 800; text-decoration: none; white-space: nowrap; }
.remove-role { min-height: 38px; padding: 6px 10px; color: #9b2f20; background: transparent; border: 1px solid #e5b7af; }
.pipeline-empty { padding: 42px 20px; text-align: center; border: 1px dashed var(--line); border-radius: 13px; }
.pipeline-empty p { margin: 0; font-weight: 800; }
.pipeline-empty small { color: var(--muted); }
footer { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px) 42px; color: var(--muted); font-size: 0.82rem; }

@media (max-width: 900px) {
  .search-shell { grid-template-columns: 1fr; gap: 38px; }
  h1 { max-width: 760px; }
}

@media (max-width: 620px) {
  .topbar { padding-top: 18px; }
  main { padding-top: 6px; }
  .search-shell { padding-top: 24px; }
  .location-row { grid-template-columns: 1fr; }
  .location-row button { width: 100%; }
  .profile-bar { display: grid; padding: 22px; }
  .profile-actions { display: grid; width: 100%; }
  .profile-bar .secondary-button, .profile-bar .resume-button { width: 100%; }
  .results-heading-row { align-items: flex-start; }
  .opportunity-card { grid-template-columns: 1fr auto; padding: 22px; }
  .card-index { display: none; }
  .score { min-width: 68px; }
  .card-details, .card-actions { grid-column: 1 / -1; }
  .card-actions, .action-links { align-items: stretch; }
  .action-links { width: 100%; }
  .action-links .save-role, .action-links .apply-link { flex: 1; justify-content: center; }
  .fit-grid { grid-template-columns: 1fr; }
  .section-divider { display: block; }
  .section-divider p { margin-top: 7px; }
  .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
  .resume-panel { grid-template-columns: 1fr; }
  .file-button { width: 100%; }
  .pipeline-item { grid-template-columns: 1fr; }
  .pipeline-controls { align-items: stretch; flex-direction: column; }
  .pipeline-controls a, .pipeline-controls button { justify-content: center; width: 100%; }
}
