/* Emerald Workforce Canada — layer on top of styles.css:
   hero live board, rota strips, top-pay marks, category colour,
   mobile carousel for urgent shifts, tighter apply page. */
:root {
  --rota-day: var(--primary);
  --rota-early: #2A9D8F;
  --rota-late: var(--accent-hover);
  --rota-night: var(--ink);
  --rota-long: #4C6FFF;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- hero: copy left, live board right ---------- */
.hero-split { padding-bottom: var(--s8); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: var(--s8); align-items: center; }
.hero-split h1 { text-align: left; font-size: clamp(2.4rem, 4.6vw, 3.6rem); margin-top: var(--s4); }
.hero-split .lead { text-align: left; margin-left: 0; max-width: 50ch; }
.hero-split .searchbar { margin-left: 0; margin-top: var(--s5); max-width: 560px; }
.city-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s4); }
.city-chips a { font-size: var(--fs-small); font-weight: 500; padding: 7px 13px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); color: var(--body); transition: border-color .18s, color .18s; }
.city-chips a:hover { border-color: var(--primary); color: var(--primary); }
.city-chips .chip-more { background: transparent; border-color: transparent; color: var(--primary); font-weight: 600; }
.hero-actions { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s5); }
.hero-actions .board-live { margin: 0; }

/* the live board: a quiet list on a white sheet, same grammar as the cards */
.liveboard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: var(--s5) var(--s5) var(--s4); }
.lb-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.lb-title { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.lb-live { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-cap); font-weight: 600; color: var(--success); text-transform: uppercase; letter-spacing: .08em; }
.lb-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
.lb-rows { display: flex; flex-direction: column; }
.lb-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: 13px 4px; border-bottom: 1px solid var(--border); color: inherit; transition: background .18s; }
.lb-row:hover { background: var(--surface-muted); }
.lb-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lb-role { font-weight: 600; font-size: 1rem; color: var(--ink); line-height: 1.3; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.lb-tag { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--primary-active); background: var(--primary-tint); padding: 2px 8px; border-radius: var(--r-pill); }
.lb-town { font-size: var(--fs-small); color: var(--muted); }
.lb-pay { flex: none; font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; color: var(--primary); font-variant-numeric: tabular-nums; }
.lb-pay small { font-family: var(--f-body); font-weight: 500; font-size: var(--fs-cap); color: var(--muted); margin-left: 2px; }
.lb-foot { display: block; padding-top: var(--s3); font-size: var(--fs-small); font-weight: 600; color: var(--primary); }
.lb-new { animation: lb-in .6s var(--ease) both; }
@keyframes lb-in { 0% { opacity: 0; transform: translateY(-10px); background: var(--primary-tint); } 40% { opacity: 1; transform: none; background: var(--primary-tint); } 100% { background: transparent; } }

/* ---------- rota strip (when you'd work) ---------- */
.rota { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 3px; margin-top: 8px; }
.rota-cells { display: flex; gap: 2px; }
.rota-cells i { display: block; width: 9px; height: 12px; border-radius: 2px; background: var(--surface-muted); font-style: normal; font-size: 9px; line-height: 12px; text-align: center; color: var(--muted); }
.rota-cells i.on { background: var(--rota-day); color: #fff; }
.rota-early .rota-cells i.on { background: var(--rota-early); }
.rota-late .rota-cells i.on { background: var(--rota-late); }
.rota-night .rota-cells i.on { background: var(--rota-night); }
.rota-long .rota-cells i.on { background: var(--rota-long); }
.rota b { font-weight: 500; font-size: 11.5px; letter-spacing: .02em; color: var(--muted); white-space: nowrap; }
.rota-lg { align-items: flex-start; margin: var(--s3) 0 var(--s2); }
.rota-lg .rota-cells { gap: 4px; }
.rota-lg .rota-cells i { width: 26px; height: 28px; line-height: 28px; font-size: 12px; font-weight: 600; border-radius: 6px; }
.rota-lg b { font-size: var(--fs-cap); }

/* ---------- top pay ---------- */
.jtoppay { font-family: var(--f-body); font-size: 11.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; color: var(--primary-active); background: var(--primary-tint); padding: 3px 9px; border-radius: var(--r-pill); }
.jtitle { flex-wrap: wrap; min-width: 0; row-gap: 4px; }
@media (max-width: 620px) { .jtop { flex-wrap: wrap; row-gap: 2px; } }
.jcard.is-top .jrate { color: var(--primary); }
.gchip-top { color: var(--primary); border-color: rgba(27,122,80,.35); }
.gchip-top.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- categories: colour per group, compact on phones ---------- */
.cat-tile { border-top: 3px solid hsl(var(--h), 46%, 62%); }
.cat-tile .cat-ic { width: 48px; height: 48px; color: hsl(var(--h), 42%, 34%); background: hsl(var(--h), 46%, 93%); }
.cat-more-wrap { display: none; text-align: center; margin-top: var(--s4); }

/* ---------- apply: form in the first screen ---------- */
body[data-page="apply"] .page-hero { padding-top: calc(var(--nav-h) + var(--s7)); padding-bottom: var(--s5); }
body[data-page="apply"] .page-hero h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s6); }
  .liveboard { max-width: 560px; }
  .lb-rows .lb-row:nth-child(n+5) { display: none; }
}
@media (max-width: 720px) {
  .rota b { font-size: 12px; }
  .jtoppay { font-size: 12px; }
}
@media (max-width: 620px) {
  .cat-grid { grid-template-columns: 1fr 1fr; gap: var(--s2); }
  .cat-tile { padding: var(--s4); }
  .cat-grid:not(.open) .cat-tile:nth-child(n+7) { display: none; }
  .cat-more-wrap { display: block; }
  #urgentStrip { display: flex; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; gap: var(--s3); padding: 4px 2px var(--s3); scrollbar-width: none; }
  #urgentStrip::-webkit-scrollbar { display: none; }
  #urgentStrip .ucard { flex: 0 0 86%; scroll-snap-align: start; }
  .liveboard { padding: var(--s4); }
}
@media (prefers-reduced-motion: reduce) {
  .lb-new { animation: none; }
  .lb-live i { animation: none; }
}

/* ---------- inspector pass: contrast, weights, scale, targets ---------- */
:root {
  --muted: #5B6A62;          /* was #64726A: 4.4:1 on white → 5.1:1 */
  --accent-ink: #9A6412;     /* amber for TEXT on light surfaces (5.0:1); --accent stays for fills */
}
.nav-links a.nav-urgent, .home-badge, .kicker-urgent, .urgent-meta, .uboost { color: var(--accent-ink); }
.uboost { background: rgba(154,100,18,.12); }
.ubadge, .jnew { background: var(--accent-ink); }
.jnew { font-size: 11.5px; }
.lb-live { color: var(--primary); }
.sd-step.is-final > span:last-child { color: var(--d-bg); }
/* only 400/500/600/700 Inter and 600/700 Bricolage are loaded — never ask for other weights */
b, strong { font-weight: 700; }   /* "bolder" from a 600 parent would resolve to an unloaded 900 */
.fp-label b { font-weight: 700; font-size: 12px; }
.ao-badge, .cg-title { font-weight: 700; }
.ao-day span { font-size: 12px; }
.opt { font-family: var(--f-body); font-weight: 400; }
/* one size for every price */
.jrate, .urate, .lb-pay { font-size: 1.25rem; }
.lb-title { font-size: 1.12rem; }
.rota b, .jtoppay { letter-spacing: 0; }
/* readable measure in long-form pages */
.prose p, .prose li, .prose-block p, .prose-block li { max-width: 74ch; }
@media (max-width: 720px) {
  .city-chips a { min-height: 44px; display: inline-flex; align-items: center; }
  .gchip { min-height: 44px; }
}

/* footer headings moved from h4/h5 to h3/h4 (no skipped levels); keep the base look */
.footer h3 { color: var(--d-ink); font-size: var(--fs-small); margin-bottom: var(--s4); font-family: var(--f-body); font-weight: 600; letter-spacing: 0; }
.footer-legal h4 { margin: 0 0 6px; font-size: var(--fs-cap); text-transform: uppercase; letter-spacing: .06em; color: var(--d-muted); font-weight: 700; font-family: var(--f-body); }

/* ---------- candidate features: near you, calculator, saved, FAQ, draft ---------- */
.near-count { color: var(--muted); font-size: var(--fs-small); margin-top: 4px; }
.near-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.near-input { min-height: 44px; min-width: 220px; padding: 10px 16px; border-radius: var(--r-pill); border: 1.5px solid var(--border); background: var(--surface); font-size: var(--fs-small); font-family: inherit; color: var(--ink); }
.near-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.near-input.is-miss { border-color: var(--danger); }
.near-input.is-miss::placeholder { color: var(--danger); }
.near-empty { padding: var(--s5); border: 1px dashed var(--border-strong); border-radius: var(--r-md); color: var(--muted); text-align: center; }
.near-empty p { max-width: 52ch; margin: 0 auto; }
.near-more { margin-top: var(--s5); }
.city-chips a.is-mine { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }

.calc { background: var(--d-bg); color: var(--d-body); border-radius: var(--r-lg); padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--s7); align-items: start; }
.calc-head .kicker { color: var(--d-accent); }
.calc-head h2 { color: var(--d-ink); font-size: var(--fs-h2); margin-top: 6px; }
.calc-head p { color: var(--d-muted); margin-top: var(--s3); font-size: var(--fs-lead); line-height: 1.5; max-width: 34ch; }
.calc-controls { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.calc-controls .field span { display: block; font-size: var(--fs-small); font-weight: 600; color: var(--d-ink); margin-bottom: 8px; }
.calc-controls .field b { color: var(--d-accent); font-family: var(--f-display); }
.calc-controls select { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--d-surface); color: var(--d-ink); border: 1px solid var(--d-border); font-family: inherit; font-size: var(--fs-small); }
.calc-hours input[type=range] { width: 100%; margin: 14px 0 0; accent-color: var(--d-primary); }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s5); }
.calc-out > div { background: var(--d-surface); border: 1px solid var(--d-border); border-radius: var(--r-md); padding: var(--s4); }
.calc-out span { display: block; font-size: var(--fs-cap); color: var(--d-muted); margin-bottom: 4px; }
.calc-out b { font-family: var(--f-display); font-size: 1.5rem; color: var(--d-ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.calc-out .is-net { background: var(--d-primary); border-color: var(--d-primary); }
.calc-out .is-net span, .calc-out .is-net b { color: var(--d-bg); }
.calc-note { margin-top: var(--s4); font-size: var(--fs-cap); color: var(--d-muted); line-height: 1.5; }
.calc-note span { color: var(--d-body); }

.jside { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.jsave { width: 32px; height: 32px; margin: -6px -6px -6px 0; border-radius: 50%; display: grid; place-items: center; color: var(--muted); cursor: pointer; transition: color .18s, background .18s; }
.jsave svg { width: 20px; height: 20px; }
.jsave:hover { color: var(--danger); background: var(--surface-muted); }
.jsave.on { color: var(--danger); }
.jsave.on svg { fill: currentColor; }
.jsave.pop { animation: heart-pop .35s var(--ease); }
@keyframes heart-pop { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
.nav-saved { display: inline-flex; align-items: center; gap: 5px; margin-right: var(--s3); color: var(--danger); font-weight: 600; font-size: var(--fs-small); }
.nav-saved svg { width: 18px; height: 18px; }
.gchip-saved svg { display: inline-block; width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.nav-saved svg { display: inline-block; }
.ew-toast a { color: var(--d-primary); margin-left: 8px; font-weight: 600; }

.side-net { margin: var(--s3) 0 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--primary-tint); color: var(--primary-active); font-size: var(--fs-small); font-weight: 500; }
.side-net b { font-family: var(--f-display); font-size: 1.15rem; margin-right: 4px; }
.side-net span { display: block; font-weight: 400; font-size: var(--fs-cap); color: var(--primary); margin-top: 2px; }
.next-steps { counter-reset: step; display: grid; gap: var(--s3); list-style: none; padding: 0; margin: 0; }
.next-steps li { position: relative; padding-left: 44px; }
.next-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-family: var(--f-display); font-weight: 700; display: grid; place-items: center; font-size: .95rem; }
.next-steps b { display: block; color: var(--ink); }
.next-steps span { color: var(--body); font-size: var(--fs-small); }

.faq { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: 18px 4px; font-family: var(--f-display); font-weight: 600; font-size: 1.12rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg); transition: transform .25s var(--ease); margin-right: 6px; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .faq-a { padding: 0 4px 20px; color: var(--body); max-width: 68ch; }
.faq details[open] .faq-a { animation: faq-in .3s var(--ease); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.draft-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); padding: 14px 18px; border-radius: var(--r-md); background: var(--primary-tint); border: 1px solid rgba(27,122,80,.25); color: var(--primary-active); font-size: var(--fs-small); font-weight: 500; }
.draft-actions { display: flex; gap: 8px; }

@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; gap: var(--s5); }
}
@media (max-width: 620px) {
  .near-tools { width: 100%; }
  .near-input { flex: 1; min-width: 0; }
  .calc-controls { grid-template-columns: 1fr; }
  .calc-out { grid-template-columns: 1fr 1fr; gap: var(--s2); }
  .calc-out b { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .jsave.pop { animation: none; }
  .faq details[open] .faq-a { animation: none; }
}
