/* Youth Futures Canada — /jobs, a career-discovery experience (this is the "FIND" stage of Start → Explore →
   Find → Apply → Move). Tokens only, mobile first. Loaded AFTER public.css + maps.css. Every class here is
   prefixed jsearch / jrow / jchip / jpager / jseg / jview / career-nav (plus the page-specific jobs-hero /
   jobs-map-section / jobs-index) so the legacy .jobs-layout / .filters / .results rules in public.css + maps.css
   no longer apply to this page.

   Composition: hero (sitewide journey route + "Find what's next") → the search form, reframed in three tiers —
   Search (keyword + location, the primary action) → Discover (.career-nav, the five career-compass areas as a
   navigation layer) → Refine (the existing category/province/more-filters row, now visually quieter and
   explicitly labelled) → a full-bleed, edge-to-edge map ("Explore Canada" — a discovery canvas, not a bordered
   widget in a card) with a live count sitting on the map itself (.jsearch__map-stat) → an editorial "Your next
   moves" job index, deliberately calmer than the map section since it's the secondary layer you land in once
   you've found something on it. The map is shown/hidden by the exact same class toggles as before (.jobs-map-
   on/off at >=768, .jsearch.is-map on phone) — only what those classes affect has changed. jobs-search.js is
   untouched: every element it queries by data-attribute or class still exists with the same name. The career-
   area tabs are pure client-side show/hide of existing category chips (jobs-search.js, new self-contained
   block) — every chip is a real, unmodified /jobs?category= link; no filtering logic changed.

   Breakpoints: <768 phone (filters = full-screen drawer, List | Map switch) · 768–1023 tablet (bar + popover,
   map toggle) · >=1024 desktop (bar + popover, map toggle) — the filter bar stays horizontal at every width
   from 768 up; there is no sidebar. */

/* ---------- jobs hero: light, not navy — the journey indicator + headline + search sit here ---------- */
.jobs-hero { background: var(--cc-surface); padding: var(--sp-8) 0; }
.jobs-hero__route { list-style: none; margin: 0 0 var(--sp-4); padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font: 700 .75rem/1 var(--kds-font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--kds-fg-faint); }
.jobs-hero__route li:not(:last-child)::after { content: "→"; margin-left: 8px; color: var(--cc-line-strong); }
.jobs-hero__route .is-active { color: var(--cc-orange-700); }
.jobs-hero__title { margin: 0 0 10px; font-size: var(--yf-display-lg); max-width: 14ch; }
.jobs-hero .lead { margin: 0; max-width: 56ch; }
.jobs-hero__search { background: #fff; border-top: 1px solid var(--kds-border); border-bottom: 1px solid var(--kds-border); padding: var(--sp-5) 0; }
.jobs-hero__search > .container > .eyebrow { margin-bottom: var(--sp-3); }
.jsearch__total { margin: 0; }

/* ---------- filter bar (the form) ---------- */
.jsearch__label { display: block; font: 700 .6875rem/1 var(--kds-font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--kds-fg-muted); margin-bottom: 6px; }
.jsearch__form { position: relative; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.jsearch__form .field { gap: 6px; }
.jsearch__kw { position: relative; min-width: 0; }
.jsearch__kw-input { padding-right: 48px; }
.jsearch__kw-go { position: absolute; right: 3px; bottom: 3px; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--cc-navy); display: grid; place-items: center; cursor: pointer; }
.jsearch__kw-go:hover { background: var(--cc-navy-50); }
.jsearch__open { gap: 8px; white-space: nowrap; padding-left: 14px; padding-right: 14px; }
.jsearch__count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--cc-red-700); color: #fff; font-size: .75rem; font-weight: 700; line-height: 1; }
.jsearch__go { display: none; }                          /* phone: the magnifier inside the keyword field submits */
.jsearch__near-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.jsearch__near-me { gap: 6px; white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.jsearch__near-status { margin: 4px 0 0; }
.jsearch__near-status:empty { display: none; }
.jsearch__near-status .is-error { color: var(--kds-danger); font-weight: 500; }
.jsearch__fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.jsearch__fieldset legend { font-weight: 600; font-size: .9rem; color: var(--cc-ink); padding: 0; margin-bottom: 6px; }
.jsearch__more-btn { display: none; }                    /* phone: the "more" fields are simply part of the drawer */
.jsearch__more-grid { display: grid; gap: 16px; }
.jsearch__more-foot { display: none; }
.jsearch__chev { transition: transform .15s; }
/* "Refine your search" — labels the secondary (distance/category/province/more) row as a distinct, quieter
   tier under the primary keyword+location search, without touching a single field's name or behaviour. */
.jsearch__refine-label { margin: 4px 0 0; font: 700 .6875rem/1 var(--kds-font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--kds-fg-faint); }

/* phone drawer = the panel, full screen, above the sticky header (z 500) */
.jsearch__panel { display: none; }
.js .jsearch__panel.is-open { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 700; background: #fff; }
html:not(.js) .jsearch__panel { display: grid; grid-column: 1 / -1; gap: 14px; }   /* no JS: every field inline, form still submits */
html:not(.js) .jsearch__open, html:not(.js) .jsearch__panel-head, html:not(.js) .jsearch__panel-foot { display: none; }
html:not(.js) .jsearch__panel-body { display: grid; gap: 14px; }
.jsearch__panel-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--kds-border); }
.jsearch__panel-head h2 { margin: 0; font-size: 1.15rem; }
.jsearch__close { width: 44px; height: 44px; border: 1px solid var(--kds-border); border-radius: 10px; background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--cc-navy); }
.jsearch__panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px; display: grid; gap: 16px; align-content: start; }
.jsearch__panel-foot { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--kds-border); background: rgba(255,255,255,.97); }
html.jsearch-lock, html.jsearch-lock body { overflow: hidden; }

/* segmented radio group (work arrangement) */
.jseg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.jseg__opt { position: relative; }
.jseg__opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.jseg__opt span { display: grid; place-items: center; min-height: 44px; padding: 6px 6px; white-space: nowrap; border: 1px solid var(--kds-border); border-radius: 6px; font-size: .9rem; font-weight: 500; background: #fff; text-align: center; }
.jseg__opt input:checked + span { background: var(--cc-navy); color: #fff; border-color: var(--cc-navy); }
.jseg__opt input:focus-visible + span { outline: 2px solid var(--kds-focus-ring); outline-offset: 2px; }
@media (min-width: 480px) { .jseg { grid-template-columns: repeat(4, 1fr); } }

/* active-filter chips, under the search bar */
.jchips { list-style: none; margin: var(--sp-4) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jchip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 14px; border-radius: 999px; background: var(--cc-orange-100); color: var(--cc-orange-700); font-size: .8125rem; font-weight: 600; text-decoration: none; }
.jchip:hover { background: var(--cc-red-100); color: var(--cc-red-700); }
.jchip__x { font-size: 1.1rem; line-height: 1; }
.jchip--clear { background: transparent; border: 1px solid var(--kds-border); color: var(--kds-fg-muted); }

/* ---------- discover: the five career-compass areas (C.CAREER_PATHS, same data/copy as the homepage's "Find
   your lane") as a navigation layer, not a generic category dropdown. Plain text tabs (never another card
   grid) filter which of that area's real categories show as chips underneath — client-side only; every chip
   is an unmodified /jobs?category= link, so JS-off visitors simply see all five groups of chips at once. ---------- */
.career-nav { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--kds-border); }
.career-nav__label { margin: 0 0 10px; font: 700 .6875rem/1 var(--kds-font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--kds-fg-faint); }
.career-nav__tabs { display: flex; flex-wrap: wrap; gap: 4px 2px; }
.career-nav__tab { border: 0; border-bottom: 2px solid transparent; background: none; padding: 8px 12px 8px 0; margin-right: 14px; font: 800 .9375rem/1 var(--cc-font-display); color: var(--kds-fg-muted); cursor: pointer; }
.career-nav__tab:hover { color: var(--cc-navy); }
.career-nav__tab.is-active { color: var(--cc-orange-700); border-bottom-color: var(--cc-orange); }
.career-nav__chips { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.career-nav__chips--hidden { display: none; }
.career-nav__chip { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px; border: 1px solid var(--kds-border); border-radius: 999px; color: var(--cc-navy); font-size: .8125rem; font-weight: 600; text-decoration: none; }
.career-nav__chip:hover { border-color: var(--cc-red-700); color: var(--cc-red-700); }
.career-nav__chip.is-current { background: var(--cc-spark); border-color: var(--cc-spark); color: var(--cc-ink); }

/* ---------- explore canada: ONE exploration surface — the map (the geographic layer of the journey) and the
   results (the opportunities found within it) share a single background and a single heading, instead of
   reading as a map widget stacked on top of a separate job list. .jobs-map-section is still the exact element
   the map show/hide toggle targets (jobs-map-on/off at >=768, .jsearch.is-map on phone) — only its own former
   heading moved out, up into .jobs-explore__head, so hiding the map never hides the section intro or the
   results underneath it. ---------- */
.jobs-explore { background: var(--map-bg); border-top: 1px solid var(--kds-border); padding-bottom: var(--sp-8); }
.jobs-explore__head { padding-top: var(--sp-7); max-width: 68ch; }
.jobs-explore__head h2 { margin: 4px 0 10px; max-width: 20ch; }
.jobs-explore__head .lead { margin: 0; }
.jobs-map-section { display: none; padding-top: var(--sp-6); }
.jsearch__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jview { display: inline-flex; border: 1px solid var(--kds-border); border-radius: 6px; overflow: hidden; background: #fff; }
.jview button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 0; background: transparent; font: inherit; font-size: .875rem; font-weight: 600; color: var(--kds-fg-muted); cursor: pointer; }
.jview button[aria-pressed="true"] { background: var(--cc-navy); color: #fff; }
.jview button:focus-visible { outline: 2px solid var(--kds-focus-ring); outline-offset: -2px; }
.jsearch__map-toggle { display: none; gap: 6px; white-space: nowrap; }
html:not(.js) .jview, html:not(.js) .jsearch__map-toggle { display: none !important; }
/* full-bleed discovery canvas: no border, no radius, no card — the shared .jobs-explore background and the
   quiet stat note below carry the visual weight instead of a boxed rounded-rectangle widget. */
.jsearch__map { position: relative; min-width: 0; }
.jsearch__canvas { display: block; width: 100%; height: 360px; }
.jsearch__map-note { margin: 14px auto 0; padding-top: 0; }
/* a live count sitting on the map itself, not a caption underneath it — kept deliberately quiet (no border, no
   shadow, no pill) so it reads as a light label rather than dashboard chrome. Purely decorative (aria-hidden)
   — the real, JS-updated status line for screen readers is .jsearch__map-note below, untouched so
   jobs-search.js can keep rewriting its text on pin loads. */
.jsearch__map-stat { position: absolute; z-index: 5; top: 20px; left: 20px; margin: 0; padding: 8px 14px; background: color-mix(in srgb, #fff 88%, transparent); display: flex; align-items: baseline; gap: 8px; }
.jsearch__map-stat strong { font: 800 1.375rem/1 var(--cc-font-display); color: var(--cc-navy); }
.jsearch__map-stat span { font: 600 .6875rem/1.2 var(--kds-font-sans); text-transform: uppercase; letter-spacing: .04em; color: var(--kds-fg-muted); max-width: 8ch; }

/* phone: map section fills the viewport under the header when in Map mode; hidden entirely otherwise */
@media (max-width: 767px) {
  .js .jsearch.is-map .jobs-explore__head { display: none; }
  .js .jsearch.is-map .jobs-map-section { display: block; position: sticky; top: var(--cc-header-h); z-index: 40; padding: 0; }
  .js .jsearch.is-map .jsearch__canvas { height: calc(100dvh - var(--cc-header-h)); min-height: 360px; }
  .js .jsearch.is-map .jsearch__map-note { display: none; }
  .js .jsearch.is-map .jsearch__map-stat { display: none; }
  .js .jsearch.is-map .jobs-index { display: none; }
}

/* ---------- your next moves: an editorial directory, not a card grid — the second half of the same
   exploration surface as the map above it (same background, no seam), deliberately calmer than the map:
   a thin hairline instead of a bold rule, a smaller heading. ---------- */
.jobs-index { padding: var(--sp-7) 0 var(--sp-8); }
.jobs-index__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 24px; margin-bottom: var(--sp-5); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--kds-border); }
.jobs-index__head h3 { margin: 0; font-size: clamp(1.125rem, .5vw + 1rem, 1.375rem); }
.jobs-index__head h3 strong { color: var(--cc-red-700); }
.jsearch__sort { display: inline-flex; align-items: center; gap: 8px; }
.jsearch__sort .input { width: auto; min-width: 150px; }

.jsearch__list { display: grid; gap: 0; counter-reset: jrow; }
.jrow { counter-increment: jrow; position: relative; display: grid; gap: 10px; padding: var(--yf-job-row-padding, 28px 0); padding-left: 56px; border-bottom: 1px solid var(--yf-job-row-border, var(--cc-line-strong)); transition: background .15s, box-shadow .15s; }
.jrow::before { content: counter(jrow, decimal-leading-zero); position: absolute; left: 18px; top: 30px; font: 800 .9375rem/1 var(--cc-font-display); color: var(--yf-job-number-color, var(--cc-orange-700)); letter-spacing: .04em; }
.jrow:hover { background: var(--cc-navy-50); box-shadow: inset 4px 0 0 var(--cc-orange); }
.jrow.is-active { background: var(--cc-navy-100); box-shadow: inset 4px 0 0 var(--cc-navy); }
.jrow--ref { box-shadow: inset 4px 0 0 var(--cc-teal); }
.jrow--ref:hover { box-shadow: inset 4px 0 0 var(--cc-teal); }
.jrow__main { min-width: 0; display: grid; gap: 6px; }
.jrow__title { margin: 0; font: 800 var(--yf-job-title-size, 1.375rem)/1.25 var(--cc-font-display); letter-spacing: -0.01em; transition: transform .15s; }
.jrow:hover .jrow__title { transform: translateX(4px); }
.jrow__title a { color: var(--cc-navy); text-decoration: none; }
.jrow__title a::after { content: ""; position: absolute; inset: 0; }   /* whole row is the link target */
.jrow__title a:hover { color: var(--cc-red-700); }
.jrow__co { margin: 0; color: var(--kds-fg-muted); font-size: var(--yf-job-company-size, .9375rem); display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.jrow__company { color: var(--cc-ink); font-weight: 500; }
.jrow__sep { color: var(--kds-fg-faint); }
.jrow__more { font-size: .8125rem; white-space: nowrap; }
.jrow__dist { color: var(--cc-navy); font-weight: 700; font-size: .875rem; white-space: nowrap; }
/* plain dot-separated facts, not chip/badge pills — "PART-TIME · ON-SITE · HEALTHCARE", editorial not database */
.jrow__tags { margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; font: 600 var(--yf-job-meta-size, .8125rem)/1.5 var(--kds-font-sans); text-transform: uppercase; letter-spacing: .04em; color: var(--kds-fg-muted); }
.jrow__ref { color: #16606a; font-weight: 700; }
.jrow__side { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.jrow__salary { margin: 0; font: 800 1.0625rem/1.2 var(--cc-font-display); color: var(--cc-navy); }
.jrow__meta { margin: 0; font-size: var(--yf-job-meta-size, .8125rem); color: var(--kds-fg-faint); display: flex; flex-wrap: wrap; gap: 2px 6px; }
.jrow__pid { font-family: var(--kds-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-weight: 600; color: var(--kds-fg-muted); }
/* an explicit "Explore →" affordance, always visible (not hover-only — touch devices have no hover) — the
   whole row is still the click target (.jrow__title a::after), this just gives that a visible cue */
.jrow__explore { margin-top: 6px; font: 700 .8125rem/1 var(--cc-font-display); color: var(--cc-orange-700); transition: transform .15s; }
@media (prefers-reduced-motion: no-preference) {
  .jrow:hover .jrow__explore, .jrow:focus-within .jrow__explore { transform: translateX(4px); }
}
@media (min-width: 640px) {
  .jrow { grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 20px; }
  .jrow__side { flex-direction: column; align-items: flex-end; text-align: right; gap: 6px; max-width: 240px; }
  .jrow__meta { justify-content: flex-end; }
}

/* pagination + empty state */
.jpager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.jpager__pages { display: flex; gap: 4px; }
.jpager__num { display: inline-grid; place-items: center; min-width: 44px; height: 44px; border-radius: 6px; text-decoration: none; font-weight: 600; }
.jpager__num.is-current { background: var(--cc-navy); color: #fff; }
.jpager [aria-disabled="true"] { opacity: .45; pointer-events: none; }
.jsearch__empty h3 { margin-bottom: 6px; }
.jsearch__empty p { max-width: 48ch; margin: 0 auto 16px; }

/* ---------- tablet and up: horizontal bar mode (no sidebar at any width) ---------- */
@media (min-width: 768px) {
  .jobs-hero { padding-block: var(--sp-10); }
  .jsearch__open, .jsearch__kw-go { display: none; }
  .jsearch__kw-input { padding-right: 12px; }
  .jsearch__go { display: inline-flex; }
  /* the panel dissolves: its fields become grid items of the bar */
  .js .jsearch__panel, .js .jsearch__panel.is-open, .jsearch__panel, .jsearch__panel-body { display: contents; }
  .jsearch__panel-head, .jsearch__panel-foot { display: none !important; }
  .jsearch__form { grid-template-columns: repeat(6, minmax(0, 1fr)) auto; grid-template-areas: "kw kw kw near near near go" "refine refine refine refine refine refine refine" "radius radius cat cat prov prov more"; }
  .jsearch__kw { grid-area: kw; }
  .jsearch__near { grid-area: near; }
  .jsearch__refine-label { grid-area: refine; margin-top: 6px; }
  .jsearch__radius { grid-area: radius; }
  .jsearch__cat { grid-area: cat; }
  .jsearch__prov { grid-area: prov; }
  .jsearch__go { grid-area: go; align-self: end; }
  .jsearch__more-btn { grid-area: more; display: inline-flex; gap: 8px; white-space: nowrap; justify-self: stretch; align-self: end; }
  .jsearch__more-btn[aria-expanded="true"] { background: var(--cc-navy-50); border-color: var(--cc-navy); }
  .jsearch__more-btn[aria-expanded="true"] .jsearch__chev { transform: rotate(180deg); }
  .jsearch__near-status { grid-column: 1 / -1; }
  /* "More filters" popover, anchored to the bar's right edge */
  .jsearch__more { display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 650; width: min(640px, 100%); background: #fff; border: 1px solid var(--kds-border); border-radius: 8px; box-shadow: 0 16px 48px rgba(9, 43, 82, .16); padding: 20px; }
  .jsearch__more.is-open { display: block; }
  html:not(.js) .jsearch__more { display: block; position: static; box-shadow: none; grid-column: 1 / -1; width: auto; }
  .jsearch__more-grid { grid-template-columns: 1fr 1fr; gap: 16px 20px; }
  .jsearch__fullwidth { grid-column: 1 / -1; }
  .jsearch__more-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--kds-border); }
  .jview { display: none; }
  .jsearch__map-toggle { display: inline-flex; }
  .jsearch__canvas { height: 460px; }
  .js.jobs-map-on .jobs-map-section { display: block; }
}

@media (min-width: 1024px) {
  .jsearch__canvas { height: 560px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .jsearch__near-me span { display: none; }               /* icon-only "Near me" keeps the place field usable */
  .jsearch__near-me { width: 44px; padding: 0; justify-content: center; }
}

/* ---------- print ---------- */
@media print { .jsearch__form, .jobs-map-section, .jpager { display: none !important; } }
