/* ============================================================
   rnjobsnearme design system
   Identity: Outfit (geometric sans) everywhere - body at 400, headings at
   700, UI accents at 500/600 - a single-family, weight-delineated system; deep teal
   as the single brand hue; terracotta reserved for the one action
   that matters (Apply). Warm paper background, not hospital white.
   All contrast pairs meet WCAG AA (checked values in comments).
   ============================================================ */

@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  /* -- color tokens -------------------------------------------- */
  --bg: #faf9f6;          /* warm paper */
  --surface: #ffffff;
  --ink: #172428;         /* petrol black; 15.6:1 on --bg */
  --muted: #566970;       /* 5.4:1 on --bg (AA normal text) */
  --line: #e5e2da;
  --brand: #0c6560;       /* deep teal; 6.2:1 on --bg, white-on 7.0:1 */
  --brand-deep: #094a46;
  --brand-tint: #e6f1ef;  /* badge bg; --brand-deep on it 8.2:1 */
  --cta: #8e3b60;         /* berry; white-on 7.1:1 (AA) */
  --cta-deep: #762f4f;
  --band: #094a46;          /* hero/footer band */
  --band-deep: #0d3d3a;
  --on-band: #f6f4ee;       /* 11.2:1 on --band */
  --on-band-muted: #bcd8d4; /* 5.6:1 on --band */
  --on-band-accent: #f2a9c4;/* berry-pink highlight; 5.4:1 on --band */

  /* footer link tones, measured against --band #094a46:
     link 8.20:1, hover 9.18:1, count 6.32:1, header 5.13:1 — all AA, links AAA */
  --foot-link: #dbebe8;
  --foot-link-hover: #ffffff;
  --foot-count: #b8d2ce;
  --foot-head: #93c2bb;
  --foot-rule: rgba(219, 235, 232, 0.22);

  --chip-bg: #f0eee8;
  --chip-ink: #454f54;    /* 6.1:1 on --chip-bg */

  /* -- type tokens --------------------------------------------- */
  --font-display: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  /* -- weight hierarchy: headings clearly heavier than body ----- */
  --w-body: 400;
  --w-medium: 500;
  --w-semibold: 600;
  --w-heading: 700;

  --radius: 8px;
  --shadow: 0 1px 2px rgba(23, 36, 40, 0.06), 0 4px 12px rgba(23, 36, 40, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--w-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

/* -- accessibility ---------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--surface);
  color: var(--brand-deep);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 2px;
}

/* -- layout ----------------------------------------------------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 1rem;
}
.site-header .inner {
  max-width: 62rem;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: var(--w-heading);
  font-size: 1.2rem;
  color: var(--brand-deep);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--brand-deep); }

main { max-width: 62rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
main.narrow { max-width: 46rem; }

.site-footer a { color: var(--on-band); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--w-heading);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
h1 { font-size: 1.7rem; margin: 0.5rem 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 1.75rem 0 0.75rem; }
a { color: var(--brand); }

/* -- hero (homepage) -------------------------------------------- */
main.home { max-width: none; padding: 0 0 4rem; }
.container { max-width: 62rem; margin: 0 auto; padding: 0 1rem; }

.hero-band {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='72' viewBox='0 0 280 72'%3E%3Cpath d='M0 36 H96 L108 36 116 14 126 54 134 36 H280' fill='none' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='2'/%3E%3C/svg%3E")
    repeat-x center 62%,
    linear-gradient(165deg, #0b5a55 0%, var(--band) 55%, var(--band-deep) 100%);
  color: var(--on-band);
  padding: 3.25rem 0 3.5rem;
}
.hero {
  text-align: center;
}
.hero .accent { color: var(--on-band-accent); }
.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  margin: 0 0 0.4rem;
}
.hero p.sub { color: var(--on-band-muted); margin: 0 0 1.5rem; font-size: 1.05rem; }

.searchbar {
  display: flex;
  max-width: 34rem;
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.searchbar input {
  flex: 1;
  font: inherit;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
}
.searchbar input::placeholder { color: var(--muted); }
.searchbar button {
  font: inherit;
  font-weight: var(--w-semibold);
  padding: 0.85rem 1.4rem;
  border: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}
.searchbar button:hover { background: var(--brand-deep); }
.hero-band .searchbar { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25); }
.hero-band .searchbar input { border-color: transparent; }
.hero-band .searchbar button { background: var(--on-band); color: var(--band); }
.hero-band .searchbar button:hover { background: #fff; }

.stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 0.5rem;
  padding: 0;
  list-style: none;
}
.stats .num {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--w-heading);
  font-size: 1.6rem;
  color: var(--brand-deep);
}
.stats .label { color: var(--muted); font-size: 0.9rem; }
.hero-band .stats .num { color: var(--on-band); }
.hero-band .stats .label { color: var(--on-band-muted); }

.kicker {
  display: block;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: var(--w-semibold);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 2.25rem 0 0.2rem;
}
.kicker + h2 { margin-top: 0; }

.quicklinks { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0.75rem 0 0; list-style: none; }
.quicklinks .chip strong { color: var(--brand-deep); font-weight: var(--w-semibold); }
.quicklinks .chip span.n { color: var(--muted); font-size: 0.8rem; margin-left: 0.3rem; }

/* -- job cards -------------------------------------------------- */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-tint);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  padding: 1rem 1.1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  border-color: var(--brand);
  border-left-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(23, 36, 40, 0.07), 0 12px 28px rgba(23, 36, 40, 0.09);
}
@media (prefers-reduced-motion: reduce) {
  .card, .card:hover { transition: none; transform: none; }
}
.card .pay {
  font-family: var(--font-display);
  font-weight: var(--w-heading);
  font-size: 1.45rem;
  color: var(--brand-deep);
  margin: 0;
  line-height: 1.15;
}
.card .pay .per { font-size: 0.95rem; color: var(--muted); font-family: var(--font-body); font-weight: var(--w-body); }
.card .pay .upto { font-size: 0.8rem; color: var(--muted); font-family: var(--font-body); font-weight: var(--w-medium); text-transform: uppercase; letter-spacing: 0.04em; display: block; }
.card .pay.nopay { font-size: 1rem; color: var(--muted); font-family: var(--font-body); font-weight: var(--w-medium); }
.card h3 { font-family: var(--font-body); font-weight: var(--w-medium); font-size: 1rem; margin: 0.3rem 0 0.45rem; line-height: 1.35; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card h3 a:hover { color: var(--brand-deep); }
.card .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }

.badge {
  display: inline-block;
  background: var(--brand-tint);
  color: var(--brand-deep);
  font-size: 0.8rem;
  font-weight: var(--w-semibold);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}
.tag {
  font-weight: var(--w-medium);
  display: inline-block;
  background: var(--chip-bg);
  color: var(--chip-ink);
  font-size: 0.8rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}
.card .loc { color: var(--muted); font-size: 0.85rem; }

/* -- filter chips (browse) -------------------------------------- */
.chiprow { margin: 0.4rem 0 0.9rem; }
.chiprow .chiplabel {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: var(--w-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0; margin: 0; list-style: none; }
.chip {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}
.chip:hover { border-color: var(--brand); color: var(--brand-deep); }
.chip[aria-current="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: var(--w-semibold);
}
.result-count { color: var(--muted); margin: 1rem 0 0.75rem; }

/* -- job detail ------------------------------------------------- */
.job-head .employer { color: var(--muted); margin: 0 0 0.75rem; }
.job-head .employer strong { color: var(--ink); }
.pay-line {
  font-family: var(--font-display);
  font-weight: var(--w-heading);
  font-size: 2rem;
  color: var(--brand-deep);
  margin: 0.25rem 0 0.75rem;
  line-height: 1.1;
}
.pay-line .upto {
  display: block;
  font-family: var(--font-body);
  font-weight: var(--w-semibold);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.apply {
  display: inline-block;
  background: var(--cta);
  color: #fff;
  font-weight: var(--w-heading);
  font-size: 1.05rem;
  padding: 0.75rem 2.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: var(--shadow);
}
.apply:hover { background: var(--cta-deep); }

dl.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.9rem 1rem;
  margin: 1.4rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.1rem;
}
dl.facts > div { display: block; }
dl.facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: var(--w-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
dl.facts dd { margin: 0.1rem 0 0; font-weight: var(--w-semibold); }

.description {
  margin-top: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  overflow-wrap: anywhere;
}
.description h2 { margin-top: 0; }
.description h3 { font-size: 1.02rem; margin: 1.2rem 0 0.4rem; }
.description ul { padding-left: 1.2rem; }
.description li { margin: 0.2rem 0; }
.description img { max-width: 100%; height: auto; }

.notice {
  background: #faf0f5;
  border: 1px solid #e3bfd0;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1rem 0;
}

/* joblist (related jobs on 410 page) */
ul.joblist { list-style: none; padding: 0; }
ul.joblist li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
ul.joblist a { color: var(--brand); text-decoration: none; font-weight: var(--w-semibold); }
ul.joblist a:hover { color: var(--brand-deep); }
ul.joblist .sub { color: var(--muted); font-size: 0.9rem; }

/* -- sticky mobile apply bar ------------------------------------ */
.applybar { display: none; }
@media (max-width: 640px) {
  body.has-applybar { padding-bottom: 4.75rem; }
  .applybar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(23, 36, 40, 0.08);
    z-index: 50;
  }
  .applybar .pay {
    font-family: var(--font-display);
    font-weight: var(--w-heading);
    font-size: 1.15rem;
    color: var(--brand-deep);
    line-height: 1.15;
  }
  .applybar .pay .upto { display: block; font-family: var(--font-body); font-size: 0.7rem; font-weight: var(--w-semibold); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
  .applybar .apply { padding: 0.65rem 1.6rem; font-size: 1rem; white-space: nowrap; }
}

/* -- homepage data-density additions ---------------------------- */
.freshline {
  color: var(--on-band-muted);
  font-size: 0.85rem;
  margin: 0.4rem 0 1.4rem;
}
.freshline .dot { margin: 0 0.4rem; }

.hero .chips { justify-content: center; margin-top: 0.9rem; }
.hero-band .chip {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--on-band);
}
.hero-band .chip:hover { border-color: #fff; color: #fff; }
.hero-band .chiplabel { color: var(--on-band-muted); text-align: center; }

.locbtn {
  display: inline-block;
  margin-top: 1.1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--on-band);
  font: inherit;
  font-weight: var(--w-semibold);
  font-size: 0.92rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
}
.locbtn:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

/* horizontal strip of highest-paying cards */
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(16rem, 20rem);
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.75rem;
  list-style: none;
  margin: 0;
  -webkit-overflow-scrolling: touch;
}
.strip .card { border-left-width: 3px; }

/* specialty pay cards */
.speccards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}
.speccard {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.speccard:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(23, 36, 40, 0.07), 0 12px 28px rgba(23, 36, 40, 0.09);
}
@media (prefers-reduced-motion: reduce) {
  .speccard, .speccard:hover { transition: none; transform: none; }
}
.speccard .name { color: var(--ink); font-weight: var(--w-semibold); }
.speccard .avg {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--w-heading);
  font-size: 1.25rem;
  color: var(--brand-deep);
  margin: 0.15rem 0;
}
.speccard .avg .lbl { font-family: var(--font-body); font-weight: var(--w-body); font-size: 0.8rem; color: var(--muted); }
.speccard .count { color: var(--muted); font-size: 0.85rem; }

.site-footer {
  background: var(--band);
  color: var(--foot-link);
  margin-top: 3.5rem;               /* breathing room from the content above */
  padding: 2.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.45;                /* tighter than body: these are lists */
}
.foot-inner {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* brand row */
.foot-brand { margin-bottom: 1.75rem; }
.foot-name {
  font-family: var(--font-display);
  font-weight: var(--w-heading);
  font-size: 1.15rem;
  color: var(--on-band);
  letter-spacing: -0.01em;
}
.foot-tag { color: var(--foot-count); margin: 0.2rem 0 0; max-width: 34rem; }
.foot-count { margin: 0.35rem 0 0; color: var(--foot-count); }
.foot-count strong {
  color: var(--on-band);
  font-family: var(--font-display);
  font-weight: var(--w-heading);
  font-size: 1.05rem;
}

/* section blocks: <details> so mobile collapses without JS */
.footblock { border-top: 1px solid var(--foot-rule); }
.footblock > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 0;
  color: var(--foot-head);
  font-size: 0.75rem;
  font-weight: var(--w-semibold);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footblock > summary::-webkit-details-marker { display: none; }
.footblock > summary::after {
  content: "+";
  font-size: 1.1rem;
  line-height: 1;
  color: var(--foot-head);
}
.footblock[open] > summary::after { content: "–"; }
.footblock > .fb-body { padding-bottom: 1.1rem; }

.foot-list { list-style: none; padding: 0; margin: 0; }
.foot-list li { break-inside: avoid; }
.foot-list a {
  display: block;
  color: var(--foot-link);
  text-decoration: none;
  padding: 0.2rem 0;
  border-radius: 3px;
}
.foot-list a:hover {
  color: var(--foot-link-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.foot-list a:focus-visible {
  outline: 2px solid var(--foot-link-hover);
  outline-offset: 2px;
  color: var(--foot-link-hover);
}
.foot-list .n { color: var(--foot-count); font-size: 0.78rem; }

/* fixed column counts; multi-column flows DOWN each column, so the list
   stays alphabetical vertically rather than wrapping across */
.fb-columns .foot-list { column-count: 1; column-gap: 2rem; }
@media (min-width: 700px) { .fb-columns .foot-list { column-count: 2; } }
@media (min-width: 1000px) { .fb-columns .foot-list { column-count: 4; } }

/* From tablet up the blocks are always expanded and the toggle disappears.
   A closed <details> hides its content via content-visibility, which no
   display rule on the child can override — ::details-content is the only
   thing that works (verified in-browser: footer 398px -> 1224px). Guarded by
   @supports so engines without it keep a genuinely tappable accordion rather
   than a permanently shut one. */
@media (min-width: 700px) {
  .footblock { padding-bottom: 0.4rem; }
  @supports selector(::details-content) {
    .footblock::details-content { content-visibility: visible; block-size: auto; }
    .footblock > summary { cursor: default; pointer-events: none; padding-bottom: 0.5rem; }
    .footblock > summary::after { content: ""; }
  }
}

/* bottom bar */
.foot-bottom {
  border-top: 1px solid var(--foot-rule);
  margin-top: 1rem;
  padding: 1.1rem 1rem 1.75rem;
  text-align: center;
  color: var(--foot-count);
  font-size: 0.82rem;
}
.foot-bottom nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.5rem;
  margin-bottom: 0.6rem;
}
.foot-bottom a {
  color: var(--foot-link);
  text-decoration: none;
  font-weight: var(--w-medium);
}
.foot-bottom a:hover { color: var(--foot-link-hover); text-decoration: underline; }
.foot-bottom p { margin: 0; }

/* static content pages (about/contact/privacy/terms) */
.prose { max-width: 42rem; }
.prose h2 { font-size: 1.15rem; margin-top: 1.75rem; }
.prose p, .prose li { color: var(--ink); }
.prose .updated { color: var(--muted); font-size: 0.9rem; }

/* -- canonical landing pages ------------------------------------ */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 0.75rem 0 0; color: var(--muted); font-size: 0.85rem; }
.crumbs li + li::before { content: "›"; margin-right: 0.35rem; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-deep); text-decoration: underline; }
.landing-copy { color: var(--muted); max-width: 46rem; margin: 0.25rem 0 1.25rem; }
