/* rpigroup.ca public site: design tokens and components. */
:root {
  --navy-900: #141b42;
  --navy-800: #1e2859;
  --navy-700: #2b3775;
  --brand-400: #6a7ebd;
  --brand-100: #e8ecf7;
  --brand-50: #f4f6fb;
  --ink: #1d2433;
  --ink-2: #4a5468;
  --ink-3: #7a8396;
  --line: #e3e7ef;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --ok: #1f8f5f;
  --warn: #b26a00;
  --danger: #c0392b;

  --pharmacy: #1aa3b8;
  --physicians: #3f9a72;
  --nurses: #8a4a9c;
  --psw: #9a9a16;
  --devices: #cf4b45;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 2px rgba(20, 27, 66, .06), 0 2px 8px rgba(20, 27, 66, .06);
  --shadow-2: 0 8px 30px rgba(20, 27, 66, .12);
  --wrap: 1200px;
  --font-head: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 var(--font-body); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy-800); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--ink-2); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.eyebrow { font: 700 .78rem/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--brand-400); margin-bottom: 12px; display: block; }
.muted { color: var(--ink-3); }
.section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-head p { max-width: 560px; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; font: 600 .95rem/1 var(--font-head); border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s, box-shadow .15s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--navy-800); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }
.btn-accent { background: var(--brand-400); color: #fff; }
.btn-accent:hover { background: #5a6eae; }
.btn-ghost { background: transparent; color: var(--navy-800); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand-400); color: var(--navy-700); }
.btn-white { background: #fff; color: var(--navy-800); }
.btn-sm { height: 36px; padding: 0 14px; font-size: .85rem; }
.btn-block { width: 100%; }

/* Top bar and header */
.topbar { background: var(--navy-900); color: #c9d0ea; font-size: .82rem; }
.topbar .wrap { max-width: 1340px; display: flex; justify-content: space-between; align-items: center; height: 36px; }
.topbar a { color: #c9d0ea; }
.topbar .contact { display: flex; gap: 20px; }
.topbar .social { display: flex; gap: 14px; }
.icon { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; fill: currentColor; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { max-width: 1340px; display: flex; align-items: center; height: 76px; gap: 28px; }
.brand { flex: none; }
.brand img { height: 34px; width: auto; }
.main-nav { display: flex; gap: 2px; margin-left: auto; }
.main-nav a { padding: 10px 12px; border-radius: 8px; font: 600 .86rem/1 var(--font-head); color: var(--ink-2); white-space: nowrap; }
.main-nav a:hover { color: var(--navy-800); background: var(--brand-50); text-decoration: none; }
.main-nav a.active { color: var(--navy-800); box-shadow: inset 0 -2px 0 var(--brand-400); border-radius: 0; }
.header-actions { display: flex; gap: 10px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; width: 44px; height: 44px; }

/* Hero */
.hero { position: relative; color: #fff; overflow: hidden; background: linear-gradient(120deg, var(--navy-900) 0%, var(--navy-800) 60%, var(--navy-700) 100%); }
.hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 58%; background-position: center 20%; background-size: cover; background-repeat: no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%); mask-image: linear-gradient(90deg, transparent 0%, #000 38%); }
.hero .wrap { z-index: 1; }
.hero .wrap { position: relative; padding: 88px 24px 120px; }
.hero h1 { color: #fff; max-width: 720px; }
.hero p.lead { color: #d6dcf1; font-size: 1.15rem; max-width: 600px; }
.hero .eyebrow { color: #a9b6e6; }
.hero-sector { --hero-img: none; }
/* Banner of every content page: navy band, photo on the right, crumbs and the page title. */
.hero-page .wrap { padding-bottom: 88px; }
.hero .crumbs, .hero .crumbs a { color: #a9b6e6; }
.hero h1:last-child { margin-bottom: 0; }
.hero-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; }
.hero-row h1 { margin: 0; }
.hero-search { flex: 0 1 360px; }
.hero-search input { height: 48px; border-color: transparent; }

.search-card { margin-top: 32px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-2); padding: 10px; display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 8px; max-width: 880px; }
.search-card .field { display: flex; flex-direction: column; padding: 8px 14px; border-radius: 10px; }
.search-card .field + .field { border-left: 1px solid var(--line); border-radius: 0; }
.search-card label { font: 700 .7rem/1 var(--font-head); color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.search-card input, .search-card select { border: 0; outline: 0; font: 500 1rem var(--font-body); color: var(--ink); background: transparent; padding: 0; }
.search-card .btn { height: 56px; border-radius: 12px; padding: 0 28px; }
.hero-stats { display: flex; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats b { display: block; font: 800 1.8rem/1 var(--font-head); color: #fff; }
.hero-stats span { font-size: .85rem; color: #b9c2e4; }

/* Sector cards */
.sectors { margin-top: -72px; position: relative; z-index: 2; }
.sector-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.sector-card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; border-radius: var(--radius); overflow: hidden; color: #fff; background: var(--c); box-shadow: var(--shadow-1); transition: transform .2s, box-shadow .2s; }
.sector-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); text-decoration: none; }
.sector-card img { position: absolute; right: -8px; bottom: 0; height: 88%; width: auto; object-fit: contain; }
.sector-card .body { position: relative; padding: 18px; background: linear-gradient(0deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0)); }
.sector-card h3 { color: #fff; font-size: 1.05rem; margin: 0 0 4px; letter-spacing: .04em; text-transform: uppercase; }
.sector-card .count { font-size: .82rem; opacity: .92; }
.sector-card .tag { position: absolute; top: 16px; left: 16px; font: 700 .72rem/1 var(--font-head); padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .22); }

/* Job cards and tables */
.job-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.job-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .15s, box-shadow .15s; }
.job-card:hover { border-color: var(--brand-400); box-shadow: var(--shadow-1); text-decoration: none; }
.job-card h3 { margin: 0; font-size: 1.05rem; }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .88rem; color: var(--ink-2); }
.job-meta span { display: inline-flex; align-items: center; gap: 6px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font: 600 .75rem/1 var(--font-head); background: var(--brand-50); color: var(--navy-700); }
.chip-pharmacy { background: #e3f5f8; color: #0d6f7e; }
.chip-physicians { background: #e5f3ec; color: #24694a; }
.chip-nurses { background: #f3e9f6; color: #6a3478; }
.chip-psw { background: #f3f3d9; color: #63630c; }
.chip-devices { background: #fbe7e6; color: #9b2f2a; }
.chip-ft { background: #e8ecf7; color: var(--navy-700); }
.chip-relief { background: #fff3dc; color: #8a5300; }
.job-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .85rem; color: var(--ink-3); }
.pay { font: 700 1rem var(--font-head); color: var(--navy-800); }

.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; font: 700 .74rem/1 var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); background: var(--bg-soft); padding: 14px 16px; border-bottom: 1px solid var(--line); }
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #fafbfe; }
table.data td.num { font-variant-numeric: tabular-nums; }
/* Short values stay on one line; the position and pay columns take the remaining width and wrap. */
table.data th { white-space: nowrap; }
table.data td.c-sel, table.data td.c-date, table.data td.c-city, table.data td.c-prov, table.data td.c-shift, table.data td.c-rate,
table.data td.c-split, table.data td.c-type, table.data td.c-posted, table.data td.c-link { white-space: nowrap; }
table.data.ft td.c-title { width: 30%; min-width: 180px; }
table.data.ft td.c-pay { width: 26%; min-width: 150px; }
table.data td.c-link, table.data td.c-sel { width: 1%; }
@media (max-width: 1200px) { table.data td.c-prov { white-space: normal; } }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 12px 16px; font: 600 .9rem/1 var(--font-head); color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--navy-800); border-color: var(--navy-800); }
.tabs a:hover { text-decoration: none; color: var(--navy-800); }
.tabs .count { margin-left: 6px; font-size: .75rem; color: var(--ink-3); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; font-size: .88rem; color: var(--ink-3); border-top: 1px solid var(--line); background: #fff; }
.pager nav { display: flex; gap: 4px; }
.pager nav a, .pager nav span { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; }
.pager nav a:hover { border-color: var(--brand-400); text-decoration: none; }
.pager nav .cur { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.pager nav .gap { border: 0; }

/* Content blocks */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.media-frame { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-2); aspect-ratio: 4 / 3; background: var(--brand-100); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.feature-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.feature-list li { display: flex; gap: 12px; color: var(--ink-2); }
.feature-list li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--brand-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231e2859' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat; }

.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.stat b { display: block; font: 800 2rem/1.1 var(--font-head); color: var(--navy-800); font-variant-numeric: tabular-nums; }
.stat span { font-size: .88rem; color: var(--ink-3); }

.logo-wall { display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.logo-wall div { background: var(--navy-800); display: flex; align-items: center; justify-content: center; padding: 18px 12px; min-height: 84px; }
.logo-wall img { max-height: 40px; width: auto; opacity: .92; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card-plain h3 { margin-top: 12px; }
.icon-badge { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-100); color: var(--navy-800); }
.icon-badge svg { width: 22px; height: 22px; fill: currentColor; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* Blog */
.post-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); transition: box-shadow .15s; }
.post-card:hover { box-shadow: var(--shadow-1); text-decoration: none; }
.post-card .thumb { aspect-ratio: 16 / 9; background: var(--brand-100); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.post-card h3 { margin: 0; font-size: 1.08rem; line-height: 1.35; }
.post-card .meta { font-size: .8rem; color: var(--ink-3); }
.post-card p { margin: 0; font-size: .92rem; }
.post-feature { display: grid; grid-template-columns: 1.25fr 1fr; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.post-feature .thumb { min-height: 320px; background: var(--brand-100); }
.post-feature .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-feature .body { padding: 36px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.article { max-width: 760px; margin: 0 auto; }
.article .lead { font-size: 1.15rem; color: var(--ink-2); }
.article p, .article li { font-size: 1.05rem; line-height: 1.75; color: #2f3747; }
.article h2 { font-size: 1.5rem; margin-top: 1.6em; }
.article figure { margin: 32px 0; }
.article figure img { border-radius: 14px; }
.article figcaption { font-size: .85rem; color: var(--ink-3); margin-top: 8px; }
/* Blog post: article on the left, other posts in a column on the right; one column on narrow screens. */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; }
.article-layout .article { max-width: none; margin: 0; }
.article-aside { display: flex; flex-direction: column; gap: 16px; }
.article-aside h2 { font-size: 1.1rem; margin: 6px 0 2px; }
.aside-post { display: flex; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s; }
.aside-post:hover { border-color: var(--brand-100); box-shadow: var(--shadow-1); text-decoration: none; }
.aside-post .thumb { flex: none; width: 104px; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--brand-100); }
.aside-post .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aside-post .text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.aside-post .meta { font-size: .76rem; color: var(--ink-3); }
.aside-post b { font: 600 .86rem/1.45 var(--font-head); color: var(--navy-800); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aside-all { align-self: flex-start; margin-top: 4px; }
@media (max-width: 980px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
.callout { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 24px; border-radius: var(--radius); background: var(--brand-50); border: 1px solid var(--brand-100); margin: 36px 0; }
.callout p { margin: 0; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.f label { display: block; font: 600 .85rem/1.2 var(--font-head); color: var(--ink); margin-bottom: 6px; }
.f input, .f select, .f textarea { width: 100%; height: 44px; padding: 0 14px; border: 1px solid #cfd5e2; border-radius: 10px; font: 400 .95rem var(--font-body); color: var(--ink); background: #fff; }
.f textarea { height: 120px; padding: 12px 14px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { outline: 3px solid rgba(106, 126, 189, .25); border-color: var(--brand-400); }
.f .hint { font-size: .8rem; color: var(--ink-3); margin-top: 6px; }
.f .err { font-size: .8rem; color: var(--danger); margin-top: 6px; }
.f.invalid input { border-color: var(--danger); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.checkbox input { width: 18px; height: 18px; margin-top: 2px; }

/* Filters */
.layout-sidebar { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.filters { position: sticky; top: 96px; display: grid; gap: 22px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.filters h4 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.filters .opt { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: .92rem; color: var(--ink-2); }
.filters .opt label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.filters .opt small { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.result-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.result-bar .active-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.result-bar .active-filters .chip::after { content: "×"; margin-left: 6px; opacity: .6; }

/* Job detail */
.crumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: 18px; }
.crumbs a { color: var(--ink-3); }
.job-head { padding: 40px 0 32px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.job-head h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.job-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 24px; }
.job-facts div { background: #fff; padding: 16px 18px; }
.job-facts small { display: block; font: 700 .7rem/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.job-facts b { font: 700 1rem var(--font-head); color: var(--navy-800); }
.apply-box { position: sticky; top: 96px; display: grid; gap: 14px; }
.contact-person { display: flex; gap: 14px; align-items: center; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-100); color: var(--navy-800); display: flex; align-items: center; justify-content: center; font: 700 1rem var(--font-head); flex: none; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--navy-800), var(--navy-700)); color: #fff; border-radius: 20px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.cta-band h2 { color: #fff; margin: 0 0 8px; }
.cta-band p { color: #ccd3ee; margin: 0; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Footer */
.site-footer { background: var(--navy-900); color: #b9c2e4; padding: 64px 0 28px; margin-top: 80px; font-size: .92rem; }
.site-footer a { color: #dfe4f6; }
.site-footer p { color: #b9c2e4; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer .legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.site-footer .legal { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 48px; padding-top: 22px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: .82rem; color: #8f99c2; }
.footer-logo { height: 30px; width: auto; margin-bottom: 16px; filter: brightness(0) invert(1); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(13, 18, 45, .55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { width: 100%; max-width: 440px; background: #fff; border-radius: 20px; box-shadow: 0 24px 64px rgba(13, 18, 45, .3); padding: 40px 36px 32px; }
/* Every dialog opens with the same centred head: icon, title, at most one line. */
.modal-head { text-align: center; margin-bottom: 24px; }
.modal-head h2 { font-size: 1.5rem; margin: 0; }
.modal-head p { margin: 8px 0 0; color: var(--ink-2); font-size: .95rem; }
.modal-head .modal-message { margin: 0; color: var(--ink); font-size: 1rem; }
.modal-head b { white-space: nowrap; }
.modal-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: var(--brand-100); color: var(--navy-800); margin-bottom: 16px; }
.modal-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.modal-icon-brand { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.modal-icon img { width: 30px; height: 30px; }
.steps { display: flex; gap: 6px; margin: 16px 0 22px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--navy-800); }
.code-inputs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.code-inputs input { width: 100%; min-width: 0; height: 52px; text-align: center; font: 700 1.3rem var(--font-head); border: 1px solid #cfd5e2; border-radius: 10px; }

/* Responsive */
/* The six menu entries and both account buttons need about 1060px. Below that only Log in stays
   (the login dialog links to sign-up) and the header tightens, so the full menu shows down to 860px. */
@media (max-width: 1080px) {
  .header-actions .btn-signup { display: none; }
  .header-actions [data-login] { background: var(--navy-800); color: #fff; border-color: transparent; }
  .site-header .wrap { gap: 16px; }
  .main-nav a { padding: 10px 8px; }
  .brand img { height: 28px; width: auto; }
}
@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .header-actions { margin-left: auto; }
  .nav-toggle { margin-left: 0; flex: none; }
  .brand { display: flex; align-items: center; min-height: 44px; }
}
@media (max-width: 1100px) {
  .sector-grid { grid-template-columns: repeat(3, 1fr); }
  .logo-wall { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .site-header .wrap { gap: 12px; height: 64px; }
  .topbar .social { display: none; }
  .search-card { grid-template-columns: 1fr; }
  .search-card .field + .field { border-left: 0; border-top: 1px solid var(--line); }
  .split, .layout-sidebar, .post-feature, .grid-2 { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .job-grid, .grid-3 { grid-template-columns: 1fr; }
  .stat-band, .job-facts { grid-template-columns: 1fr 1fr; }
  .sector-grid { grid-template-columns: 1fr 1fr; }
  .sector-card { min-height: 200px; }
  .hero-photo { width: 100%; opacity: .22; -webkit-mask-image: none; mask-image: none; }
  .filters { position: static; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 32px; }
  .section { padding: 56px 0; }
  .hero .wrap { padding: 56px 24px 104px; }
  .hero-page .wrap { padding-bottom: 56px; }
  .form-grid { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .apply-box { position: static; }
  table.data .hide-sm { display: none; }
  table.data.ft td.c-title { width: 50%; }
}
@media (max-width: 560px) {
  .topbar .contact span:last-child { display: none; }
  .brand img { height: 28px; }
  .header-actions .btn { height: 38px; padding: 0 14px; font-size: .82rem; }
  .logo-wall div { padding: 12px 6px; min-height: 64px; }
  .logo-wall img { max-width: 100%; height: auto; max-height: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: start; }
  .pager { flex-direction: column; }
  .topbar a { display: inline-flex; align-items: center; min-height: 36px; }
  .crumbs a { display: inline-block; padding: 8px 0; }
  .pager > a { display: inline-flex; align-items: center; min-height: 40px; }
  .search-card input, .search-card select { min-height: 32px; }
  /* iOS zooms into fields whose text is under 16px. */
  .f input, .f select, .f textarea { font-size: 16px; }
}
@media (max-width: 380px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .site-header .wrap { gap: 8px; }
  .brand img { height: 24px; }
  .header-actions .btn { padding: 0 10px; }
}

/* Job tables as cards on phones: the c-* cells of each row are placed on a small grid. */
@media (max-width: 640px) {
  .table-wrap { border-radius: var(--radius); }
  table.data.stack, table.data.stack tbody { display: block; }
  table.data.stack thead { display: none; }
  table.data.stack tr { display: grid; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: center; }
  table.data.stack tr:last-child { border-bottom: 0; }
  table.data.stack td { display: block; padding: 0; border: 0; background: none !important; width: auto !important; min-width: 0 !important; }
  table.data.stack td.c-city { white-space: normal; }
  table.data.stack td:empty { display: none; }
  table.data.stack td.hide-sm { display: none; }
  table.data.relief tr { grid-template-columns: 1fr auto; grid-template-areas: "date rate" "city split" "shift link"; }
  table.data.relief.selectable tr { grid-template-columns: 28px 1fr auto; grid-template-areas: "sel date rate" "sel city split" "sel shift link"; }
  table.data.relief .c-sel { grid-area: sel; }
  table.data.relief .c-sel input { width: 20px; height: 20px; }
  table.data.relief .c-date { grid-area: date; font-weight: 700; color: var(--navy-800); }
  table.data.relief .c-city { grid-area: city; }
  table.data.relief .c-shift { grid-area: shift; color: var(--ink-3); font-size: .88rem; }
  table.data.relief .c-rate { grid-area: rate; font-weight: 700; text-align: right; }
  table.data.relief .c-split { grid-area: split; text-align: right; color: var(--ink-3); font-size: .88rem; }
  table.data.relief .c-link { grid-area: link; text-align: right; }
  table.data.ft tr { grid-template-columns: 1fr auto; grid-template-areas: "title title" "city posted" "pay type"; }
  table.data.ft .c-title { grid-area: title; font-weight: 700; }
  table.data.ft .c-city { grid-area: city; }
  table.data.ft .c-posted { grid-area: posted; text-align: right; color: var(--ink-3); font-size: .88rem; }
  table.data.ft td.c-pay { grid-area: pay; display: block; font-weight: 600; }
  table.data.ft td.c-type { grid-area: type; display: block; text-align: right; color: var(--ink-3); font-size: .88rem; }
  table.data.ft .c-link { display: none; }
  table.data.stack td.c-pay:empty, table.data.stack td.c-type:empty { display: none; }
  table.data.stack .c-link a, table.data.ft .c-title a { display: inline-block; padding: 6px 0; }
  .apply-bar { flex-direction: column; align-items: stretch; text-align: center; }
}

/* Site behaviour */
[hidden] { display: none !important; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 200; background: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; }
.mobile-nav a { display: block; padding: 14px 24px; font: 600 .95rem/1 var(--font-head); color: var(--ink); border-bottom: 1px solid var(--line); }
.mobile-nav a.active { color: var(--navy-800); box-shadow: inset 3px 0 0 var(--brand-400); }
.site-header.open .mobile-nav { display: block; }
.page-head { padding: 48px 0 32px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 8px; }
.page-head p { margin: 0; max-width: 720px; }
.prose { color: var(--ink-2); }
.prose p, .prose li { color: var(--ink-2); line-height: 1.7; }
.prose h2, .prose h3 { margin-top: 1.4em; }
.empty { padding: 40px 16px; text-align: center; color: var(--ink-3); }
.notice { padding: 12px 16px; border-radius: 10px; font-size: .92rem; margin: 0 0 14px; }
.notice-error { background: #fdecea; color: #8e2a20; }
.notice-ok { background: #e6f4ed; color: #17643f; }
.filters-bar { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 20px; }
.select-col { width: 36px; }
.list-title { font-size: 1.25rem; margin: 32px 0 12px; display: flex; align-items: baseline; gap: 10px; scroll-margin-top: 90px; }
.list-title span { font: 600 .9rem var(--font-body); color: var(--ink-3); }
.apply-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); background: var(--bg-soft); font-size: .9rem; }
.facts-list { display: grid; grid-template-columns: 180px 1fr; gap: 10px 20px; margin: 0; }
.facts-list dt { font: 700 .74rem/1.6 var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.facts-list dd { margin: 0; color: var(--ink); }
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }

/* Dialogs */
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal .close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; font-size: 1.5rem; line-height: 1; color: var(--ink-3); cursor: pointer; }
.modal .close:hover { background: var(--bg-soft); color: var(--ink); }
.modal form { display: grid; gap: 16px; }
.modal .f input { height: 50px; }
.modal .label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.modal .label-row label { margin: 0; }
.modal .label-row a { font-size: .85rem; }
.btn-lg { height: 52px; font-size: 1rem; }
.modal .row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .9rem; }
.modal .links { display: grid; justify-items: center; gap: 6px; font-size: .9rem; text-align: center; }
.modal .notice { margin: 0; }
.modal .links .wait { color: var(--ink-3); }
.modal .divider { border-top: 1px solid var(--line); margin: 8px 0 0; padding-top: 20px; text-align: center; font-size: .92rem; color: var(--ink-3); }
@media (max-width: 560px) {
  .modal { padding: 36px 22px 24px; }
  .modal-head h2 { font-size: 1.35rem; }
}
}
.code-inputs.error input { border-color: var(--danger); }
.btn[disabled] { opacity: .6; cursor: progress; }
/* While a request runs: a spinner before the label, the button stays readable. */
.btn.is-busy { opacity: .85; }
.btn.is-busy::before { content: ""; width: 16px; height: 16px; flex: none; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
a.is-busy { pointer-events: none; opacity: .6; cursor: progress; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-busy::before { animation-duration: 2s; } }

@media (max-width: 900px) {
  .filters-bar { grid-template-columns: 1fr 1fr; }
  .filters-bar .full { grid-column: 1 / -1; }
  .detail-grid { grid-template-columns: 1fr; }
  .facts-list { grid-template-columns: 1fr; gap: 2px; }
  .facts-list dd { margin-bottom: 10px; }
}
@media print {
  .topbar, .site-header, .site-footer, .apply-box, .modal-backdrop { display: none !important; }
}

/* Sign-up */
.signup-wrap { max-width: 760px; }
.signup [hidden] { display: none; }
.signup-steps { margin: 0 0 24px; padding-left: 20px; color: var(--ink-2); display: grid; gap: 6px; }
.signup-help { margin: 18px 0 0; font-size: .9rem; color: var(--ink-3); }
.signup-title { font-size: 1.3rem; margin: 0 0 18px; }
.signup-disclaimer { font-size: .82rem; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 14px; }
.signup-disclaimer h3 { font-size: .85rem; margin: 0 0 4px; color: var(--ink-2); }
.signup-disclaimer p { margin: 0; }
.signup-captcha { margin: 22px 0 0; min-height: 78px; }
.signup-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.signup-actions .btn { min-width: 140px; }
.f input[readonly] { background: var(--bg-soft); color: var(--ink-2); }
@media (max-width: 640px) {
  .signup .card { padding: 18px; }
  .signup-actions .btn { flex: 1; min-width: 0; }
}
@media (max-width: 360px) {
  .signup-captcha { transform: scale(.88); transform-origin: 0 0; }
}

/* Single-card pages (unsubscribe, reply) */
.narrow-card { max-width: 640px; }
.center-card { text-align: center; }
.card-title { font-size: 1.5rem; margin: 0 0 12px; }
.card-icon { display: block; margin: 0 auto 16px; }
.card-actions { display: flex; justify-content: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.card-actions .btn { min-width: 120px; }
.reply-form { display: grid; gap: 16px; }
.reply-topic { padding: 12px 14px; border-radius: 10px; background: var(--brand-50); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.list-more { margin: 20px 0 0; }
.reply-form textarea { height: 240px; }

/* Scrollbars: thin, in the site's colours, instead of the browser's default. */
html { scrollbar-width: thin; scrollbar-color: #9aa6d0 #eef1f8; }
* { scrollbar-width: thin; scrollbar-color: #9aa6d0 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #eef1f8; }
::-webkit-scrollbar-thumb { background: #9aa6d0; border-radius: 999px; border: 2px solid #eef1f8; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-400); }
::-webkit-scrollbar-corner { background: transparent; }
