/* ResearchExpert Jobs — "periodic table" design.
   One bold idea: research fields are element tiles. Everything else stays quiet. */
@font-face { font-family: "Red Hat Display"; src: url(fonts/red-hat-display-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Red Hat Display"; src: url(fonts/red-hat-display-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Red Hat Display"; src: url(fonts/red-hat-display-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url(fonts/hanken-grotesk-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url(fonts/hanken-grotesk-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url(fonts/hanken-grotesk-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #F5F8F9;
  --paper: #FFFFFF;
  --ink: #1B2A3A;
  --soft: #556575;
  --line: #D9E1E6;
  --focus: #E8A317;
  --display: "Red Hat Display", system-ui, sans-serif;
  --text: "Hanken Grotesk", system-ui, sans-serif;
  --c: #3B4A5E; /* field colour, set per element below */
}
/* element colours (periodic-table convention: one muted hue per group; all ≥4.5:1 on white) */
.f-ph { --c: #3A68A0; } .f-ch { --c: #A33F66; } .f-bi { --c: #2C7650; }
.f-ma { --c: #654BA0; } .f-ml { --c: #1B7380; } .f-en { --c: #7D6018; }
.f-ec { --c: #556576; } .f-ea { --c: #55712A; } .f-st { --c: #3B4A5E; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--text); overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.sr-only, .meta dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.small { color: var(--soft); font-size: .88rem; }

/* header */
.site-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.12rem/1 var(--display); text-decoration: none; letter-spacing: -.01em; }
.brand-tile { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--ink); border-radius: 5px; font-size: .86rem; }
.site-header nav { display: flex; gap: 4px 24px; flex-wrap: wrap; }
.site-header nav a { color: var(--soft); text-decoration: none; font-weight: 500; padding: 4px 0; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 56px; align-items: center; padding-top: 32px; padding-bottom: 48px; }
.hero h1 { font-weight: 800; font-size: clamp(2.3rem, 5.2vw, 3.7rem); line-height: 1.02; letter-spacing: -.028em; margin: 0 0 18px; max-width: 12em; }
.lede { color: var(--soft); font-size: 1.12rem; max-width: 32em; margin: 0 0 26px; }
.search input { width: 100%; font: inherit; font-size: 1.06rem; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 14px 16px; }
.search input::placeholder { color: #7B8896; }
.hint { color: var(--soft); font-size: .86rem; margin: 8px 0 0; }

/* the periodic table */
.table { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.el { appearance: none; font: inherit; text-align: left; cursor: pointer; background: var(--paper); color: var(--c); border: 1.5px solid var(--c); border-radius: 6px; padding: 10px 12px 12px; min-height: 116px; display: grid; grid-template-rows: auto 1fr auto; transition: background-color .16s ease, color .16s ease; }
.el:hover { background: color-mix(in srgb, var(--c) 8%, white); }
.el[aria-pressed="true"] { background: var(--c); color: #fff; }
.el-n { justify-self: end; font: 700 .86rem/1 var(--display); font-variant-numeric: tabular-nums; }
.el-sym { font: 800 2.7rem/1 var(--display); letter-spacing: -.02em; align-self: center; }
.el-name { font-weight: 600; font-size: .84rem; line-height: 1.25; }

/* list */
.board { padding-bottom: 64px; }
.bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.bar h2 { font-weight: 700; font-size: 1.45rem; margin: 0; letter-spacing: -.01em; }
.status { margin: 0; color: var(--soft); font-size: .9rem; }

.filters { border-bottom: 1px solid var(--line); }
.filters summary { cursor: pointer; padding: 12px 0; font-weight: 600; width: max-content; list-style-position: outside; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px 16px; padding: 2px 0 18px; align-items: end; }
.filter-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; font-weight: 500; color: var(--soft); min-width: 0; }
.filter-grid select { font: inherit; font-size: .95rem; color: var(--ink); background: var(--paper); border: 1px solid #B9C5CD; border-radius: 6px; padding: 9px 8px; width: 100%; min-width: 0; }
.btn-quiet { font: inherit; font-weight: 600; background: none; border: 0; color: var(--ink); padding: 9px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; justify-self: start; }

.jobs { list-style: none; margin: 0; padding: 0; }
.job { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.stub { width: 52px; height: 52px; display: grid; place-items: center; background: var(--c); color: #fff; border-radius: 6px; font: 800 1.3rem/1 var(--display); }
.card-title { margin: 0 0 4px; font-weight: 700; font-size: 1.12rem; line-height: 1.3; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.meta { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 18px; color: var(--soft); font-size: .9rem; }
.meta dd { margin: 0; }
.meta div:first-child dd { color: var(--c); font-weight: 600; }
.card-pay { margin: 0; font: 700 1.02rem/1.3 var(--display); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.btn { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; border-radius: 8px; padding: 10px 22px; line-height: 1.3; }
.btn:hover { background: #2C4157; }
.btn-lg { padding: 13px 34px; font-size: 1.05rem; }
.empty { padding: 32px 0; }
.empty p { margin: 0 0 4px; }
.empty p:first-child { font: 700 1.1rem var(--display); }

/* job page */
.job-page { padding-top: 8px; padding-bottom: 64px; }
.crumb { margin: 0 0 16px; font-size: .95rem; }
.crumb a { color: var(--soft); }
.job-head { display: flex; gap: 20px; align-items: center; margin-bottom: 28px; }
.el-static { cursor: default; flex: none; width: 96px; min-height: 96px; padding: 10px; grid-template-rows: 1fr auto; background: var(--c); color: #fff; border-color: var(--c); }
.el-static .el-sym { font-size: 2.4rem; }
.el-static .el-name { font-size: .78rem; }
.job-head h1 { font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.1; letter-spacing: -.02em; margin: 0; }
.job-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px; align-items: start; }
.job-side { position: sticky; top: 20px; }
.facts { margin: 0 0 20px; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 8px; padding: 6px 18px; }
.facts div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--soft); font-size: .84rem; }
.facts dd { margin: 0; font-weight: 600; }
.job-side .btn { width: 100%; text-align: center; }
.job-side .small { margin-top: 10px; }
.job-body h2 { font-size: 1.4rem; margin: 0 0 4px; }
.desc { max-width: 70ch; margin-top: 18px; }
.desc h3 { font-size: 1.08rem; margin: 26px 0 6px; }
.desc p, .desc li { margin: 0 0 10px; }
.desc ul { padding-left: 1.2em; margin: 0 0 14px; }
.job-end { margin: 28px 0 8px; }

/* prose pages */
.prose { max-width: 760px; padding-top: 16px; padding-bottom: 72px; }
.prose h1 { font-weight: 800; font-size: clamp(2rem, 4.6vw, 2.9rem); line-height: 1.05; letter-spacing: -.025em; margin: 0 0 16px; }
.prose h2 { font-size: 1.3rem; margin: 34px 0 8px; }
.prose p, .prose li { max-width: 65ch; }
.prose a { color: var(--ink); font-weight: 600; }
.prose .btn { color: #fff; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 28px 0 0; }
.steps > li { counter-increment: s; position: relative; padding: 0 0 8px 64px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 6px; font: 800 1.2rem/1 var(--display); }
.steps h2 { margin-top: 0; padding-top: 8px; }
.notice { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: 6px; padding: 16px 18px; }

/* footer */
.site-footer { border-top: 2px solid var(--ink); color: var(--soft); font-size: .88rem; }
.footer-inner { padding-top: 20px; padding-bottom: 28px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px 48px; }
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; text-align: right; }
.footer-links span { display: flex; gap: 18px; }
.footer-links a { color: var(--ink); }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 12px; }
  .job-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .job-side { position: static; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-links { align-items: flex-start; text-align: left; }
}
@media (max-width: 640px) {
  .site-header nav a:first-child { display: none; }
  .hero { gap: 22px; padding-bottom: 32px; }
  .lede { margin-bottom: 20px; }
  .el { min-height: 76px; padding: 6px 9px 8px; }
  .el-sym { font-size: 1.8rem; }
  .el-name { font-size: .78rem; }
  .job { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; align-items: start; }
  .stub { width: 44px; height: 44px; font-size: 1.1rem; grid-row: span 3; }
  .card-pay { grid-column: 2; text-align: left; margin-top: 6px; }
  .job .btn { grid-column: 2; justify-self: start; margin-top: 8px; }
  .job-head { gap: 14px; }
  .el-static { width: 72px; min-height: 72px; }
  .el-static .el-sym { font-size: 1.8rem; }
  .el-static .el-name { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
