/* An employer's careers page (careers.php, GR-13).
   The employer's colour arrives as --cp-accent from the page, with
   --cp-on-accent for text on it and --cp-ink, the same colour darkened until
   it reads as text on white. Light only, by choice: it is the employer's
   page, drawn the way their own site would be, on any device setting. */

.cp {
  --cp-accent: #24324a;
  --cp-on-accent: #ffffff;
  --cp-ink: #24324a;
  --cp-bg: #f5f6f8;
  --cp-surface: #ffffff;
  --cp-text: #15181d;
  --cp-muted: #59616e;
  --cp-line: #e2e5ea;
  --cp-radius: 12px;
  color-scheme: light;
  margin: 0;
  background: var(--cp-bg);
  color: var(--cp-text);
  font: 400 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.cp *, .cp *::before, .cp *::after { box-sizing: border-box; }
.cp main { flex: 1 0 auto; }
.cp svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cp a { color: var(--cp-ink); }
.cp a:focus-visible { outline: 3px solid var(--cp-accent); outline-offset: 2px; border-radius: 6px; }

.cp-wrap { width: 100%; max-width: 960px; margin: 0 auto; padding-inline: 20px; }

.cp-preview { margin: 0; padding: 10px 20px; background: #fff4d6; color: #5a4200; font-size: 14px; text-align: center; border-bottom: 1px solid #f0dc9c; }

/* Header: the employer, nothing else. */
.cp-top { background: var(--cp-surface); border-top: 4px solid var(--cp-accent); border-bottom: 1px solid var(--cp-line); }
.cp-top__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.cp-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: var(--cp-text) !important; }
.cp-brand__logo { display: block; height: 44px; width: auto; max-width: 180px; object-fit: contain; }
.cp-brand__mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--cp-accent); color: var(--cp-on-accent); font-weight: 700; font-size: 18px; }
.cp-brand__name { font-weight: 700; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }

/* Hero */
.cp-hero { background: color-mix(in srgb, var(--cp-accent) 7%, var(--cp-surface)); border-bottom: 1px solid var(--cp-line); padding-block: 48px 40px; }
.cp-eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--cp-ink); }
.cp-hero__title { margin: 0; font-size: clamp(30px, 5vw, 44px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere; }
.cp-hero__intro { margin: 16px 0 0; max-width: 62ch; font-size: 18px; color: var(--cp-muted); overflow-wrap: anywhere; }
.cp-hero__count { margin: 20px 0 0; font-size: 15px; font-weight: 600; }

/* Role list */
.cp-roles { padding-block: 32px 56px; }
.cp-group { margin: 32px 0 12px; font-size: 18px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.cp-group:first-child { margin-top: 0; }
.cp-group span { font-size: 14px; font-weight: 600; color: var(--cp-muted); }
.cp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cp-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); text-decoration: none; color: var(--cp-text) !important; transition: border-color .15s, box-shadow .15s; }
.cp-row:hover { border-color: var(--cp-accent); box-shadow: 0 4px 16px rgba(20, 24, 30, .07); }
.cp-row__main { display: grid; gap: 8px; min-width: 0; }
.cp-row__title { font-size: 18px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.cp-row__facts { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cp-fact { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--cp-muted); }
.cp-fact svg { color: var(--cp-ink); }
.cp-row__go { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--cp-ink); white-space: nowrap; }
.cp-empty { padding: 40px 24px; text-align: center; background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); }
.cp-empty h2 { margin: 0 0 6px; font-size: 20px; }
.cp-empty p { margin: 0; color: var(--cp-muted); }

/* Role page */
.cp-job { padding-block: 24px 64px; max-width: 820px; }
.cp-back { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; text-decoration: none; padding: 8px 0; }
.cp-back:hover { text-decoration: underline; }
.cp-job article { margin-top: 12px; background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); overflow: hidden; }
.cp-job__head { padding: 32px 32px 28px; border-bottom: 1px solid var(--cp-line); }
.cp-job__title { margin: 0; font-size: clamp(26px, 4.2vw, 36px); line-height: 1.15; font-weight: 700; letter-spacing: -.015em; text-wrap: balance; overflow-wrap: anywhere; }
.cp-job__facts { list-style: none; margin: 16px 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.cp-job__facts .cp-fact { font-size: 15px; }
.cp-apply { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: 10px; background: var(--cp-accent); color: var(--cp-on-accent) !important; font-weight: 600; font-size: 16px; text-decoration: none; transition: filter .15s; }
.cp-apply:hover { filter: brightness(1.08); }
.cp-jd { padding: 28px 32px; overflow-wrap: anywhere; }
.cp-jd > :first-child { margin-top: 0; }
.cp-jd p, .cp-jd ul, .cp-jd ol { margin: 0 0 14px; }
.cp-jd ul, .cp-jd ol { padding-left: 22px; }
.cp-jd li { margin-bottom: 6px; }
.cp-jd .cp-jd__h { margin: 26px 0 10px; line-height: 1.3; }
.cp-jd h2.cp-jd__h { font-size: 21px; }
.cp-jd h3.cp-jd__h { font-size: 18px; }
.cp-jd h4.cp-jd__h { font-size: 16px; }
.cp-job__end { padding: 24px 32px 32px; border-top: 1px solid var(--cp-line); display: grid; justify-items: start; gap: 12px; }
.cp-note { margin: 0; font-size: 14px; color: var(--cp-muted); }
.cp-sticky { display: none; }

/* Footer */
.cp-foot { border-top: 1px solid var(--cp-line); background: var(--cp-surface); }
.cp-foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-block: 20px; font-size: 14px; color: var(--cp-muted); }
.cp-foot__by { color: var(--cp-muted) !important; text-decoration: none; padding: 6px 0; }
.cp-foot__by:hover { text-decoration: underline; }

/* Not available */
.cp-missing { flex: 1; display: grid; place-items: center; padding: 40px 20px; }
.cp-missing__card { max-width: 460px; padding: 32px; background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); text-align: center; }
.cp-missing__card h1 { margin: 0 0 10px; font-size: 24px; }
.cp-missing__card p { margin: 0; color: var(--cp-muted); }

@media (max-width: 640px) {
  .cp-wrap { padding-inline: 16px; }
  .cp-top__in { min-height: 64px; }
  .cp-brand__logo { height: 36px; max-width: 140px; }
  .cp-hero { padding-block: 32px 28px; }
  .cp-hero__intro { font-size: 16px; }
  .cp-roles { padding-block: 24px 40px; }
  .cp-row { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
  .cp-row__go { justify-content: flex-end; }
  .cp-job { padding-block: 16px 32px; }
  .cp-job__head { padding: 22px 18px 20px; }
  .cp-job__head .cp-apply { width: 100%; }
  .cp-jd { padding: 22px 18px; }
  .cp-job__end { padding: 20px 18px 24px; }
  .cp-job__end .cp-apply { width: 100%; }
  /* The Apply button stays in reach while a long description is read. */
  .cp--role .cp-sticky { display: block; position: sticky; bottom: 0; z-index: 5; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--cp-surface); border-top: 1px solid var(--cp-line); box-shadow: 0 -6px 18px rgba(20, 24, 30, .08); }
  .cp--role .cp-sticky .cp-apply { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cp-row, .cp-apply { transition: none; }
}
