/* Public job board.
   Visual idea: tally marks. Field researchers count with them, so the hero carries a quiet field of tallies
   and every closing date is drawn as a row of ticks that burns down as the deadline approaches. */

.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }

/* Top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 0.9rem; }
.brand { display: flex; align-items: baseline; gap: 0.35rem; text-decoration: none; color: var(--ink); font-size: 1.25rem; }
.brand img { display: block; }
.brand-main { font-weight: 800; letter-spacing: -0.02em; }
.brand-sub { font-weight: 400; }
.brand-tag { margin-left: 0.6rem; padding-left: 0.8rem; border-left: 1px solid var(--line-strong); font-size: 0.95rem; color: var(--muted); }
.topnav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.topnav a { color: var(--text); text-decoration: none; font-weight: 600; padding-block: 0.3rem; border-bottom: 2px solid transparent; }
.topnav a:hover { border-bottom-color: var(--sky); color: var(--ink); }
.topnav a[aria-current="page"] { border-bottom-color: var(--ink); color: var(--ink); }

/* Hero */
.hero { position: relative; background: var(--ink); color: #fff; padding: 4.5rem 0 5.5rem; overflow: hidden; isolation: isolate; }
.hero::after {
  content: ""; position: absolute; inset: 0 0 0 42%; z-index: -1; opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='52' viewBox='0 0 72 52'%3E%3Cg fill='none' stroke='%234189dd' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 10v32M24 10v32M36 10v32M48 10v32M5 34 56 16'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%);
  mask-image: linear-gradient(90deg, transparent, #000 55%);
}
.hero h1 { color: #fff; font-size: clamp(2.3rem, 1.2rem + 4.2vw, 4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; max-width: 13em; margin-bottom: 0.5em; }
.lead { font-size: 1.2rem; line-height: 1.55; max-width: 38rem; }
.hero .lead { color: #c9d8ec; margin: 0; }

/* Board */
.board { position: relative; margin-top: -2.5rem; padding-bottom: 3.5rem; }
.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.9rem 1rem; padding: 1.1rem 1.25rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.filters .field { margin: 0; flex: 1 1 11rem; }
.filters .field.grow { flex: 2 1 15rem; }
.filters .btn { flex: none; }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 2.5rem 0 0.9rem; }
.board-head h2 { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.015em; }

.jobs { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.job { border-bottom: 1px solid var(--line); background: #fff; }
.job-link {
  display: grid; grid-template-columns: minmax(0, 1fr) 13.5rem; gap: 1.5rem; padding: 1.4rem 1.25rem;
  text-decoration: none; color: inherit; box-shadow: inset 0 0 0 var(--sky); transition: box-shadow 0.15s, background-color 0.15s;
}
.job-link:hover, .job-link:focus-visible { background: var(--sky-wash); box-shadow: inset 5px 0 0 var(--sky); }
.job-title { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); line-height: 1.25; }
.job-link:hover .job-title { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }
.job-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.job-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 0.6rem; max-width: 46rem; color: var(--text); }
.job-close { display: flex; flex-direction: column; gap: 0.35rem; justify-content: center; font-size: 0.9rem; }
.close-date { font-weight: 650; color: var(--ink); }
.close-left { color: var(--muted); }

/* Tally gauge: one tick per slice of the posting window */
.gauge { display: block; height: 12px; width: 100%; background: repeating-linear-gradient(90deg, #cbd6e4 0 3px, transparent 3px 7px); }
.gauge > span { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--sky) 0 3px, transparent 3px 7px); }
.gauge-urgent > span { background: repeating-linear-gradient(90deg, #c2570c 0 3px, transparent 3px 7px); }
.gauge-closed > span { display: none; }

.empty { background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--ink); padding: 2.5rem 1.5rem; }
.empty h3 { font-size: 1.3rem; font-weight: 800; }
.empty p { max-width: 36rem; color: var(--muted); }

/* Roster band */
.roster-band { background: var(--sky-soft); color: var(--ink); padding: 3rem 0; }
.roster-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.roster-copy { flex: 1 1 24rem; max-width: 42rem; }
.roster-copy h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.4em; }
.roster-copy p { margin: 0; font-size: 1.1rem; line-height: 1.55; }

/* Job page */
.crumb { margin: 2rem 0 1rem; font-size: 0.95rem; }
.job-head { max-width: 50rem; }
.job-head h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.1rem); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 0.35em; }
.job-head .lead { color: var(--muted); }
.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 3.5rem; padding-bottom: 4rem; align-items: start; }
.prose { max-width: 42rem; font-size: 1.05rem; line-height: 1.7; }
.prose section { margin-top: 2.4rem; }
.prose section:first-child { margin-top: 0.5rem; }
.prose h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.015em; margin-bottom: 0.5em; }
.prose h3 { font-size: 1.1rem; margin: 1.4em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35em; padding-left: 0.2rem; }
.glance { position: sticky; top: 1rem; background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--ink); padding: 1.25rem; }
.glance dl { margin: 0 0 1.25rem; }
.glance dl > div { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.glance dl > div:first-child { padding-top: 0; }
.glance dt { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--muted); }
.glance dd { margin: 0.15rem 0 0; font-weight: 650; color: var(--ink); }
.glance dd .gauge { margin-top: 0.5rem; }
.glance dd .close-left { display: block; margin-top: 0.25rem; font-weight: 400; font-size: 0.85rem; }
.glance .btn { margin-top: 0.6rem; }
.aside-note { margin: 1rem 0 0; font-size: 0.9rem; color: var(--muted); }

/* Forms */
.form-page { padding-bottom: 4.5rem; }
.form-head { max-width: 44rem; margin-bottom: 1.5rem; }
.form-head h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.8rem); font-weight: 800; letter-spacing: -0.025em; }
.form-head .lead { color: var(--text); font-size: 1.1rem; }
.form { max-width: 46rem; background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--ink); padding: 1.75rem clamp(1.1rem, 3vw, 2rem) 2rem; }
.group { border: 0; padding: 0; margin: 0 0 2rem; min-width: 0; }
.group + .group, .consent { padding-top: 1.75rem; border-top: 1px solid var(--line); }
.group > legend { float: left; width: 100%; padding: 0; margin: 0 0 1rem; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.group > legend + * { clear: both; }
.group-note { margin: -0.4rem 0 1.1rem; color: var(--muted); font-size: 0.95rem; }
.consent { margin-bottom: 1.5rem; }
.privacy { font-size: 0.9rem; color: var(--muted); max-width: 40rem; }
.form-actions { margin-top: 0.5rem; }
#error-summary { max-width: 46rem; }

/* Thanks and errors */
.thanks, .error-page { padding: 4rem 0 5rem; max-width: 44rem; margin-left: max(1.25rem, calc((100% - 68rem) / 2)); }
.thanks-mark { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--ink); color: #fff; margin-bottom: 1.25rem; }
.thanks-mark .ic { width: 1.7rem; height: 1.7rem; stroke-width: 2; }
.thanks h1, .error-page h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3rem); font-weight: 800; letter-spacing: -0.025em; }
.ref { font-size: 1.15rem; }
.ref strong { padding: 0.1rem 0.5rem; background: var(--sky-wash); border: 1px solid var(--sky-soft); border-radius: var(--radius); font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }
.thanks-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; gap: 0.5rem 2rem; flex-wrap: wrap; padding-block: 1.5rem; }
.footer p { margin: 0; }
.footer a { color: var(--muted); }

@media (max-width: 60rem) {
  .job-layout { grid-template-columns: 1fr; gap: 2rem; }
  .glance { position: static; order: -1; }
}
@media (max-width: 44rem) {
  .hero { padding: 3rem 0 4.5rem; }
  .hero::after { inset: 0; opacity: 0.18; }
  .job-link { grid-template-columns: 1fr; gap: 1rem; padding: 1.2rem 1rem; }
  .job-close { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 0.5rem 1rem; }
  .job-close .gauge { flex: 1 1 8rem; }
  .brand-tag { display: none; }
  .filters .btn { width: 100%; }
  .thanks, .error-page { margin-left: 1.25rem; margin-right: 1.25rem; }
}
