:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;

  color: #243247;
  background: #faf7f0;

  --page: #faf7f0;
  --surface: #ffffff;
  --surface-soft: #f5f1e8;
  --line: #e5dfd3;
  --muted: #566174;
  --accent: #315bcb;
  --accent-dark: #2449aa;
  --green: #0e6b48;
  --shadow: 0 8px 28px rgba(55, 48, 34, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: inherit;
  background: var(--page);
}

.hidden {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
}

.site-header {
  min-height: 100px;
  padding: 18px max(24px, calc((100% - 1400px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  background: var(--page);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent);
  color: #fff;
  font-size: 27px;
  font-weight: 850;
}

.brand-mark.large {
  margin: 0 auto 16px;
}

.brand strong {
  display: block;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.brand small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.17em;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.icon-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 17px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.button.secondary,
.icon-button {
  background: var(--surface);
  border-color: var(--line);
  color: #243247;
}

.button.secondary:hover,
.icon-button:hover {
  background: var(--surface-soft);
}

.icon-button {
  min-width: 120px;
}

.header-actions .button,
.header-actions .icon-button {
  white-space: nowrap;
}

main {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 42px 28px 70px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: 64px;
  min-height: 470px;
  padding: 20px 0 48px;
}

.eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.15em;
}

.hero h1,
.welcome-row h1 {
  margin: 17px 0;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-copy > p {
  max-width: 550px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
}

.search-card,
.card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.search-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #edf1fc;
  color: var(--accent);
  font-size: 28px;
}

.search-card h2,
.card h2 {
  margin-top: 0;
}

.search-card-heading p,
.muted,
.search-footnote {
  color: var(--muted);
}

.search-card label,
.card label,
form > label,
#draftResult label {
  display: block;
  margin: 13px 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #243247;
  font-size: 13px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #b9c9f6;
  outline-offset: 1px;
  border-color: var(--accent);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.search-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.search-controls label {
  flex: 0 0 95px;
}

.search-button {
  flex: 1;
  min-height: 44px;
}

.search-footnote {
  margin-bottom: 0;
  font-size: 11px;
  line-height: 1.6;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.section-heading h2 {
  margin: 7px 0 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.search-results-section {
  padding: 20px 0 40px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.result {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}

.result h3 {
  margin: 0 0 7px;
  font-size: 17px;
}

.result .company {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.result p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.result-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.score,
.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 100px;
  background: #edf1fc;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
}

.joblink {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.joblink:hover {
  text-decoration: underline;
}

.welcome-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
}

.welcome-row h1 {
  font-size: clamp(32px, 4vw, 44px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 25px 0;
}

.stat {
  width: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  box-shadow: var(--shadow);
}

.stat:hover,
.stat.selected {
  border-color: var(--accent);
  background: #f3f5fc;
}

.stat b {
  display: block;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 13px 15px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tab.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.panel.hidden {
  display: none;
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.toolbar > input,
.toolbar > select {
  width: auto;
  flex: 1 1 150px;
}

.check {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.check input {
  width: auto;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

th[data-sort] {
  cursor: pointer;
}

th[data-sort]:hover {
  color: var(--accent);
}

.sort-indicator {
  white-space: nowrap;
}

.jobtitle {
  font-weight: 750;
}

.company {
  margin-top: 4px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.button.small {
  padding: 7px 10px;
  font-size: 11px;
}

.gridform {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gridform textarea {
  min-height: 80px;
}

.gridform button {
  justify-self: start;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(5px);
}

.modal-card {
  position: relative;
  width: min(100%, 440px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: inherit;
  font-size: 22px;
}

.oauth-button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 12px 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  font-weight: 650;
  text-decoration: none;
}

.oauth-button:hover {
  background: var(--surface-soft);
}

.oauth-button svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.small-note {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.6;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1100;
  display: none;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
}

footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px max(28px, calc((100% - 1344px) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .site-header,
[dir="rtl"] .header-actions,
[dir="rtl"] .brand,
[dir="rtl"] .welcome-row,
[dir="rtl"] .result-top {
  direction: rtl;
}

[dir="rtl"] th,
[dir="rtl"] td {
  text-align: right;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  main {
    padding: 28px 16px 45px;
  }

  .site-header {
    padding: 18px 16px;
  }

  .brand strong {
    font-size: 19px;
  }

  .brand small {
    font-size: 8px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .button,
  .header-actions .icon-button {
    min-height: 38px;
    padding: 9px 11px;
    font-size: 12px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .search-card,
  .card {
    padding: 19px;
  }

  .result-grid,
  .gridform {
    grid-template-columns: 1fr;
  }

  .stats {
    gap: 9px;
  }

  .stat {
    padding: 15px;
  }

  .stat b {
    font-size: 24px;
  }

  .search-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .search-controls label {
    flex-basis: auto;
  }

  footer {
    padding: 20px 16px;
  }
}

/* ==========================================
   Job Search Agent — visual refresh
   ========================================== */

:root {
  --page: #fbf6ec;
  --surface: #ffffff;
  --surface-soft: #f5ead8;
  --line: #e9dfce;
  --muted: #566174;
  --accent: #315bd5;
  --accent-dark: #2347ad;
  --shadow: 0 10px 30px rgba(75, 57, 28, 0.07);
}

html,
body {
  background: var(--page) !important;
  color: #202d43;
}

body {
  min-height: 100vh;
}

/* Consistent header alignment */
.site-header {
  width: 100%;
  padding: 18px max(28px, calc((100% - 1400px) / 2));
  background: #fffdf8;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  background: linear-gradient(135deg, #426cf0, #2347b5);
  box-shadow: 0 4px 12px rgba(49, 91, 213, 0.2);
}

.brand strong {
  color: #202d43;
}

/* More energetic hero section */
.hero {
  min-height: 520px;
  gap: 55px;
}

.hero-copy h1 {
  color: #202d43;
  line-height: 1.08;
}

.hero-copy h1 span {
  color: #315bd5;
}

.eyebrow {
  color: #315bd5;
}

/* Cards */
.search-card,
.card,
.result {
  background: #fffefa;
  border-color: #e9dfce;
  box-shadow: var(--shadow);
}

.search-card {
  border-top: 4px solid #426cf0;
}

.search-icon {
  background: #eaf0ff;
  color: #315bd5;
}

/* Buttons */
.button {
  background: linear-gradient(135deg, #426cf0, #3153c6);
  border-color: #3153c6;
  box-shadow: 0 3px 8px rgba(49, 83, 198, 0.13);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  background: linear-gradient(135deg, #3153c6, #24439f);
  box-shadow: 0 5px 14px rgba(49, 83, 198, 0.2);
  transform: translateY(-1px);
}

.button.secondary,
.icon-button {
  background: #fffefa;
  color: #29364c;
  border-color: #e3d9c9;
  box-shadow: none;
}

.button.secondary:hover,
.icon-button:hover {
  background: #f5ead8;
}

/* Language dropdown */
#languageSelect {
  min-width: 112px;
  min-height: 42px;
  padding: 10px 30px 10px 12px;
  border: 1px solid #e3d9c9;
  border-radius: 9px;
  background-color: #fffefa;
  color: #29364c;
  cursor: pointer;
}

/* Stats look interactive */
.stat {
  border-top: 3px solid #d5dffb;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stat:hover,
.stat.selected {
  background: #f0f3ff;
  border-top-color: #315bd5;
  border-color: #b9c9f6;
  transform: translateY(-2px);
}

.stat b {
  color: #3153c6;
}

/* Tabs */
.tab {
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab:hover {
  color: #315bd5;
}

/* Footer aligned with the main content */
footer {
  width: 100%;
  max-width: none;
  margin: 35px auto 0;
  padding: 24px max(28px, calc((100% - 1344px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  background: #fffdf8;
  color: #566174;
  font-size: 12px;
  line-height: 1.6;
}

footer span {
  display: block;
}

/* Sign-in modal */
#signInModal {
  z-index: 10000;
  padding: 20px;
  background: rgba(32, 45, 67, 0.55);
  backdrop-filter: blur(5px);
}

#signInModal .modal-card {
  width: min(100%, 440px);
  padding: 36px;
  border: 1px solid #e9dfce;
  border-radius: 20px;
  background: #fffefa;
  box-shadow: 0 25px 80px rgba(32, 45, 67, 0.25);
  color: #202d43;
}

#signInModal h2 {
  margin: 15px 0 10px;
  font-size: 25px;
}

#signInModal p {
  color: #566174;
  font-size: 13px;
  line-height: 1.7;
}

#signInModal .oauth-button {
  min-height: 52px;
  margin: 13px 0;
  border: 1px solid #e3d9c9;
  border-radius: 10px;
  background: #fff;
  color: #29364c;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#signInModal .oauth-button:hover {
  background: #f5f1e8;
  border-color: #b9c9f6;
}

#signInModal .oauth-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#signInModal .oauth-button svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

#signInModal .modal-close {
  cursor: pointer;
}

/* Form controls */
input,
select,
textarea {
  border-color: #e3d9c9;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #7795f0;
  outline: 3px solid rgba(65, 108, 240, 0.12);
}

/* Mobile layout */
@media (max-width: 600px) {
  footer {
    padding: 20px 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  #signInModal .modal-card {
    padding: 28px 20px;
  }
}

/* Connected account and editable CV profile */
.connected-account-state {
  margin-top: 14px;
}

.connected-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.connected-account-details {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.connected-account-details p {
  margin: 6px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.connected-indicator {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: #16845a;
  box-shadow: 0 0 0 4px rgba(22, 132, 90, 0.12);
}

.profile-box {
  margin-top: 22px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

.profile-heading h3 {
  margin: 8px 0;
  font-size: 25px;
}

.profile-heading p {
  max-width: 650px;
  line-height: 1.7;
}

.profile-cv-name {
  padding: 12px 14px;
  border-radius: 9px;
  background: var(--surface-soft);
  overflow-wrap: anywhere;
}

#profileEdit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

#profileEdit label {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

#profileEdit label:first-of-type,
#profileEdit textarea[name="summary"],
#profileEdit .profile-actions {
  grid-column: 1 / -1;
}

#profileEdit input,
#profileEdit textarea {
  display: block;
  margin-top: 7px;
  color: #243247;
}

#profileEdit textarea {
  min-height: 90px;
  line-height: 1.6;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.profile-empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.profile-empty h3 {
  margin-top: 0;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

html[dir="rtl"] .connected-account,
html[dir="rtl"] .connected-account-details,
html[dir="rtl"] .profile-heading {
  direction: rtl;
}

html[dir="rtl"] #profileEdit,
html[dir="rtl"] #profileEdit label {
  text-align: right;
}

html[dir="rtl"] #profileEdit input,
html[dir="rtl"] #profileEdit textarea {
  direction: rtl;
  text-align: right;
}

@media (max-width: 650px) {
  #profileEdit {
    grid-template-columns: 1fr;
  }

  #profileEdit label,
  #profileEdit .profile-actions {
    grid-column: 1 / -1;
  }

  .profile-box {
    padding: 18px;
  }

  .connected-account {
    align-items: stretch;
    flex-direction: column;
  }
}
/* Search result actions */
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.result-details { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line, rgba(0,0,0,.1)); }
.result-details.hidden { display: none; }

/* Location autocomplete */
.ac-list { position: absolute; z-index: 3000; margin: 0; padding: 4px; list-style: none; background: var(--card, #fff);
  border: 1px solid rgba(0,0,0,.15); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); max-height: 280px; overflow-y: auto; }
.ac-list.hidden { display: none; }
.ac-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ac-list li span { opacity: .6; }
.ac-list li:hover, .ac-list li.active { background: rgba(60,90,220,.12); }

.badge-verified { background: rgba(30,150,80,.15); color: #14703a; }
.badge-unverified { background: rgba(220,150,20,.18); color: #8a5a00; }

.table-wrap { overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.results-table th, .results-table td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--line, rgba(0,0,0,.1)); vertical-align: top; }
.results-table th { font-weight: 600; white-space: nowrap; }
.results-table .result-actions { margin-top: 0; flex-direction: column; flex-wrap: nowrap; min-width: 130px; }
.result-details-row.hidden { display: none; }
.result-details-row td { background: rgba(127,127,127,.06); }
@media (max-width: 760px) {
  .results-table thead { display: none; }
  .results-table, .results-table tbody, .results-table tr, .results-table td { display: block; width: 100%; }
  .results-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; }
  .results-table .result-actions { flex-direction: row; flex-wrap: wrap; }
}

.results-wrap { margin-top: 24px; display: block; }
.results-table { min-width: 860px; }
.results-table .result-actions { min-width: 150px; }
.results-table .result-actions .button { width: 100%; white-space: nowrap; }
@media (max-width: 760px) { .results-table { min-width: 0; } }

.match { font-size: 15px; }
.match-ok { color: #14703a; }
.match-low { color: #8a5a00; }
.results-table { min-width: 940px; }

.contract-summary { padding: 16px; border-radius: 12px; background: rgba(127,127,127,.08); margin: 12px 0 18px; }
.contract-summary h3 { margin: 0 0 4px; }
.contract-summary .headline { font-size: 18px; font-weight: 600; margin: 4px 0 10px; }
.contract-toolbar { display: flex; justify-content: flex-end; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(127,127,127,.15); }
.pill-issue, .pill-high { background: rgba(200,50,50,.15); color: #a12626; }
.pill-medium { background: rgba(220,150,20,.18); color: #8a5a00; }
.pill-ok { background: rgba(30,150,80,.15); color: #14703a; }
.pill-missing { background: rgba(127,127,127,.15); }
.finding { border: 1px solid var(--line, rgba(0,0,0,.12)); border-inline-start: 5px solid #999; border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.finding h4 { margin: 0 0 6px; }
.finding p { margin: 0 0 6px; }
.finding-high { border-inline-start-color: #c83232; }
.finding-medium { border-inline-start-color: #dc9614; }
.finding-info { border-inline-start-color: #4a7bd0; }
.finding blockquote { margin: 8px 0 0; padding: 6px 10px; border-inline-start: 3px solid rgba(127,127,127,.4); background: rgba(127,127,127,.07); font-size: 13px; }
.contract-report .results-table th, .contract-report .results-table td { text-align: start; }

/* ---- Multi-page layout ---- */
.site-header { min-height: 0; padding: 14px max(20px, calc((100% - 1400px) / 2)); flex-wrap: wrap; gap: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.main-nav { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; justify-content: safe center; }      /* wraps instead of cutting links off */
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #46556b; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.main-nav a:hover { background: var(--surface-soft); }
.main-nav a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 1880px) { .main-nav { order: 3; flex-basis: 100%; justify-content: flex-start; } }
.page-head { padding: 32px 0 8px; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -.02em; }
.page-head p { margin: 0; font-size: 16px; }
#dashboard { max-width: 1400px; margin: 0 auto; padding: 0 max(20px, 2vw) 40px; }
.panel { display: grid; gap: 20px; margin-top: 18px; }
.panel .card { margin: 0; }
.card h2 { margin-top: 0; }
.toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar > input, .toolbar > select { width: 100%; }
.toolbar .check { white-space: nowrap; }
.gridform { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; align-items: end; }
.gridform label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.gridform textarea, .gridform .button { grid-column: 1 / -1; }
.gridform .button { justify-self: start; }
#signInRequired { margin-top: 18px; max-width: 560px; }

.pill-wm { background: rgba(74,123,208,.15); color: #2f5aa8; font-size: 12px; }

.ac-wrap { position: relative; display: block; width: 100%; }
.ac-wrap > input { width: 100%; padding-inline-end: 34px; }
.ac-toggle { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font-size: 14px; padding: 6px; cursor: pointer; }
.ac-list { max-height: 300px; overflow-y: auto; border-radius: 12px; padding: 6px; }
.ac-list li { align-items: center; padding: 9px 12px; }
.ac-list li span { font-size: 12px; opacity: .65; white-space: nowrap; }

.ac-wrap.ac-has-pin::before { content: "⌖"; position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 17px; pointer-events: none; z-index: 1; }
.ac-wrap.ac-has-pin > input { padding-inline-start: 36px; }
.ac-wrap > input { padding-inline-end: 56px; }
.ac-clear { position: absolute; inset-inline-end: 30px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; padding: 4px 6px; cursor: pointer; }
.ac-clear.hidden { display: none; }
.ac-list { font-family: inherit; font-size: 15px; }
.ac-list li { gap: 10px; justify-content: flex-start; }
.ac-list li em { font-style: normal; flex: 1; text-align: start; }
.ac-list li span { margin-inline-start: auto; font-size: 12px; }
.ac-list li .ac-pin { font-weight: 400; color: var(--muted); width: 18px; text-align: center; }
.ac-list li mark { background: transparent; color: var(--accent); font-weight: 700; }
.ac-list li.ac-head { cursor: default; padding: 10px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ac-list li.ac-head:hover { background: transparent; }
.ac-list li.ac-typed { border-top: 1px solid var(--line); margin-top: 4px; }

.contract-disclaimer { background: #000; color: #ff1f1f; font-weight: 700; padding: 14px 16px; border-radius: 10px; line-height: 1.5; margin: 14px 0; }

.account-links{display:grid;gap:.6rem;margin:.8rem 0}
.account-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.6rem .8rem;border:1px solid var(--line,#e3ded3);border-radius:10px}

.brand-logo{height:50px;width:auto;flex:0 0 auto;display:block}
.brand-logo.large{height:64px;margin:0 auto 16px}

.donate{display:inline-block;padding:.45rem .9rem;border-radius:999px;background:#c41212;color:#fff;font-weight:700;text-decoration:none}
.donate:hover{filter:brightness(.92)}

details.donate{position:relative;display:inline-block}
details.donate summary{list-style:none;cursor:pointer;display:inline-block;padding:.45rem .9rem;border-radius:999px;background:#c41212;color:#fff;font-weight:700}
details.donate summary::-webkit-details-marker{display:none}
details.donate .donate-body{position:absolute;right:0;bottom:calc(100% + 8px);z-index:20;display:grid;gap:.6rem;justify-items:center;padding:1rem;background:#fff;border:1px solid #e3ded3;border-radius:14px;box-shadow:0 8px 24px rgba(0,0,0,.15);min-width:200px}
details.donate figure{margin:0;text-align:center}
details.donate figcaption{font-size:.85rem;color:#555;margin-top:.3rem}


.results-toolbar{display:flex;flex-wrap:wrap;gap:.6rem;margin:0 0 .9rem}

/* ---- Accessibility, information pages and consent ---- */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 2000; padding: 10px 16px; background: #1d3f9f; color: #fff; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 8px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible, th[role="button"]:focus-visible {
  outline: 3px solid #1d3f9f; outline-offset: 2px; box-shadow: 0 0 0 5px #fff;
}
main:focus, main[tabindex]:focus-visible { outline: none; }
.lang-select { width: auto; }
.table-compact { min-width: 0; }
.check.consent { display: flex; align-items: flex-start; gap: .6rem; margin: .9rem 0; font-size: .92rem; line-height: 1.5; }
.check.consent input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin-top: .2rem; }
.check.consent a { color: #1d3f9f; text-decoration: underline; }
.danger-zone { border-color: #c41212; }
.button.danger { background: #c41212; border-color: #c41212; color: #fff; }
.button.danger:hover { background: #a50f0f; }
.legal { max-width: 800px; margin: 0 auto; padding: 32px 20px 56px; line-height: 1.7; }
.legal h1 { font-size: 2rem; margin: 0 0 .6rem; }
.legal h2 { font-size: 1.3rem; margin: 2rem 0 .5rem; }
.legal h3 { font-size: 1.05rem; margin: 1.3rem 0 .3rem; }
.legal a { color: #1d3f9f; text-decoration: underline; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: .6rem .7rem; border: 1px solid var(--line); }
.legal th { background: var(--surface-soft); }
.legal ul { padding-inline-start: 1.3rem; }
.legal li { margin: .35rem 0; }
.todo { background: #fff3b0; color: #5a4300; padding: 0 .3rem; border-radius: 4px; font-weight: 700; }
footer { flex-wrap: wrap; gap: .5rem 1.2rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.footer-links a { color: #1d3f9f; text-decoration: underline; }
.footer-business { flex-basis: 100%; font-size: .85rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
@media (max-width: 720px) {
  .legal table { display: block; overflow-x: auto; min-width: 0; width: 100%; }
}
footer .todo, footer .footer-business span { display: inline; }
.footer-business a { color: #1d3f9f; text-decoration: underline; }

/* My Jobs table status and verification dropdown sizing */
.statusSelect, .verifySelect { min-width: 150px; padding-right: 28px; text-overflow: ellipsis; }
.verifySelect { min-width: 170px; }

/* follow-up reminders and the draft dialog */
.reminder { margin: 6px 0 0; color: #8a4b00; font-size: 13px; }
.reminder .button { margin-top: 4px; }
p.reminder { padding: 8px 12px; border: 1px solid #f1d9a8; border-radius: 10px; background: #fff7e6; }
#draftModal .modal-card { width: min(100%, 560px); max-height: calc(100vh - 40px); overflow-y: auto; text-align: start; }
#draftModal textarea, #draftModal input:not([type="checkbox"]), #draftModal select { width: 100%; }
#draftModal .actions { margin-top: 12px; }

#boardList h3 { overflow-wrap: anywhere; max-height: 5.5em; overflow: auto; }
#panel-board .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.ai-box { margin-top: .6rem; }
.ai-box summary { cursor: pointer; }
.ai-box .ai-out { padding: .4rem 0; }
.company-cell { min-width: 150px; }
.company-cell .button { margin-top: 6px; white-space: normal; }
.company-sum { margin-top: 6px; font-size: 13px; }
@keyframes justAdded { from { background: #fff3bf; } to { background: transparent; } }
tr.just-added td { animation: justAdded 3s ease-out; }
.consent-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 20px; background: #fff3bf; border-bottom: 1px solid var(--line); }
.consent-banner p { margin: 0; flex: 1 1 320px; }
.consent-banner.hidden { display: none; }
.collect-notice { font-size: 12px; line-height: 1.45; margin: 8px 0; }
.ai-note { font-size: 12px; }

/* Tailor CV: answer the gaps the AI found */
.gap-list { display: grid; gap: .5rem; margin: .5rem 0 1rem; }
.gap-item { display: grid; gap: .25rem; }
.gap-item .gap-check { display: flex; gap: .6rem; align-items: flex-start; justify-content: flex-start; text-align: start; font-weight: 600; margin: 0; }
.gap-item .gap-check input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; }
.gap-item .gap-check span { flex: 1 1 auto; font-size: .95rem; font-weight: 500; color: inherit; }
.gap-item input[type="text"] { margin-inline-start: 1.75rem; width: calc(100% - 1.75rem); max-width: 40rem; }

/* =====================================================================
   Joblim UI refresh — visual layer only.
   Appended last so it overrides earlier rules; no class names, IDs or
   markup changed. Delete this block to return to the previous look.
   ===================================================================== */
:root {
  --page: #f6f4ef;
  --surface: #ffffff;
  --surface-soft: #eef2fa;
  --line: #e2e1dc;
  --ink: #142036;
  --muted: #5a6577;
  --accent: #1f4fd1;
  --accent-dark: #173ca3;
  --accent-soft: #e7eeff;
  --sand: #f3e9d6;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow: 0 1px 2px rgba(20, 32, 54, .05), 0 12px 32px -12px rgba(20, 32, 54, .14);
  --shadow-lift: 0 2px 4px rgba(20, 32, 54, .06), 0 22px 44px -18px rgba(31, 79, 209, .35);
  color: var(--ink);
  background: var(--page);
}
body {
  display: flex; flex-direction: column; min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Noto Sans Hebrew", "Noto Sans Arabic", Arial, sans-serif;
  background: var(--page); color: var(--ink); -webkit-font-smoothing: antialiased; line-height: 1.55;
}
main, #dashboard { flex: 1 0 auto; }

/* Header: one tidy row on wide screens, nav as an underline tab bar */
.site-header {
  padding: 12px max(20px, calc((100% - 1280px) / 2));
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line); gap: 10px 28px;
}
.brand-logo { height: 42px; }
.brand strong { font-size: 21px; letter-spacing: -.02em; }
.brand small { margin-top: 2px; font-size: 9.5px; letter-spacing: .16em; }
.main-nav { gap: 2px; justify-content: flex-start; }
@media (max-width: 1880px) { .main-nav { order: 0; flex-basis: auto; } }
@media (max-width: 1440px) { .main-nav { order: 3; flex-basis: 100%; } }
.main-nav a {
  position: relative; padding: 8px 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.main-nav a:hover { background: var(--surface-soft); color: var(--ink); }
.main-nav a.active { background: var(--accent-soft); color: var(--accent); }
.main-nav a.active::after {
  content: ""; position: absolute; inset-inline: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent);
}
#languageSelect, .lang-select {
  min-height: 38px; min-width: 0; padding-block: 7px; padding-inline: 12px 30px; border-radius: 10px;
  background-color: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600;
}

/* Buttons */
.button {
  min-height: 42px; border-radius: 11px; font-size: 14px; font-weight: 650;
  background: var(--accent); border-color: var(--accent); box-shadow: 0 6px 16px -8px rgba(31, 79, 209, .6);
}
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.secondary, .icon-button { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: none; }
.button.secondary:hover, .icon-button:hover { background: var(--surface-soft); border-color: #cfd6e6; }
.button.small { min-height: 34px; padding: 6px 12px; font-size: 13px; }

/* Hero: blue band with soft light, search card floats on top */
.hero {
  position: relative; isolation: isolate; gap: 48px; min-height: 0;
  margin: 8px 0 32px; padding: 56px clamp(24px, 4vw, 56px);
  border-radius: 28px; color: #fff;
  background:
    radial-gradient(900px 400px at 0% 0%, rgba(255, 255, 255, .16), transparent 60%),
    radial-gradient(700px 380px at 100% 100%, rgba(120, 180, 255, .35), transparent 60%),
    linear-gradient(135deg, #173ca3 0%, #1f4fd1 55%, #2f6cf0 100%);
  box-shadow: var(--shadow-lift);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: .09;
  background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 22px 22px;
}
.hero .eyebrow {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 11px; letter-spacing: .14em;
}
.hero h1, .hero-copy h1 { color: #fff; letter-spacing: -.035em; font-weight: 800; }
.hero h1 span, .hero-copy h1 span { color: #cfe0ff; }
.hero-copy > p { color: rgba(255, 255, 255, .86); font-size: 17px; max-width: 56ch; }
.trust-points { display: flex; flex-wrap: wrap; gap: 8px; }
.trust-points span {
  padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #fff;
}
.search-card {
  color: var(--ink); background: var(--surface); border: 0; border-top: 0;
  border-radius: 22px; box-shadow: 0 30px 60px -24px rgba(8, 20, 60, .55);
}
.search-card::before { display: none; }
.search-icon { background: var(--accent-soft); color: var(--accent); border-radius: 12px; }
.search-card h2 { margin: 0; }
.search-card-heading p { margin: 2px 0 0; color: var(--muted); }

/* Forms */
input, select, textarea {
  background-color: var(--surface); border: 1px solid #d9dbe2; border-radius: 11px; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:hover, select:hover, textarea:hover { border-color: #c2c8d6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(31, 79, 209, .14); }
label { color: #2b3850; }

/* Long privacy / consent wording: quieter, scannable */
.collect-notice, .search-footnote, .small-note, .ai-note {
  font-size: 12.5px; line-height: 1.55; color: var(--muted);
}
.collect-notice {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: #f7f8fb; border-inline-start: 3px solid #c9d3ea;
}
.check.consent {
  padding: 12px 14px; border-radius: 12px; background: #f7f8fb; border: 1px solid var(--line);
  font-size: 13px; line-height: 1.55; color: #3c475a;
}

/* Page headings & cards */
.page-head { padding: 36px 0 6px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.03em; }
.page-head p { color: var(--muted); font-size: 16.5px; }
.card, .panel .card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.card h2 { font-size: 21px; letter-spacing: -.015em; }
.gridform { gap: 16px 18px; }
.gridform label { font-size: 13.5px; color: #2b3850; }

/* Stats & tabs */
.stat { border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.stat:hover { border-color: #c9d3ea; }
.stat.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 79, 209, .12); }
.stat b { color: var(--ink); }

/* Tables */
.table-wrap, .results-wrap { border-radius: var(--radius-md); }
.results-table, table { font-size: 14px; }
.results-table th, th {
  background: #f7f8fb; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.results-table tbody tr:hover td, tbody tr:hover td { background: #fafbfe; }
.badge, .pill { border-radius: 999px; }
.match { font-weight: 800; }

/* Contract disclaimer: still prominent, easier to read */
.contract-disclaimer {
  background: #fff4f2; color: #9b1c12; border: 1px solid #f5c4bd; border-inline-start: 5px solid #d2321f;
  font-weight: 650;
}

/* Modals */
.modal { background: rgba(10, 18, 36, .5); backdrop-filter: blur(4px); }
.modal-card { border-radius: 22px; border: 0; box-shadow: 0 40px 80px -30px rgba(8, 20, 60, .6); }

/* Footer: pinned to the bottom of short pages */
footer { margin-top: auto; background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

/* Consent banner as a bottom bar */
.consent-banner {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 1500; max-width: 960px; margin-inline: auto;
  display: flex; align-items: center; gap: 16px; padding: 14px 18px;
  background: var(--ink); color: #e9eefb; border-radius: 16px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .5);
}
.consent-banner p { margin: 0; font-size: 13.5px; }
.consent-banner a { color: #a9c4ff; }

/* Information pages */
.legal { max-width: 820px; line-height: 1.7; }
.legal h1 { letter-spacing: -.03em; }

@media (max-width: 900px) {
  .hero { padding: 32px 20px; border-radius: 22px; gap: 28px; }
}
@media (max-width: 600px) {
  main { padding-inline: 14px; }
  .hero { margin-inline: -4px; }
  .consent-banner { flex-direction: column; align-items: stretch; inset-inline: 10px; bottom: 10px; }
}
.header-actions { margin-inline-start: auto; flex-wrap: nowrap; }
#languageSelect, .lang-select { width: auto; max-width: 170px; }
@media (max-width: 1240px) { .header-actions { margin-inline-start: auto; } }
@media (max-width: 700px) {
  .main-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding-inline: 20px; }
}

/* ---- Right-to-left (Hebrew, Arabic) — visual only ---- */
/* Consent bar: stop the text block growing tall when stacked (all languages) */
@media (max-width: 600px) { .consent-banner p { flex: 0 0 auto; } }

/* Flip physical left/right rules from earlier in the file to logical ones */
th, td, .legal th, .legal td { text-align: start; }
.modal-close { right: auto; inset-inline-end: 12px; }
#toast { right: auto; inset-inline-end: 20px; }
.skip-link { left: auto; inset-inline-start: 8px; }
details.donate .donate-body { right: auto; inset-inline-end: 0; }
.statusSelect, .verifySelect { padding-right: 0; padding-inline-end: 28px; }
.stat { text-align: start; }

/* Hebrew and Arabic: no letter-spacing (it breaks Arabic letter joining), a little more line height */
[dir="rtl"] .brand small, [dir="rtl"] .eyebrow, [dir="rtl"] .hero .eyebrow,
[dir="rtl"] .results-table th, [dir="rtl"] th, [dir="rtl"] .ac-list li.ac-head,
[dir="rtl"] .hero h1, [dir="rtl"] .hero-copy h1, [dir="rtl"] .page-head h1,
[dir="rtl"] .brand strong, [dir="rtl"] .card h2, [dir="rtl"] .legal h1 { letter-spacing: 0; }
[dir="rtl"] .brand small { font-size: 11px; }
[dir="rtl"] .eyebrow, [dir="rtl"] .hero .eyebrow { font-size: 12px; }
[dir="rtl"] .results-table th, [dir="rtl"] th { text-transform: none; font-size: 13px; }
[dir="rtl"] body { line-height: 1.65; }
[dir="rtl"] .hero h1, [dir="rtl"] .hero-copy h1 { line-height: 1.2; }
html[lang="ar"] .hero h1, html[lang="ar"] .hero-copy h1 { line-height: 1.4; }
html[lang="ar"] .page-head h1 { line-height: 1.4; }

/* Mirror the hero lighting so the bright corner follows reading direction */
[dir="rtl"] .hero {
  background:
    radial-gradient(900px 400px at 100% 0%, rgba(255, 255, 255, .16), transparent 60%),
    radial-gradient(700px 380px at 0% 100%, rgba(120, 180, 255, .35), transparent 60%),
    linear-gradient(225deg, #173ca3 0%, #1f4fd1 55%, #2f6cf0 100%);
}

/* Navigation */
[dir="rtl"] .main-nav { justify-content: flex-start; }

/* Forms: Latin entries (links, emails, numbers) stay readable inside RTL text */
[dir="rtl"] input[type="url"], [dir="rtl"] input[type="email"], [dir="rtl"] input[type="number"] { direction: ltr; text-align: right; }
[dir="rtl"] .check input, [dir="rtl"] .check.consent input { margin-inline: 0 10px; }

/* Warning and notice boxes: accent bar already sits on the reading-start side */
[dir="rtl"] .collect-notice, [dir="rtl"] .contract-disclaimer, [dir="rtl"] .finding { text-align: right; }

/* Pick lists (roles, skills, places, companies) */
.chip-picker { display: grid; gap: 8px; margin-top: 6px; }
.chip-picker .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 999px;
  background: var(--accent-soft, #e7eeff); color: var(--accent, #1f4fd1); font-size: 13px; font-weight: 600; }
.chip button { border: 0; background: transparent; color: inherit; font-size: 16px; line-height: 1; padding: 0 4px; border-radius: 50%; }
.chip button:hover { background: rgba(31, 79, 209, .12); }
/* Hebrew needs on results */
.pill-heb { margin-inline-start: 6px; font-size: 11.5px; vertical-align: middle; }
.pill-heb-required { background: #fff1e6; color: #9a4a00; }
.pill-heb-posting { background: #fdf3d8; color: #7a5a00; }
.pill-heb-advantage { background: #eef2fa; color: #3b4a66; }

/* Where We Search */
.src-stats { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 18px 0 8px; list-style: none; }
.src-stats li { padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; }
.src-stats b { font-size: 18px; color: var(--accent); margin-inline-end: 4px; }
.src-filter { display: block; max-width: 360px; margin: 10px 0 4px; font-weight: 600; font-size: 14px; }
.src-filter input { margin-top: 6px; }
.src-list { columns: 2 260px; column-gap: 28px; padding-inline-start: 0; list-style: none; }
.src-list li { break-inside: avoid; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.src-list li[hidden] { display: none; }
.src-list .src-name { font-weight: 600; margin-inline-end: auto; }
.src-list .pill { font-size: 11px; padding: 2px 8px; }
.src-jobs { font-size: 12px; color: var(--green, #0e6b48); font-weight: 700; }
.src-plain li { font-weight: 500; }
.legal details summary { cursor: pointer; font-weight: 600; margin: 8px 0; }

/* A one-line hint under a field (e.g. the Company box: any name can be typed) */
.field-hint { margin: 4px 0 10px; font-size: .85rem; line-height: 1.35; }

/* Information pages use the app layout: page heading, then the text in a card. Lines stay a readable length. */
.info-main .legal { max-width: none; margin: 18px 0 0; padding: clamp(22px, 3.5vw, 44px); line-height: 1.7; }
.info-main .legal > p, .info-main .legal > ul, .info-main .legal > ol, .info-main .legal > h2, .info-main .legal > h3,
.info-main .legal > details, .info-main .legal > label { max-width: 82ch; }
.info-main .legal > h2:first-child { margin-top: 0; }
.info-main .legal h2 { font-size: 1.3rem; letter-spacing: -.015em; padding-top: 1.2rem; border-top: 1px solid var(--line); margin-top: 1.6rem; }
.info-main .legal > h2:first-child, .info-main .legal > p:first-child + h2 { border-top: 0; padding-top: 0; }
.info-main .legal details summary { cursor: pointer; font-weight: 650; color: var(--accent); }

/* ---- Header: Search, Job Board, My Jobs, Tools ▾, Help ▾; language, Sign In or Profile ▾; ☰ on phones ---- */
.site-header { min-height: 64px; padding-block: 8px; gap: 10px 18px; }
.main-nav { flex: 1 1 auto; flex-wrap: nowrap; align-items: center; gap: 4px; order: 0; }
.main-nav > a, .nav-menu > summary {
  color: var(--muted); padding: 9px 11px; border-radius: 9px; font-size: 14px; font-weight: 650; white-space: nowrap; cursor: pointer; list-style: none;
}
.nav-menu { position: relative; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after { content: "⌄"; margin-inline-start: 6px; font-size: 12px; }
.nav-menu.has-active > summary { color: var(--accent); background: var(--accent-soft); }
.nav-menu-panel {
  position: absolute; z-index: 50; top: calc(100% + 8px); inset-inline-start: 0; display: grid; gap: 3px; padding: 8px;
  width: max-content; min-width: 200px; max-width: min(300px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.nav-menu-end { inset-inline-start: auto; inset-inline-end: 0; }
.nav-menu-panel a, .menu-action {
  display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink);
  text-decoration: none; text-align: start; font: inherit; font-size: 14px; white-space: nowrap; cursor: pointer;
}
.nav-menu-panel a:hover, .menu-action:hover { background: var(--surface-soft); }
.nav-menu-panel a.active { color: var(--accent); font-weight: 700; }
.header-actions { align-items: center; gap: 8px; flex-wrap: nowrap; }
.header-actions .lang-select { width: auto; min-width: 110px; height: 38px; min-height: 38px; padding-block: 6px; font-size: 13px; }
.sign-in { min-height: 38px; padding: 7px 14px; }          /* outline: the page's own action stays the only solid button */
.account-menu > summary {
  display: inline-flex; align-items: center; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--ink);
}
.mobile-menu-toggle { display: none; width: 38px; height: 38px; padding: 0; }
.page-head { padding-top: 12px; }
.panel { margin-top: 8px; }
@media (max-width: 900px) {
  .main-nav {
    display: none; position: absolute; top: 100%; inset-inline: 0; flex-direction: column; align-items: stretch;
    padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .site-header.menu-open .main-nav { display: flex; }
  .main-nav > a, .nav-menu > summary { display: block; padding: 12px; }
  .nav-menu-panel { position: static; width: auto; min-width: 0; max-width: none; margin: 4px 8px 8px; box-shadow: none; }
  .nav-menu-panel a, .menu-action { white-space: normal; }
  .site-header { flex-direction: row; flex-wrap: nowrap; align-items: center; }
  .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; min-width: 0; }
  .header-actions { margin-inline-start: auto; width: auto; }
}
@media (max-width: 600px) {
  .site-header { padding: 8px 12px; }
  .brand { gap: 8px; }
  .brand-logo { width: 38px; height: 36px; }
  .brand strong { font-size: 18px; }
  .brand small { display: none; }
  @media (max-width: 420px) { .brand > span { display: none; } }     /* the logo alone on small phones */
  .header-actions { gap: 6px; }
  .header-actions .lang-select { min-width: 0; max-width: 92px; height: 35px; min-height: 35px; font-size: 12px; }
  .sign-in, .account-menu > summary { min-height: 35px; padding: 6px 10px; font-size: 13px; }
  .mobile-menu-toggle { width: 35px; height: 35px; flex-basis: 35px; padding: 0; }
}

/* ---- Form controls share one look ---- */
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background-color: var(--surface); color: var(--ink); padding: 10px 12px;
}
select {
  appearance: none; padding-inline-end: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23717d90' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
[dir="rtl"] select { background-position: left 13px center; }
.ac-wrap.ac-has-pin > input:not([type="checkbox"]) { padding-inline-start: 36px; }   /* room for the location pin */
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px;
}
.search-options { margin: 10px 0 14px; color: var(--muted); font-size: 13px; }
.search-options summary { cursor: pointer; width: max-content; text-decoration: underline; text-underline-offset: 3px; }
.search-options label { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.search-options select { max-width: 110px; }
.search-controls { justify-content: flex-end; }

/* ---- Job Board rows, tags, loading and empty state ---- */
.job-row { position: relative; margin: 12px 0; padding: 18px; padding-inline-end: 150px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.job-row > h3 { margin: 0 0 8px; }
.job-row > p { margin: 0 0 10px; }
.job-row > [data-board-save] { position: absolute; top: 16px; inset-inline-end: 16px; }
.job-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.job-tag { display: inline-flex; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 12px; font-weight: 650; }
.job-tag.is-new { background: #e7f6ed; color: #176b3a; border-color: #b8e2c7; }
.job-tag.is-heb { background: #fff6e5; color: #8a5a00; border-color: #f1d9a6; }
.board-empty { padding: 28px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; background: var(--surface-soft); }
.board-empty h3 { margin: 0 0 8px; }
.skeleton { height: 105px; margin: 12px 0; border-radius: 14px; background: linear-gradient(90deg, var(--surface-soft), var(--line), var(--surface-soft)); background-size: 200% 100%; animation: shimmer 1.25s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
@media (max-width: 900px) {
  .job-row { padding: 16px; }
  .job-row > [data-board-save] { position: static; display: inline-flex; margin-top: 8px; }
}

/* ---- Phones: result tables fit the screen; My Jobs becomes labelled cards ---- */
@media (max-width: 760px) {
  .results-table { min-width: 0 !important; width: 100%; }
  .results-table, .results-table tbody, .results-table tr, .results-table td { max-width: 100%; }
  .results-table td { overflow-wrap: anywhere; max-height: 5.5em; overflow: auto; }
  .results-table .result-actions { min-width: 0; }
  .results-table .result-actions .button { width: auto; }
  .result-details-row td { display: block; }
  .jobs-table-wrap { overflow: visible; }
  .jobs-table-wrap table, .jobs-table-wrap tbody, .jobs-table-wrap tbody tr, .jobs-table-wrap tbody td { display: block; width: 100%; min-width: 0; }
  .jobs-table-wrap thead { display: none; }
  .jobs-table-wrap tbody tr { margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .jobs-table-wrap tbody td {
    display: grid; grid-template-columns: minmax(88px, 34%) minmax(0, 1fr); align-items: start; gap: 10px;
    padding: 9px 0; border-bottom: 1px solid var(--line); text-align: start; overflow-wrap: anywhere;
  }
  .jobs-table-wrap tbody td:last-child { border-bottom: 0; }
  .jobs-table-wrap tbody td[data-label]:not([colspan])::before { content: attr(data-label); font-weight: 650; color: var(--muted); }
  .jobs-table-wrap tbody td[colspan] { display: block; }
  .jobs-table-wrap .statusSelect, .jobs-table-wrap .verifySelect { width: 100%; min-width: 0; }
  .jobs-table-wrap .actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .jobs-table-wrap .actions .button { max-width: 100%; white-space: normal; }
}

/* A translated information page: a short note above the text */
.translation-note { padding: 10px 14px; border-radius: 10px; background: var(--surface-soft); border: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

/* ---- Review fixes (8 Nov) ---- */
/* Search: a working indicator while the live search runs, and a compact search bar above the results */
.is-busy::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-inline-end: 8px; vertical-align: -2px;
  border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.refine-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.refine-bar input { flex: 1 1 240px; min-width: 0; }

/* Search results below 1000px: compact cards (title; company · location; match and status; link and actions) */
@media (max-width: 1000px) {
  .results-table { min-width: 0 !important; }
  .results-table thead { display: none; }
  .results-table, .results-table tbody { display: block; width: 100%; }
  .results-table tr.job-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 14px; margin: 0 0 12px;
    border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .results-table tr.job-row td { display: block; width: auto; padding: 0; border: 0; }
  .results-table tr.job-row td::before { content: none !important; }
  .results-table .td-title { flex: 1 1 100%; font-size: 15px; }
  .results-table .td-company { font-weight: 600; }
  .results-table .td-location { color: var(--muted); }
  .results-table .td-company::after { content: " ·"; color: var(--muted); }
  .results-table .td-notes { flex: 1 1 100%; color: var(--muted); font-size: 13px; }
  .results-table .td-url { order: 9; }
  .results-table .result-actions { order: 10; flex: 1 1 100%; display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; min-width: 0; }
  .results-table .result-actions .button { width: auto; }
  .results-table tr.result-details-row { display: block; margin: -8px 0 12px; }
  .results-table tr.result-details-row.hidden { display: none; }
  .results-table tr.result-details-row td { display: block; width: 100%; }
}

/* My Jobs cards on phones: the label sits on its own at the start, everything else stays in the value column */
@media (max-width: 760px) {
  .jobs-table-wrap tbody td { display: block !important; position: relative; padding-inline-start: 38% !important; min-height: 1.6em; }
  .jobs-table-wrap tbody td[data-label]:not([colspan])::before { position: absolute; inset-inline-start: 0; top: 9px; width: 34%; }
  .jobs-table-wrap tbody td[colspan] { padding-inline-start: 0 !important; }
}

/* Phones: the search card comes first on the home page */
@media (max-width: 760px) {
  #publicHero.hero { display: flex; flex-direction: column; }
  #publicHero .search-card { order: -1; }
  #publicHero .hero-copy p { display: none; }
}

/* Header on phones: the open menu never makes the page wider; menu groups shown open; room at the start of items */
@media (max-width: 900px) {
  .main-nav { box-sizing: border-box; max-width: 100vw; overflow-x: hidden; padding-inline: 16px; }
  .main-nav > a, .nav-menu > summary { padding-inline: 16px; }
  .main-nav .nav-menu > summary { pointer-events: none; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding-block: 10px 4px; }
  .main-nav .nav-menu > summary::after { content: none; }
  .main-nav .nav-menu-panel { border: 0; padding: 0 0 6px; margin: 0; background: none; }
  .main-nav .nav-menu-panel a { padding-inline: 28px; }
}
@media (max-width: 600px) {
  .brand > span { display: inline !important; }
  .brand small { display: none; }
}

/* Calmer extras */
.trust-points span { background: none !important; border: 0 !important; box-shadow: none !important; padding-inline: 0 !important; }
.donate, details.donate summary { background: var(--surface-soft); color: var(--ink); border: 1px solid var(--line); font-weight: 650; }
.footer-links a + a::before { content: none; }

.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; }

/* Notices are filled in by script: an empty one shows nothing (it looked like an empty progress bar) */
.collect-notice:empty { display: none; }
.field-hint { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.45; font-weight: 400; }
.consent-details { margin: -4px 0 10px; font-size: 13px; }
.consent-details summary { cursor: pointer; color: var(--accent); width: max-content; }
.consent-details p { margin: 6px 0 0; }

/* File inputs: a drop zone that matches the site */
input[type="file"] { display: block; width: 100%; box-sizing: border-box; padding: 18px; border: 2px dashed #c9d3ea; border-radius: 12px;
  background: #f7f8fb; color: var(--muted); font: inherit; cursor: pointer; }
input[type="file"]:hover, input[type="file"]:focus-visible { border-color: var(--accent); background: #fff; }
input[type="file"]::file-selector-button { margin-inline-end: 12px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }



/* My Jobs on phones: the filters behind one button, and the summary tiles in a single scrolling row */
.filters-toggle { display: none; }
@media (max-width: 760px) {
  .filters-toggle { display: inline-flex; width: max-content; }
  #jobsToolbar:not(.open) { display: none; }
  .stats { display: flex !important; overflow-x: auto; gap: 8px; scrollbar-width: thin; }
  .stats .stat { flex: 0 0 auto; min-width: 104px; padding: 10px 12px; }
  .stats .stat b { font-size: 20px; }
}
.gridform .field-note { grid-column: 1 / -1; margin: 0; }
.unsub-main { max-width: 560px; margin: 60px auto; padding: 0 16px; }

.job-notes { margin-top: 7px; padding: 6px 8px; border-left: 3px solid var(--accent, #64748b); background: var(--surface-soft, rgba(127,127,127,.08)); border-radius: 4px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 5.5em; overflow: auto; }
