/* Fonts are self-hosted from /assets/fonts (copied from @fontsource at build time).
   Each weight has a Latin file and a Latin Extended file; browsers fetch the second only for characters that need it. */
@font-face {
  font-family: "Sofia Sans Semi Condensed";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/sofia-sans-semi-condensed-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Sofia Sans Semi Condensed";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/sofia-sans-semi-condensed-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Sofia Sans Semi Condensed";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/sofia-sans-semi-condensed-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Sofia Sans Semi Condensed";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/sofia-sans-semi-condensed-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Sofia Sans Semi Condensed";
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/sofia-sans-semi-condensed-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Sofia Sans Semi Condensed";
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/sofia-sans-semi-condensed-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Titillium Web";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/titillium-web-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Titillium Web";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/titillium-web-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Titillium Web";
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/titillium-web-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Titillium Web";
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/titillium-web-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Colors, fonts, and component styles follow sail.health's theme so the board reads as part of SAIL. */
:root {
  --royal: #002366;
  --blue: #0978d1;
  --orange: #cd673b;
  --orange-hover: #b5562e;
  --orange-text: #a3461f;
  --sage: #478075;
  --cream: #f5f2c9;
  --ink: #222222;
  --muted: #555555;
  --rule: #dddddd;
  --wash: #eeeeee;
  --paper: #ffffff;
  --sponsor-wash: #f1f5fb;
  --sponsor-wash-hover: #e4ecf7;
  /* Sage dark enough for text on the sponsored tint. */
  --sage-on-sponsor: #3e7065;

  --display: "Sofia Sans Semi Condensed", "Arial Narrow", sans-serif;
  --body: "Titillium Web", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: 16px;
  --radius: 2px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.5;
}

a {
  color: var(--blue);
}

/* Elements hidden by the filter script must stay hidden even when a class sets display. */
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 640px) {
  :root {
    --gutter: 32px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -40px;
  background: var(--paper);
  color: var(--royal);
  padding: 6px 12px;
  z-index: 10;
}

.skip-link:focus {
  top: 8px;
}

.demo-banner {
  margin: 0;
  padding: 8px var(--gutter);
  background: var(--cream);
  color: var(--royal);
  font-weight: 600;
  text-align: center;
}

/* White header as on sail.health, running wider than the content column as theirs does.
   It links back to SAIL rather than copying their menu, which would go stale when they change it. */
.site-header {
  border-bottom: 1px solid var(--wash);
  background: var(--paper);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px var(--gutter);
}

@media (min-width: 640px) {
  .header-inner {
    padding: 24px 40px;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--display);
  line-height: 1;
}

/* SAIL's logo from sail.health, in blue in the header and white in the footer. */
.brand-logo {
  display: block;
  width: auto;
  height: 48px;
}

.brand-jobs {
  padding-left: 12px;
  border-left: 2px solid var(--orange);
  color: var(--royal);
  font-size: 2rem;
  font-weight: 400;
}

/* Styled like an item in SAIL's menu. */
.header-link {
  color: var(--ink);
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
}

.header-link:hover {
  color: var(--blue);
}

/* The page intro follows SAIL's inside pages: a light royal title on white. */
.hero {
  padding: 56px 0 8px;
}

.hero h1 {
  margin: 0 0 12px;
  color: var(--royal);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 3.3rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 28px;
  max-width: 60ch;
}

.cta-note {
  margin: 0;
  color: var(--orange-text);
  font-weight: 600;
}

/* Buttons copy SAIL's: square, bold, uppercase, filled orange or outlined in ink.
   The label is 19px rather than SAIL's 18px so white on orange meets the large-text contrast minimum. */
.button {
  display: inline-block;
  padding: 16px 36px 14px;
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  background: var(--orange);
  color: var(--paper);
  font: 700 1.1875rem/1.4 var(--body);
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  border-color: var(--orange-hover);
  background: var(--orange-hover);
}

.button-quiet {
  border-color: var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.button-quiet:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* The apply button names the employer's site; hostnames keep their case and may wrap. */
.button-block {
  display: block;
  width: 100%;
  padding-inline: 16px;
  overflow-wrap: anywhere;
}

.button-host {
  text-transform: none;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Listing layout: filters beside results on wide screens, above them on narrow ones. */
.board {
  display: grid;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 64px;
}

@media (min-width: 900px) {
  .board {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 56px;
  }

  .filters {
    position: sticky;
    top: 24px;
  }
}

/* On phones the filter options fold under a toggle; on wide screens they are always open. */
.filter-groups > summary {
  margin-top: 16px;
  color: var(--royal);
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
}

@media (min-width: 900px) {
  .filter-groups > summary {
    display: none;
  }
}

.filters fieldset {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.filter-label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  color: var(--royal);
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 700;
}

input[type="search"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip > span {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 0.9375rem;
}

.chip:hover > span {
  border-color: var(--royal);
}

.chip input:checked + span {
  border-color: var(--royal);
  background: var(--royal);
  color: var(--paper);
}

.chip input:focus-visible + span {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.chip-count {
  margin-left: 2px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.chip input:checked + span .chip-count {
  color: #c9d6ef;
}

.filters .link-button {
  margin-top: 20px;
  font-size: 0.9375rem;
}

/* Results. The left column of each row is the deadline, the thing applicants plan around. */
.status {
  margin: 0 0 8px;
  color: var(--muted);
}

.postings {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--royal);
}

.posting {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--rule);
}

.posting:hover {
  background: var(--wash);
}

@media (min-width: 640px) {
  .posting {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 24px;
    padding: 24px 12px;
  }
}

.when {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.when-label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.when-date {
  color: var(--royal);
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .when-date {
    font-size: 1.875rem;
  }
}

.when-year {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.875rem;
}

.when-rolling {
  color: var(--sage);
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
}

.is-closing .when-date {
  color: var(--orange);
}

.when-note {
  margin-top: 2px;
  color: var(--orange-text);
  font-size: 0.875rem;
  font-weight: 600;
}

.posting-title {
  margin: 0 0 2px;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.posting-title a {
  color: var(--royal);
  text-decoration: none;
}

.posting-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.posting:hover .posting-title a {
  text-decoration: underline;
}

.posting-org {
  margin: 0 0 6px;
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9375rem;
}

.tags li + li::before {
  content: "·";
  padding: 0 8px;
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 3px;
  background: var(--cream);
  color: var(--royal);
  font-family: var(--display);
  font-size: 0.875rem;
  font-weight: 700;
  vertical-align: 0.2em;
}

/* Sponsored postings sit above the others in their usual row, with a tint, a rule down the left side,
   a label above the title, and the sponsor's logo. On a phone the logo goes under the deadline so the title keeps its width. */
.sponsored-label {
  display: inline-block;
  margin: 0 0 6px;
  padding: 0 8px;
  border: 1px solid var(--royal);
  border-radius: 3px;
  color: var(--royal);
  font-family: var(--display);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
}

.posting.is-sponsored {
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-areas:
    "when what"
    "logo what";
  grid-template-rows: auto 1fr;
  row-gap: 12px;
  background: var(--sponsor-wash);
  box-shadow: inset 4px 0 0 var(--royal);
}

.posting.is-sponsored:hover {
  background: var(--sponsor-wash-hover);
}

.is-sponsored .when {
  grid-area: when;
}

.is-sponsored .what {
  grid-area: what;
}

.is-sponsored .when-rolling {
  color: var(--sage-on-sponsor);
}

.row-logo {
  grid-area: logo;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

@media (min-width: 640px) {
  .posting.is-sponsored {
    grid-template-columns: 104px minmax(0, 1fr) 56px;
    grid-template-areas: "when what logo";
    grid-template-rows: auto;
  }

  .row-logo {
    width: 56px;
    height: 56px;
  }
}

.empty {
  padding: 32px 0;
  color: var(--muted);
}

.empty p {
  margin: 0 0 12px;
}

.not-found {
  padding-top: 48px;
  padding-bottom: 80px;
}

.not-found h1 {
  margin: 0 0 12px;
  color: var(--royal);
  font-family: var(--display);
  font-size: clamp(2.5rem, 5vw, 3.3rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.02em;
}

.not-found p {
  max-width: 56ch;
  margin: 0 0 20px;
}

/* Posting detail page. */
.detail {
  padding-top: 24px;
  padding-bottom: 64px;
}

.back {
  margin: 0 0 24px;
}

.back a::before {
  content: "← ";
}

.detail-head {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--royal);
}

.detail-org {
  margin: 0 0 6px;
  color: var(--sage);
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
}

.detail-head h1 {
  margin: 0;
  max-width: 28ch;
  color: var(--royal);
  font-family: var(--display);
  font-size: clamp(2.25rem, 5vw, 3.3rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.02em;
}

.detail-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 900px) {
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 56px;
  }

  .detail-facts {
    order: 2;
    align-self: start;
    position: sticky;
    top: 24px;
  }
}

.detail-facts {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--wash);
}

.detail-facts dl {
  margin: 20px 0 0;
}

.detail-facts dt {
  color: var(--muted);
  font-size: 0.875rem;
}

.detail-facts dd {
  margin: 0 0 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.detail-facts .when-note {
  display: block;
}

/* A sponsored posting's page repeats the label and logo. */
.detail-head:has(.detail-logo) {
  position: relative;
  padding-right: 80px;
}

.detail-logo {
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.prose {
  max-width: 68ch;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2,
.prose h3 {
  margin: 1.6em 0 0.4em;
  color: var(--royal);
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

/* The footer uses SAIL's blue-to-royal gradient with white text. */
.site-footer {
  padding: 56px 0 32px;
  background: linear-gradient(var(--blue), var(--royal));
  color: var(--paper);
  font-size: 1rem;
}

.site-footer .brand {
  margin-bottom: 20px;
}

.site-footer p {
  margin: 0 0 8px;
  max-width: 72ch;
}

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

.site-footer :focus-visible {
  outline-color: var(--paper);
}
