/* Whole-site theme: shared canonical JM24 tokens on static and dynamic HTML. */
html[data-theme="dark"] {
  color-scheme: dark;
  --jm-primary: #91b9ff;
  --jm-primary-hover: #b3d0ff;
  --jm-primary-container: #253b61;
  --jm-on-primary: #111827;
  --jm-secondary: #87d9c0;
  --jm-secondary-container: #173d39;
  --jm-success: #88d8ad;
  --jm-text: #e9eef7;
  --jm-text-soft: #b8c3d3;
  --jm-outline: #40516a;
  --jm-surface: #182338;
  --jm-surface-1: #101927;
  --jm-surface-2: #1d2b40;
  --jm-surface-3: #253650;
  --jm-danger: #ffb2b2;
  --jm-shadow: 0 8px 28px rgba(0,0,0,.23);
  --jm-shadow-raised: 0 18px 42px rgba(0,0,0,.35);
  --surface-raised: var(--jm-surface-2);
  --color-border: var(--jm-outline);
  --color-text-muted: var(--jm-text-soft);
  --color-muted: var(--jm-text-soft);
  --color-primary: var(--jm-primary);
  --muted: var(--jm-text-soft);
  --border: var(--jm-outline);
  --text: var(--jm-text);
  --surface: var(--jm-surface);
}
html[data-theme="dark"] body,
html[data-theme="dark"] .page,
html[data-theme="dark"] .jobs-workspace,
html[data-theme="dark"] .engine-results .jobs-workspace {background:var(--jm-surface-1);color:var(--jm-text)}
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] body.search-homepage .site-header,
html[data-theme="dark"] body.search-homepage .site-footer {
  background:var(--jm-surface-1);border-color:var(--jm-outline);color:var(--jm-text-soft)
}
html[data-theme="dark"] .site-header .nav a {color:var(--jm-text)}
html[data-theme="dark"] .site-header .mobile-menu__panel {background:var(--jm-surface);border-color:var(--jm-outline)}
html[data-theme="dark"] .site-header .mobile-menu__close {background:var(--jm-surface-2);color:var(--jm-text)}
html[data-theme="dark"] .engine-home {background:radial-gradient(ellipse 75% 65% at 50% 38%,#1d3154 0%,#101927 82%)}
html[data-theme="dark"] .hero,html[data-theme="dark"] .page-hero,
html[data-theme="dark"] .jobs-top {background:var(--jm-surface-1);color:var(--jm-text)}
html[data-theme="dark"] :where(.content-card,.surface,.job-card,.jobs-feed,.jobs-sidebar,.engine-job-preview,.engine-search__primary,.company-result,.claim-card,.form-panel,.account-card) {
  background:var(--jm-surface);color:var(--jm-text);border-color:var(--jm-outline)
}
html[data-theme="dark"] :where(.jobs-filterbar,.jobs-filter-chip,.job-card__badge,.job-card__actions,.engine-job-preview__body,.engine-search__location-field,.job-card__meta,.content-grant-zone) {
  border-color:var(--jm-outline);color:var(--jm-text)
}
html[data-theme="dark"] :where(input,select,textarea) {
  background:var(--jm-surface-2);color:var(--jm-text);border-color:var(--jm-outline)
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {color:var(--jm-text-soft);opacity:.82}
html[data-theme="dark"] :where(.button--secondary,.jobs-filter-chip,.engine-filter-more,.jobs-location-apply,.jobs-place-options) {
  background:var(--jm-surface-2);color:var(--jm-text);border-color:var(--jm-outline)
}
html[data-theme="dark"] :where(.job-card__employer,.job-card__meta,.meta,.legal-note,.jobs-feed__heading p,.jobs-top__copy p) {color:var(--jm-text-soft)}
html[data-theme="dark"] :where(.engine-home__examples a,.engine-home__search,.engine-search__primary,.engine-results .jobs-feed) {color:var(--jm-text)}
html[data-theme="dark"] .engine-search__primary {background:var(--jm-surface)}
html[data-theme="dark"] .engine-search__primary input {background:transparent}
html[data-theme="dark"] :where(.employer-dashboard .billing-row,.activation-steps li,.profile-completeness,.logo-upload,.verification-zone,.employer-performance,.performance-grid>div) {
  background:var(--jm-surface-2);color:var(--jm-text);border-color:var(--jm-outline)
}
html[data-theme="dark"] :where(.page a:not(.button):not(.job-card__title), .site-footer a) {text-underline-offset:3px}
html[data-theme="dark"] :where(.engine-home__subtitle,.lead,.muted){color:var(--jm-text-soft)}
/* Exact approved v6 white artwork; no filters, color inversion or invented branding.
   CSS-driven preference overrides the operating-system preference when selected. */
.brand-logo--dark { display:none !important; }
html[data-theme="dark"] .brand-logo--light { display:none !important; }
html[data-theme="dark"] .brand-logo--dark { display:block !important; }
html[data-theme="dark"] .brand--image .brand-logo--dark { max-width:100%; }

/* Results screen: the original light UI has literal #fff/near-black colors.
   Scope by html[data-theme] AND result classes to outrank Astro's bundled CSS.
   Prevent light text on the old white results-heading surface (reported issue). */
html[data-theme="dark"] .engine-results .jobs-feed__heading,
html[data-theme="dark"] .jobs-feed__heading {
  background:var(--jm-surface-1);
  color:var(--jm-text);
  border-color:var(--jm-outline);
}
html[data-theme="dark"] .engine-results .jobs-feed__heading h2,
html[data-theme="dark"] .engine-results .jobs-feed__heading .workspace-label,
html[data-theme="dark"] .engine-results .jobs-feed__clear-search {
  background:transparent;
  color:var(--jm-text);
}
html[data-theme="dark"] .engine-results .jobs-feed__heading .workspace-label {
  color:var(--jm-primary);
}
html[data-theme="dark"] .engine-results .jobs-feed__clear-search,
html[data-theme="dark"] .engine-results .jobs-feed__clear-search:hover,
html[data-theme="dark"] .engine-results .jobs-feed > .meta .text-link {
  color:var(--jm-primary);
  text-decoration-color:currentColor;
}
html[data-theme="dark"] .engine-results .jobs-feed > .meta,
html[data-theme="dark"] .engine-results .jobs-feed > .meta:not(a) {
  color:var(--jm-text-soft);
}
html[data-theme="dark"] .engine-results .jobs-top,
html[data-theme="dark"] .engine-results .jobs-workspace,
html[data-theme="dark"] .engine-results .jobs-feed,
html[data-theme="dark"] .engine-results .jobs-sidebar,
html[data-theme="dark"] .engine-results .jobs-filterbar {
  background:var(--jm-surface-1);
  color:var(--jm-text);
}
html[data-theme="dark"] .engine-results .jobs-filterbar,
html[data-theme="dark"] .engine-results .jobs-sponsored,
html[data-theme="dark"] .engine-results .jobs-sidebar__card,
html[data-theme="dark"] .engine-results .jobs-loading,
html[data-theme="dark"] .engine-results .jobs-error,
html[data-theme="dark"] .engine-results .jobs-empty--feed,
html[data-theme="dark"] .engine-results .engine-job-preview,
html[data-theme="dark"] .engine-results .engine-job-preview__head,
html[data-theme="dark"] .engine-results .jobs-location-picker,
html[data-theme="dark"] .engine-results .jobs-place-options {
  background:var(--jm-surface);
  color:var(--jm-text);
  border-color:var(--jm-outline);
}
html[data-theme="dark"] .engine-results .job-card,
html[data-theme="dark"] .engine-results .job-card__top,
html[data-theme="dark"] .engine-results .jobs-card-list {
  background:transparent;
  color:var(--jm-text);
  border-color:var(--jm-outline);
}
html[data-theme="dark"] .engine-results .job-card.is-preview-selected {
  background:var(--jm-surface-2);
}
html[data-theme="dark"] .engine-results .job-card__title,
html[data-theme="dark"] .engine-results .job-card__title a,
html[data-theme="dark"] .engine-results .engine-job-preview a:not(.engine-job-preview__apply),
html[data-theme="dark"] .engine-results .jobs-active-filters a,
html[data-theme="dark"] .engine-results .jobs-sponsored__disclosure a {
  color:var(--jm-primary);
}
html[data-theme="dark"] .engine-results .jobs-filter-chip.is-active {
  background:var(--jm-primary-container);
  border-color:var(--jm-primary);
  color:var(--jm-text);
}
html[data-theme="dark"] .engine-results .jobs-filter-chip:not(.is-active) {
  background:var(--jm-surface-2);
  color:var(--jm-text-soft);
}
html[data-theme="dark"] .engine-results .jobs-location-form input,
html[data-theme="dark"] .engine-results .engine-job-preview__close,
html[data-theme="dark"] .engine-results .engine-suggestions {
  color:var(--jm-text);
  background:var(--jm-surface-2);
  border-color:var(--jm-outline);
}
/* Common secondary panels also previously shipped hard-coded white. */
html[data-theme="dark"] .jobs-sidebar__card,
html[data-theme="dark"] .jobs-loading,
html[data-theme="dark"] .jobs-error,
html[data-theme="dark"] .jobs-empty--feed,
html[data-theme="dark"] .portal-block,
html[data-theme="dark"] .jobs-trust {
  background:var(--jm-surface);
  color:var(--jm-text);
  border-color:var(--jm-outline);
}
html[data-theme="dark"] .job-card__title { color:var(--jm-text); }
html[data-theme="dark"] .job-card__badge:not(.job-card__badge--sponsored) {
  background:var(--jm-secondary-container);
  color:var(--jm-secondary);
}
html[data-theme="dark"] :where(.jobs-filterbar__label,.jobs-pagination p,.jobs-loading p,.jobs-error p,.jobs-sidebar__card p,.jobs-trust article span) {
  color:var(--jm-text-soft);
}
html[data-theme="dark"] :where(.jobs-sidebar__card a,.jobs-suggestion-list a,.jobs-trust a) {
  color:var(--jm-primary);
}

/* No hidden color changes via images; labels stay semantic and accessible. */
.header-controls {display:flex;align-items:center;gap:9px;margin-left:auto}
.site-header .theme-toggle {
  display:grid;place-items:center;flex:0 0 auto;
  width:46px;height:46px;padding:0;border:1px solid var(--jm-outline);
  border-radius:14px;background:var(--jm-surface);color:var(--jm-text);
  cursor:pointer
}
.site-header .theme-toggle:hover {border-color:var(--jm-primary);color:var(--jm-primary)}
.site-header .theme-toggle:focus-visible{outline:3px solid var(--jm-primary);outline-offset:3px}
.site-header .theme-icon-sun{display:none}
html[data-theme="dark"] .site-header .theme-icon-sun{display:block}
html[data-theme="dark"] .site-header .theme-icon-moon{display:none}
.site-header .header-controls .mobile-menu {margin-left:0}
.site-footer .footer-bottom {display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:6px 22px}
body.search-homepage .site-footer .footer-bottom {display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:6px 22px}
.site-footer .footer-copyright {justify-self:start}
.site-footer .footer-eu {justify-self:center;white-space:nowrap;color:var(--jm-text-soft)}
.site-footer .footer-minimal-links {justify-self:end}
.site-footer .footer-bottom :where(a,span) {font-size:.78rem}
@media(max-width:850px) {
  .site-footer .footer-bottom,
  body.search-homepage .site-footer .footer-bottom {grid-template-columns:1fr;justify-items:center}
  .site-footer .footer-copyright,.site-footer .footer-eu,.site-footer .footer-minimal-links {justify-self:center;text-align:center}
}
@media(max-width:420px) {
  .site-header .theme-toggle {width:42px;height:42px}
  .site-header .header-controls {gap:6px}
  .site-footer .footer-minimal-links {gap:3px 12px}
}
@media(prefers-reduced-motion:reduce) {
  html {scroll-behavior:auto}
}


/* Accessibility repair: 2026-10-08 iPhone screenshots. Treat light and dark
   as complete design systems, not only body-color palettes. Preserve readable
   labels, keyboard focus and natural flow at magnification. */
html[data-theme="dark"] :is(.facet-page header,.facet-page .facet-directory-section,.facet-page .facet-job,
  .facet-page .profession-browser-form,.facet-page .profession-browser-result,
  .company-page .jm-facet-preview-container>.engine-job-preview:not([hidden])) {
  background:var(--jm-surface);
  color:var(--jm-text);
  border-color:var(--jm-outline);
}
html[data-theme="dark"] .facet-page :is(h1,h2,h3,.result-count),
html[data-theme="dark"] .facet-page header :is(h1,h2,h3),
html[data-theme="dark"] .facet-directory-section > h2 {
  color:var(--jm-text);
}
html[data-theme="dark"] .facet-page :is(.eyebrow,.job-link,.facet-job h3 a,.facet-job h2 a,
  .profession-browser-result,.profession-browser-result a) {
  color:var(--jm-primary);
}
html[data-theme="dark"] .facet-page :is(.breadcrumbs,.breadcrumbs a,.facet-job p,.profession-browser-status,
  .profession-browser-result span) {
  color:var(--jm-text-soft);
}
html[data-theme="dark"] .facet-page .facet-note {
  color:var(--jm-text);
  background:var(--jm-surface-2);
  border-color:var(--jm-outline);
}
html[data-theme="dark"] .facet-page .jm-facet-results-list .facet-job,
html[data-theme="dark"] .company-page .jm-facet-results-list .company-job {
  color:var(--jm-text);
  background:var(--jm-surface);
  border-color:var(--jm-outline);
}
html[data-theme="dark"] .facet-page .jm-facet-results-list .facet-job.is-preview-selected,
html[data-theme="dark"] .company-page .jm-facet-results-list .company-job.is-preview-selected {
  background:var(--jm-surface-2);
  border-left-color:var(--jm-primary);
}
html[data-theme="dark"] .facet-page .jm-facet-results-list .facet-job h2 a,
html[data-theme="dark"] .company-page .jm-facet-results-list .company-job h2 a {
  color:var(--jm-primary);
}
html[data-theme="dark"] .facet-page .jm-facet-results-list .facet-job p,
html[data-theme="dark"] .company-page .jm-facet-results-list .company-job p {
  color:var(--jm-text-soft);
}
/* A bright-blue action button must have dark ink, not white-on-light-blue.
   This is the blank button observed in the opened vacancy preview. */
html[data-theme="dark"] :is(.button--primary,.jobs-location-apply) {
  background:var(--jm-primary);
  color:var(--jm-on-primary);
  border-color:var(--jm-primary);
}
html[data-theme="dark"] :is(.button--primary,.jobs-location-apply):hover {
  background:var(--jm-primary-hover);
  color:var(--jm-on-primary);
}
html[data-theme="dark"] .engine-job-preview__apply {
  background:var(--jm-primary);
  color:var(--jm-on-primary);
  border:2px solid var(--jm-primary);
}
html[data-theme="dark"] .engine-job-preview__apply:hover {
  background:var(--jm-primary-hover);
  color:var(--jm-on-primary);
}
html[data-theme="dark"] .engine-job-preview__head,
html[data-theme="dark"] .engine-job-preview__body {
  background:var(--jm-surface);
  color:var(--jm-text);
}
html[data-theme="dark"] .engine-job-preview__description,
html[data-theme="dark"] .engine-job-preview__description p,
html[data-theme="dark"] .engine-job-preview h2,
html[data-theme="dark"] .engine-job-preview h3,
html[data-theme="dark"] .engine-job-preview__company {
  color:var(--jm-text);
}
html[data-theme="dark"] .engine-job-preview__note,
html[data-theme="dark"] .engine-job-preview__location,
html[data-theme="dark"] .engine-job-preview__source {
  color:var(--jm-text-soft);
}
html[data-theme="dark"] :is(.alert-form,.alert-form__notice,.jobs-feed__alert .alert-form) {
  background:var(--jm-surface-2);
  color:var(--jm-text);
  border-color:var(--jm-outline);
}
html[data-theme="dark"] .alert-form .field :is(input,select,textarea) {
  background:var(--jm-surface-1);
  color:var(--jm-text);
  border-color:var(--jm-outline);
}
html[data-theme="dark"] .alert-form__notice :is(strong,span),
html[data-theme="dark"] .alert-form .field label {color:var(--jm-text)}
/* The FAQ banner has a deliberately dark brand background in BOTH themes. */
.banner .button--secondary,
html[data-theme="dark"] .banner .button--secondary {
  background:#fff;
  color:#112d62;
  border-color:#fff;
}
.banner .button--secondary:hover,
html[data-theme="dark"] .banner .button--secondary:hover {
  background:#e6edff;
  color:#112d62;
}
html[data-theme="dark"] .banner :is(h2,p,.eyebrow) {color:#fff}
html[data-theme="dark"] .banner p {color:#d9e5ff}
/* Contrast, not opacity, conveys secondary or inactive status. */
html[data-theme="dark"] .jobs-active-filters__chip {
  color:var(--jm-text);
  background:var(--jm-primary-container);
  border-color:var(--jm-outline);
}
html[data-theme="dark"] .jobs-filter-chip.is-active {
  color:var(--jm-text);
  background:var(--jm-primary-container);
  border-color:var(--jm-primary);
}
html[data-theme="dark"] .jobs-filterbar__label {color:var(--jm-text-soft)}
html[data-theme="dark"] .engine-results .jobs-filterbar__group {min-width:0}
html[data-theme="dark"] .engine-results .jobs-filterbar__group--location {overflow:visible}
html[data-theme="dark"] :is(.taxonomy-result,.taxonomy-browser__search input,.pseo-directory-card,.guide-example,.guide-checklist li) {
  background:var(--jm-surface);
  color:var(--jm-text);
  border-color:var(--jm-outline);
}
html[data-theme="dark"] :is(.pseo-hero,.guide-callout,.jobs-trust,.employer-workspace-nav) {
  background:var(--jm-surface-1);
  color:var(--jm-text);
  border-color:var(--jm-outline);
}
/* Keyboard focus must not depend on the browser's light default outline. */
:where(a,button,input,select,textarea,summary,[role="button"]):focus-visible {
  outline:3px solid #954d00;
  outline-offset:3px;
}
html[data-theme="dark"] :where(a,button,input,select,textarea,summary,[role="button"]):focus-visible {
  outline-color:#ffcf70;
}
:where(.engine-job-preview,.facet-page,.jobs-feed) :is(a,button) {
  text-underline-offset:.16em;
}
:where(.engine-job-preview,.facet-page,.jobs-feed) :is(a,button):focus-visible {
  position:relative;
  z-index:2;
}
@media(max-width:760px) {
  /* Reflow rather than horizontal-clip the full freshness group on iPhone. */
  .engine-results .jobs-filterbar__group:not(.jobs-filterbar__group--location) {
    flex-wrap:wrap;
    overflow:visible;
    align-items:center;
    gap:9px;
  }
  .engine-results .jobs-filterbar__group .jobs-filterbar__label {
    flex:1 0 100%;
    margin:0;
  }
  .engine-results .jobs-filter-chip {
    min-height:44px;
    white-space:normal;
  }
  .engine-results .jobs-active-filters,
  .engine-results .jobs-active-filters__chips {
    min-width:0;
    max-width:100%;
    overflow-wrap:anywhere;
  }
  .engine-results .jobs-filterbar {height:auto;max-height:none;overflow:visible}
  .engine-results .engine-filter-more {flex:1 1 100%;min-width:0}
}
/* Users with additional OS contrast requirements get outlines and emphatic text. */
@media(prefers-contrast:more) {
  .facet-page a, .jobs-feed a {text-decoration:underline}
  :where(button,input,select,textarea,.facet-job,.content-card) {border-width:2px}
}
@media(forced-colors:active) {
  :where(.button,.theme-toggle,.jobs-filter-chip,.facet-job,.engine-job-preview__apply) {
    forced-color-adjust:auto;
    border:1px solid ButtonText;
  }
  :where(a,button,input,select,textarea,summary):focus-visible {
    outline:3px solid Highlight;
  }
}
