/* Layout: plain header, left-aligned intro with search, then a filter column beside a ruled list of jobs. */
:root {
  --bg: #ffffff;
  --soft: #f4f5f9;
  --ink: #0e1530;
  --muted: #5a6178;
  --line: #e2e5ee;
  --eu: #1f3a93;
  --eu-soft: #e8ecf8;
  --gold: #ffcc00;
  --green: #1d6b3a;
  --amber: #8a5a00;
  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e19;
    --soft: #131828;
    --ink: #e7eaf3;
    --muted: #949bb0;
    --line: #232a3d;
    --eu: #9db1ff;
    --eu-soft: #18203a;
    --green: #7fd09b;
    --amber: #e8bf6a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 20px; }
.mono { font-family: var(--mono); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--eu); outline-offset: 2px; }

/* Header */
.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.brand em { font-style: normal; color: var(--eu); }
.brand.small { font-size: 14px; gap: 8px; }
.nav { display: flex; gap: 24px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }

/* Intro */
.intro { padding-block: 56px 36px; border-bottom: 1px solid var(--line); }
.intro h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; max-width: 17ch; }
.lede { color: var(--muted); font-size: 18px; max-width: 54ch; margin: 14px 0 28px; }
.search { display: flex; max-width: 760px; border: 1px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--bg); }
.search input, .search select { font: inherit; color: var(--ink); background: transparent; border: 0; padding: 14px 16px; min-width: 0; }
.search input { flex: 1 1 auto; }
.search select { flex: 0 0 220px; border-left: 1px solid var(--line); cursor: pointer; }
.search input:focus, .search select:focus { outline: none; background: var(--soft); }
.facts { color: var(--muted); margin: 14px 0 0; }
.facts span { color: var(--ink); }

/* Layout */
.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding-block: 28px 40px; align-items: start; }

/* Filters */
.filters { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; padding-right: 4px; }
.filters-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.filters-head h2 { font-size: 15px; font-weight: 600; }
.text-btn { border: 0; background: none; color: var(--eu); font: inherit; font-size: 14px; cursor: pointer; padding: 0; }
.text-btn:hover { text-decoration: underline; }
fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 14px 0 16px; }
legend { float: left; width: 100%; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.opts { clear: both; display: flex; flex-direction: column; gap: 4px; }
.opt { display: flex; align-items: center; gap: 9px; font-size: 14.5px; cursor: pointer; padding: 2px 0; }
.opt input { accent-color: var(--eu); width: 15px; height: 15px; margin: 0; flex: none; }
.opt .n { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.opt.zero { color: var(--muted); }
.input { clear: both; width: 100%; font: inherit; font-size: 14.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }

/* Results */
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.results-head p { margin: 0; font-weight: 500; }
.results-head p { min-width: 0; }
.results-tools { display: flex; gap: 8px; align-items: center; }
.select-quiet, .btn-quiet { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; cursor: pointer; }

.list { list-style: none; margin: 0; padding: 0; }
.job { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px 8px; border-bottom: 1px solid var(--line); position: relative; }
.job:hover { background: var(--soft); }
.logo { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line); background: #fff; /* logos are drawn for light backgrounds */ display: grid; place-items: center; overflow: hidden; font-weight: 600; color: var(--muted); }
.logo img { width: 28px; height: 28px; object-fit: contain; }
.job h3 { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.job h3 a { text-decoration: none; }
.job h3 a::after { content: ""; position: absolute; inset: 0; } /* whole row opens the posting */
.job h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.co { margin-top: 2px; font-size: 15px; }
.co .tag { color: var(--muted); }
.meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--muted); }
.meta .loc { max-width: min(100%, 360px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope { font-weight: 500; }
.scope::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.scope.europe { color: var(--eu); }
.scope.world { color: var(--green); }
.scope.country { color: var(--amber); }
.side { display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; }
.apply { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--eu); padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.apply:hover { background: var(--eu-soft); }
.save { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; display: inline-flex; }
.save:hover { color: var(--ink); background: var(--eu-soft); }
.save svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.save.on { color: var(--eu); }
.save.on svg { fill: currentColor; }

.empty { padding: 56px 8px; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 18px; margin-bottom: 4px; }

.pager { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 24px; }
.pager button { font: 500 14px var(--mono); min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); cursor: pointer; }
.pager button:hover:not(:disabled) { border-color: var(--ink); }
.pager button[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pager button:disabled { opacity: .35; cursor: default; }
.pager .gap { align-self: center; color: var(--muted); padding: 0 4px; }

.about { border-top: 1px solid var(--line); padding-block: 40px 56px; }
.about h2 { font-size: 20px; margin-bottom: 10px; }
.about p { color: var(--muted); max-width: 66ch; }

.footer { border-top: 1px solid var(--line); padding-block: 24px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer .brand { color: var(--ink); }

.btn { font: inherit; font-weight: 500; background: var(--ink); color: var(--bg); border: 0; border-radius: 6px; padding: 12px 16px; cursor: pointer; }
.btn.full { width: 100%; margin-top: 8px; }
.close { border: 0; background: none; color: var(--ink); font-size: 18px; cursor: pointer; padding: 4px 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 6px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

.only-mobile { display: none; }

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .only-mobile { display: inline-flex; }
  .btn.only-mobile { display: block; }
  .filters { display: none; position: fixed; inset: 0; z-index: 20; background: var(--bg); padding: 20px; max-height: none; top: 0; }
  .filters.open { display: block; }
  .filters-head { align-items: center; gap: 12px; }
  .filters-head h2 { margin-right: auto; }
  .intro { padding-block: 36px 28px; }
  .search { flex-direction: column; }
  .search select { flex: none; border-left: 0; border-top: 1px solid var(--line); }
  .job { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding-inline: 0; }
  .job:hover { background: none; }
  .logo { width: 40px; height: 40px; }
  .side { grid-column: 2; margin-left: -10px; }
}
