/* The Dashboard's job finder (tools/job-finder.js) and "Add a job" by link.
   EMS tokens only (ems-design.css). The app's own input skin is strong, so
   the fields here reset it with :not(#_) (id weight), as ems-hub.css does. */

/* ── the head: Your jobs + Add a job ─────────────────────────────────── */
.ems-hub-head { align-items: center; }
.ems-hub-add { display: inline-flex; align-items: center; gap: 8px; }

/* ── the bar ─────────────────────────────────────────────────────────── */
.ems-hub-find { margin: 0 0 18px; }
.ems-hub-find[hidden] { display: none; }
.fx { position: relative; }
.fx-bar {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto; align-items: stretch;
  padding: 6px; border-radius: 20px; background: #fff; box-shadow: var(--ems-lift);
}
.fx-f { position: relative; display: flex; align-items: center; gap: 4px; min-width: 0; padding: 0 8px 0 6px; border-radius: 14px; transition: background-color var(--ems-dur) var(--ems-ease), box-shadow var(--ems-dur) var(--ems-ease); }
.fx-f + .fx-f::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--ems-line); }
.fx-f:hover { background: var(--ems-soft); }
.fx-f:focus-within { background: #fff; box-shadow: 0 0 0 2px var(--ems-navy-500), var(--ems-focus); z-index: 2; }
.fx-f:focus-within::before, .fx-f:focus-within + .fx-f::before { opacity: 0; }
.fx-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--ems-navy-500); cursor: pointer; padding: 0; }
span.fx-ic { cursor: default; }
.fx-in { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 8px 0; cursor: text; margin: 0; }
.fx-k { font: 700 11px/1.2 var(--ems-font-ui); letter-spacing: .07em; text-transform: uppercase; color: var(--ems-mute-2); }
.fx-in input:not(#_) {
  width: 100%; min-width: 0; margin: 2px 0 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none;
  font: 600 16px/1.35 var(--ems-font-ui); color: var(--ems-navy-900); text-overflow: ellipsis;
}
.fx-in input:not(#_)::placeholder { color: var(--ems-faint); font-weight: 500; }
.fx-x { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 999px; background: var(--ems-soft-2); color: var(--ems-mute); cursor: pointer; padding: 0; }
.fx-x:hover { background: var(--ems-line-2); color: var(--ems-ink); }
.fx-x[hidden], .fx-ok[hidden] { display: none; }
.fx-ok { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: var(--ems-good-50); color: var(--ems-good); }
.fx-where.is-bad { box-shadow: 0 0 0 2px var(--ems-red-500); background: var(--ems-red-50); }
.fx-what.is-bad { box-shadow: 0 0 0 2px var(--ems-red-500); background: var(--ems-red-50); }
.fx-go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 132px; margin: 2px 2px 2px 8px; padding: 0 22px; border-radius: 14px; font-size: 15.5px; }
.fx-go .spinner { width: 16px; height: 16px; border-width: 2px; border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.fx-err { min-height: 0; margin: 0; font: 600 13.5px/1.4 var(--ems-font-ui); color: var(--ems-red-600); }
.fx-err:not(:empty) { margin: 8px 4px 0; }

/* The lists under the fields. */
.fx-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; max-height: min(380px, 60vh); overflow-y: auto;
  margin: 0; padding: 6px; list-style: none; border-radius: 16px; background: #fff; box-shadow: var(--ems-pop);
  animation: fx-in 160ms var(--ems-ease-out);
}
.fx-where .fx-list { min-width: 300px; }
.fx-list[hidden] { display: none; }
@keyframes fx-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.fx-grp { padding: 10px 12px 4px; font: 700 11px/1.2 var(--ems-font-ui); letter-spacing: .07em; text-transform: uppercase; color: var(--ems-mute-2); }
.fx-grp:empty { display: none; }
.fx-opt { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font: 500 15px/1.3 var(--ems-font-ui); color: var(--ems-ink); }
.fx-opt b { font-weight: 700; color: var(--ems-navy-700); }
.fx-opt.is-act, .fx-opt:hover { background: var(--ems-navy-50); }
.fx-o-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-o-s { flex: none; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12.5px/1.3 var(--ems-font-ui); color: var(--ems-mute-2); }

/* The chips row: what is on, and Filters. */
.fx-row { display: flex; align-items: center; gap: 10px; margin: 10px 2px 0; }
.fx-chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px; background: var(--ems-navy-50); color: var(--ems-navy-800); font: 600 13px/1.2 var(--ems-font-ui); animation: fx-in 160ms var(--ems-ease-out); }
.fx-chip button { width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 999px; background: rgba(42, 56, 144, .1); color: var(--ems-navy-700); cursor: pointer; padding: 0; }
.fx-chip button:hover { background: var(--ems-navy-500); color: #fff; }
.fx-none { font: 400 13.5px/1.4 var(--ems-font-body); color: var(--ems-mute-2); }
.fx-more { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--ems-line-2); border-radius: 999px; background: #fff; color: var(--ems-navy-700); font: 600 13.5px/1.2 var(--ems-font-ui); cursor: pointer; transition: border-color var(--ems-dur) var(--ems-ease), background-color var(--ems-dur) var(--ems-ease); }
.fx-more:hover, .fx-more[aria-expanded="true"] { border-color: var(--ems-navy-500); background: var(--ems-navy-50); }
.fx-more i { min-width: 20px; padding: 2px 6px; border-radius: 999px; background: var(--ems-navy-500); color: #fff; font: 700 11.5px/1.3 var(--ems-font-ui); font-style: normal; text-align: center; }
.fx-more i[hidden] { display: none; }

/* The panel: every filter as plain choices. */
.fx-panel { margin: 12px 0 0; padding: 20px 22px 16px; border-radius: 20px; background: #fff; box-shadow: var(--ems-lift); }
.fx-panel[hidden] { display: none; }
.fx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; }
.fx-g { min-width: 0; }
.fx-g.is-off .fx-pills { opacity: .45; pointer-events: none; }
.fx-gl { margin: 0 0 8px; font: 700 13.5px/1.3 var(--ems-font-ui); color: var(--ems-navy-800); }
.fx-gl span { font-weight: 500; color: var(--ems-mute-2); margin-left: 4px; }
.fx-gl label { font: inherit; color: inherit; }
.fx-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-pill { padding: 7px 13px; border: 1px solid var(--ems-line-2); border-radius: 999px; background: #fff; color: var(--ems-ink-2); font: 600 13px/1.2 var(--ems-font-ui); cursor: pointer; transition: border-color var(--ems-dur) var(--ems-ease), background-color var(--ems-dur) var(--ems-ease), color var(--ems-dur) var(--ems-ease); }
.fx-pill:hover { border-color: var(--ems-navy-300); }
.fx-pill.is-on { border-color: var(--ems-navy-500); background: var(--ems-navy-500); color: #fff; }
.fx-pay { display: flex; align-items: center; gap: 6px; max-width: 280px; padding: 0 14px; border: 1px solid var(--ems-line-2); border-radius: 12px; background: #fff; font: 700 16px/1 var(--ems-font-ui); color: var(--ems-navy-700); transition: border-color var(--ems-dur) var(--ems-ease), box-shadow var(--ems-dur) var(--ems-ease); }
.fx-pay:focus-within { border-color: var(--ems-navy-500); box-shadow: var(--ems-focus); }
.fx-pay input:not(#_) { flex: 1; min-width: 0; margin: 0; padding: 11px 0; border: 0; background: none; box-shadow: none; outline: none; font: 700 16px/1.2 var(--ems-font-ui); color: var(--ems-navy-900); letter-spacing: .01em; }
.fx-pay-u { font: 500 13.5px/1 var(--ems-font-ui); color: var(--ems-mute-2); }
.fx-hint { min-height: 1.2em; margin: 6px 2px 0; font: 400 13px/1.45 var(--ems-font-body); color: var(--ems-mute); }
.fx-g select { max-width: 280px; }
.fx-pfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--ems-line); }

/* ── what a search found ─────────────────────────────────────────────── */
.ems-fx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 2px 14px; font: 400 15px/1.45 var(--ems-font-body); color: var(--ems-ink-2); }
.ems-fx-head p { margin: 0; }
.ems-fx-head b { color: var(--ems-navy-800); font-weight: 700; }
.ems-fx-head.is-busy { justify-content: flex-start; align-items: center; gap: 10px; }
.ems-fx-head .spinner { width: 16px; height: 16px; border-width: 2px; }
.ems-fx-back { font-size: 13.5px; }
.ems-fx-note { margin: 0 2px 12px; font: 400 14px/1.5 var(--ems-font-body); color: var(--ems-ink-2); }
.ems-fx-none p { margin: 0 0 10px; }
.ems-fx-none p:last-child { margin: 0; }
.ems-fx-fixes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ems-fx-fixes > span { font: 600 13px/1 var(--ems-font-ui); color: var(--ems-mute-2); }
.ems-fx-fix { padding: 7px 13px; border: 1px solid var(--ems-navy-200); border-radius: 999px; background: var(--ems-navy-50); color: var(--ems-navy-700); font: 600 13px/1.2 var(--ems-font-ui); cursor: pointer; }
.ems-fx-fix:hover { background: var(--ems-navy-500); border-color: var(--ems-navy-500); color: #fff; }

/* The picks' searches: one quiet line of chips (the why is each chip's tooltip). */
.ems-lane { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 8px 6px 14px; border-radius: 999px; }
.ems-lane b { font-size: 13.5px; }
.ems-lane i { grid-column: auto; grid-row: auto; }

/* ── a saved job lands in its scorecard ──────────────────────────────── */
.fx-ghost { box-shadow: var(--ems-raise); overflow: hidden; }
.ems-jc.is-leaving { pointer-events: none; }
.ems-hub-tabs .ems-scorecard.is-bump .ems-scorecard-n { animation: fx-bump 520ms var(--ems-spring); }
.ems-hub-tabs .ems-scorecard.is-bump { animation: fx-glow 900ms var(--ems-ease-out); }
@keyframes fx-bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); color: var(--ems-red-500); } 100% { transform: scale(1); } }
@keyframes fx-glow { 0% { box-shadow: 0 0 0 0 rgba(42, 56, 144, .45), var(--ems-lift); } 100% { box-shadow: 0 0 0 14px rgba(42, 56, 144, 0), var(--ems-lift); } }

/* ── Add a job ───────────────────────────────────────────────────────── */
.modal.ems-hub-addpop { max-width: 600px; }
.ax { display: flex; flex-direction: column; gap: 14px; }
.ax-lede { margin: 0; font: 400 15px/1.5 var(--ems-font-body); color: var(--ems-ink-2); }
.ax-lede b { color: var(--ems-navy-800); }
.ax-link { display: flex; gap: 8px; padding: 6px; border-radius: 16px; background: var(--ems-soft); box-shadow: inset 0 0 0 1px var(--ems-line); transition: box-shadow var(--ems-dur) var(--ems-ease), background-color var(--ems-dur) var(--ems-ease); }
.ax-link:focus-within { background: #fff; box-shadow: inset 0 0 0 2px var(--ems-navy-500), var(--ems-focus); }
.ax-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 10px; margin: 0; color: var(--ems-navy-500); }
.ax-field input:not(#_) { flex: 1; min-width: 0; margin: 0; padding: 12px 0; border: 0; background: none; box-shadow: none; outline: none; font: 500 15.5px/1.3 var(--ems-font-ui); color: var(--ems-ink); }
.ax-link .primary { border-radius: 12px; white-space: nowrap; }
.ax-msg { min-height: 0; margin: 0; font: 600 13.5px/1.4 var(--ems-font-ui); color: var(--ems-red-600); }
.ax-msg:empty { display: none; }
.ax-alt { margin: 0; font: 400 13.5px/1.5 var(--ems-font-body); color: var(--ems-mute-2); }
.ax-reading { align-items: center; justify-content: center; min-height: 190px; text-align: center; }
.ax-reading p { margin: 0; font: 700 17px/1.3 var(--ems-font-display); color: var(--ems-navy-800); }
.ax-host { font: 500 13px/1.3 var(--ems-font-ui); color: var(--ems-mute-2); }
.ax-dots { display: inline-flex; gap: 7px; }
.ax-dots i { width: 10px; height: 10px; border-radius: 999px; background: var(--ems-navy-500); animation: ax-dot 1s var(--ems-ease) infinite; }
.ax-dots i:nth-child(2) { animation-delay: .15s; }
.ax-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ax-dot { 0%, 80%, 100% { transform: scale(.55); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.ax-found { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--ems-good-50); color: var(--ems-good); font: 600 14px/1.3 var(--ems-font-ui); }
.ax-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: #fff; box-shadow: var(--ems-lift); }
.ax-cardf { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ax-card input:not(#_) { width: 100%; margin: 0; padding: 4px 8px; border: 1px solid transparent; border-radius: 8px; background: none; box-shadow: none; transition: border-color var(--ems-dur) var(--ems-ease), background-color var(--ems-dur) var(--ems-ease); }
.ax-card input:not(#_):hover { background: var(--ems-soft); }
.ax-card input:not(#_):focus { border-color: var(--ems-navy-400); background: #fff; outline: none; box-shadow: var(--ems-focus); }
.ax-card .ax-t:not(#_) { display: block; width: 100%; min-height: 0; margin: 0; padding: 4px 8px; resize: none; overflow: hidden; border: 1px solid transparent; border-radius: 8px; background: none; box-shadow: none; font: 700 18px/1.3 var(--ems-font-display); color: var(--ems-navy-900); }
.ax-card .ax-t:not(#_):hover { background: var(--ems-soft); }
.ax-card .ax-t:not(#_):focus { border-color: var(--ems-navy-400); background: #fff; outline: none; box-shadow: var(--ems-focus); }
.ax-card .ax-c:not(#_) { font: 600 14.5px/1.3 var(--ems-font-ui); color: var(--ems-ink-2); }
.ax-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ax-meta label, .ax-urlh { display: flex; flex-direction: column; gap: 0; margin: 0; }
.ax-meta label span, .ax-urlh span { padding: 0 8px; font: 700 10.5px/1.3 var(--ems-font-ui); letter-spacing: .07em; text-transform: uppercase; color: var(--ems-mute-2); }
.ax-meta input:not(#_), .ax-urlh input:not(#_) { font: 500 14px/1.3 var(--ems-font-ui); color: var(--ems-ink); }
.ax-urlh { margin-top: 6px; }
.ax-src { display: inline-flex; align-items: center; gap: 6px; margin: 8px 8px 0; max-width: 100%; font: 500 12.5px/1.3 var(--ems-font-ui); color: var(--ems-navy-500); text-decoration: none; }
.ax-src span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-src:hover span { text-decoration: underline; }
.ax-desc { margin: 0; padding: 0 4px; font: 400 14px/1.55 var(--ems-font-body); color: var(--ems-mute); }
.ax-q { margin: 4px 0 0; font: 700 14px/1.3 var(--ems-font-ui); color: var(--ems-navy-800); }
.ax-stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ax-st { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--ems-line-2); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; transition: border-color var(--ems-dur) var(--ems-ease), background-color var(--ems-dur) var(--ems-ease); }
.ax-st b { font: 700 14px/1.2 var(--ems-font-ui); color: var(--ems-navy-800); }
.ax-st span { font: 400 12px/1.3 var(--ems-font-body); color: var(--ems-mute-2); }
.ax-st:hover { border-color: var(--ems-navy-300); }
.ax-st.is-on { border-color: var(--ems-navy-500); background: var(--ems-navy-500); }
.ax-st.is-on b, .ax-st.is-on span { color: #fff; }
.ax textarea { width: 100%; min-height: 170px; resize: vertical; }
.ax-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

@media (max-width: 760px) {
  .fx-bar { grid-template-columns: 1fr; gap: 4px; }
  .fx-f + .fx-f::before { left: 14px; right: 14px; top: -2px; bottom: auto; width: auto; height: 1px; }
  .fx-go { margin: 4px 2px 2px; min-height: 46px; }
  .fx-grid { grid-template-columns: 1fr; }
  .fx-row { align-items: flex-start; }
  .ax-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ax-link { flex-direction: column; }
  .ax-link .primary { min-height: 44px; }
  .ax-card { padding: 12px 10px; }
  .ax-card > .ems-jplate { display: none; }
  .ax-meta { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-list, .fx-chip { animation: none; }
  .ems-hub-tabs .ems-scorecard.is-bump .ems-scorecard-n, .ems-hub-tabs .ems-scorecard.is-bump { animation: none; }
}

/* ── one Jobs page (11-16). The scorecards and Add a job: ems-hub.css. ── */

/* Why these jobs, and the two doors to change them. */
.ems-jf-intro { margin: 0 2px 12px; }
.ems-jf-intro[hidden] { display: none; }
.ems-jf-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ems-jf-t { margin: 0; font: 800 22px/1.2 var(--ems-font-display); letter-spacing: -.01em; color: var(--ems-navy-800); }
.ems-jf-s { margin: 4px 0 0; font: 400 14.5px/1.5 var(--ems-font-body); color: var(--ems-mute); }
.ems-jf-doors { display: inline-flex; align-items: baseline; gap: 6px; margin-left: 4px; white-space: nowrap; }
.ems-jf-doors .linkish, .ems-jf-s .linkish { font-size: 14px; font-weight: 600; }
.ems-jf-doors > span { color: var(--ems-faint); }
.ems-jf-back { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--ems-navy-200); border-radius: 999px; background: var(--ems-navy-50); color: var(--ems-navy-700); font: 700 13.5px/1.2 var(--ems-font-ui); cursor: pointer; }
.ems-jf-back:hover { background: var(--ems-navy-500); border-color: var(--ems-navy-500); color: #fff; }
.ems-jf-new { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--ems-good-50); color: var(--ems-good); font: 700 12.5px/1.2 var(--ems-font-ui); animation: fx-in 200ms var(--ems-ease-out); }
.ems-jf-new.is-busy { background: var(--ems-navy-50); color: var(--ems-navy-700); }
.ems-jf-new .spinner { width: 12px; height: 12px; border-width: 2px; }
/* The rest of the same search, after the best matches: a quiet rule, not a new section. */
.ems-jf-more { display: flex; align-items: center; gap: 12px; margin: 26px 2px 14px; font: 700 12px/1.2 var(--ems-font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ems-mute-2); }
.ems-jf-more::after { content: ""; flex: 1; height: 1px; background: var(--ems-line); }
/* A next-door search under its heading says which answer it came from (11-16). */
.ems-jf-more-why { margin: -6px 2px 14px; font: 500 14px/1.45 var(--ems-font-ui); color: var(--ems-mute-2); }
/* The endless list's end: the next page loading, the way to it, the honest end. */
.ems-feed-busy { display: flex; align-items: center; gap: 10px; margin: 22px 2px 12px; font: 600 14px/1.3 var(--ems-font-ui); color: var(--ems-mute-2); }
.ems-feed-more { display: flex; justify-content: center; margin: 26px 0 8px; }
.ems-feed-end { display: flex; flex-direction: column; gap: 6px; margin: 30px 0 8px; padding: 20px 22px; border: 1px dashed var(--ems-line); border-radius: 16px; text-align: center; font: 500 14.5px/1.5 var(--ems-font-ui); color: var(--ems-mute-2); }
.ems-feed-end b { font-size: 16px; color: var(--ems-navy-800); }

/* ── Job preferences ─────────────────────────────────────────────────── */
.modal.ems-jp-pop { max-width: 560px; }
.ems-jp-lede { margin: 0; padding: 0 24px; font: 400 14px/1.5 var(--ems-font-body); color: var(--ems-mute); }
.jp { display: flex; flex-direction: column; gap: 18px; }
.jp-f { min-width: 0; }
.jp-titles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.jp-in { border: 1px solid var(--ems-line-2); border-radius: 12px; background: #fff; }
.jp-in:hover { background: #fff; }
.jp-in input:not(#_) { flex: 1; min-width: 0; margin: 0; padding: 11px 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none; font: 600 15px/1.3 var(--ems-font-ui); color: var(--ems-navy-900); }
.jp-in input:not(#_):disabled { color: var(--ems-faint); }
.jp-grid { display: flex; flex-direction: column; gap: 16px; }
.jp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 0; border-top: 1px solid var(--ems-line); }
@media (max-width: 560px) {
  .ems-jf-doors { display: flex; margin: 4px 0 0; }
}
/* The end of the list: two ways to see more (11-16). */
.ems-feed-end-acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 16px; margin-top: 6px; }
