/* jobroute — departure-board accents on a quiet, white page. */
:root {
  --ink: #14213d;
  --muted: #5a6778;
  --paper: #ffffff;
  --mist: #f2f5f8;
  --line: #d9e0e7;
  --route: #0b4f9c;
  --board: #0b2545;
  --board-line: #1f3d63;
  --board-ink: #f4f7fb;
  --board-soft: #9fb6d3;
  --signal: #ffc300;
  --radius: 10px;
  --gutter: clamp(16px, 2.5vw, 56px); /* side margin grows with the screen; no fixed column */
  --head-h: 61px;
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink);
  font: 400 16px/1.55 var(--font);
}
main { flex: 1; }
img { max-width: 100%; }
::selection { background: var(--signal); color: var(--ink); }
a { color: var(--route); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 5.5vw, 3.2rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: 2560px; margin: 0 auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--signal); color: var(--ink); padding: .5rem 1rem; z-index: 2000; }
.skip:focus { left: 0; }
.btn {
  display: inline-block; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none;
  padding: .75rem 1.25rem; border-radius: var(--radius); border: 0;
}
.btn:hover { background: var(--route); }

/* Logo: "route" sits on a signal-yellow track */
.logo { font-weight: 800; font-size: 1.45rem; letter-spacing: -.035em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo span { font-weight: 500; box-shadow: inset 0 -.3em 0 var(--signal); padding: 0 .04em; }
.logo-sm { font-size: 1.1rem; margin-right: .35rem; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 1000; }
.top-row { display: flex; align-items: center; gap: .75rem 1.25rem; min-height: 60px; flex-wrap: wrap; padding-block: .5rem; }
.nav { display: flex; gap: .2rem 1rem; order: 3; width: 100%; flex-wrap: wrap; }
.nav a, .langs a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; } /* 44px targets on phones too */
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--signal); }
.nav .badge { margin-left: .35rem; background: var(--signal); color: var(--board); font-weight: 700; }
/* Phones: the four items and the count stay on one row in every language (a second row would make the sticky header 156px). */
@media (max-width: 599px) { .nav { flex-wrap: nowrap; gap: .8rem; font-size: .95rem; } .nav .badge { margin-left: .25rem; } }
.langs { margin-left: auto; display: flex; gap: .15rem; }
.langs a { font-size: .8rem; font-weight: 600; padding: .3rem .45rem; border-radius: 6px; color: var(--muted); }
.langs a[aria-current="true"] { background: var(--ink); color: #fff; }
@media (min-width: 720px) {
  .nav { order: 0; width: auto; margin-left: 1.5rem; gap: 1.5rem; }
}

/* Hero + departure board */
.hero { background: var(--mist); border-bottom: 1px solid var(--line); padding: 2rem 0 2.5rem; }
.hero-grid { display: grid; gap: 2rem; }
.hero h1 { max-width: 14ch; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 46ch; }
.search { display: flex; gap: .5rem; flex-wrap: wrap; max-width: 34rem; }
.search input, .f-search input {
  flex: 1 1 9rem; min-width: 0; font: inherit; padding: .75rem .9rem; border: 1.5px solid var(--ink);
  border-radius: var(--radius); background: #fff; color: var(--ink);
}
.search button, .f-search button {
  font: inherit; font-weight: 700; padding: .75rem 1.2rem; border-radius: var(--radius); border: 0;
  background: var(--signal); color: var(--ink); cursor: pointer;
}
.search button:hover, .f-search button:hover { background: #ffd23f; }
@media (min-width: 960px) {
  .hero { padding: 3.5rem 0; }
  .hero-grid { grid-template-columns: 5fr 7fr; align-items: center; gap: 3rem; }
}

.board { background: var(--board); color: var(--board-ink); border-radius: 14px; padding: 1.1rem 1rem .5rem; }
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: .5rem; }
.board-head h2 { font-size: 1.05rem; margin: 0; color: var(--signal); font-weight: 700; }
.board-head p { margin: 0; font-size: .8rem; color: var(--board-soft); }
.board table { width: 100%; border-collapse: collapse; }
.board thead { display: none; }
.board tr { display: grid; grid-template-columns: 3.4rem 1fr auto; grid-template-areas: "date to wl" "job job job"; gap: .1rem .6rem; padding: .7rem 0; border-top: 1px solid var(--board-line); position: relative; }
.board td { padding: 0; }
.b-date { grid-area: date; color: var(--signal); font-weight: 600; font-variant-numeric: tabular-nums; }
.b-yr { margin-left: .1em; color: var(--board-soft); font-weight: 500; } /* an older year reads as past, not as a date ahead */
.b-to { grid-area: to; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board td.r { grid-area: wl; text-align: right; }
.b-job { grid-area: job; }
.b-job a { color: var(--board-ink); text-decoration: none; display: block; line-height: 1.3; }
.b-job a::after { content: ""; position: absolute; inset: 0; }
.b-job span { display: block; font-size: .85rem; color: var(--board-soft); }
.board tr:hover .b-job a { text-decoration: underline; }
.board tr:focus-within { outline: 3px solid var(--signal); outline-offset: -3px; }
.board a:focus-visible { outline: none; }
.track { display: inline-block; min-width: 3.2rem; text-align: center; background: var(--signal); color: var(--board); font-weight: 700; font-size: .85rem; padding: .1rem .45rem; border-radius: 4px; white-space: nowrap; }
.track:empty { display: none; }
@media (min-width: 600px) {
  .board { padding: 1.25rem 1.4rem .75rem; }
  .board thead { display: table-header-group; }
  .board tr { display: table-row; }
  .board th { text-align: left; font-size: .75rem; font-weight: 500; color: var(--board-soft); padding: 0 .75rem .4rem 0; }
  .board td { padding: .75rem .75rem .75rem 0; border-top: 1px solid var(--board-line); vertical-align: top; }
  .board th.r, .board td.r { text-align: right; padding-right: 0; }
  .b-to { max-width: 9rem; }
  .board tr { position: relative; }
  .board tbody tr { transform: scale(1); } /* containing block for the row link */
}

/* Full list as a departure board: every job, employer and field in their own columns on wide screens. */
.board-full { padding-bottom: .25rem; }
.board-full tr { grid-template-areas: "date to wl" "job job job" "emp emp emp"; }
.board-full td.b-emp { grid-area: emp; font-size: .85rem; color: var(--board-soft); }
.board-full .b-cat { display: none; }
.board-full .b-job a { display: inline; } /* the language badge follows the title instead of taking its own line */
.board .b-div th { grid-column: 1 / -1; text-align: left; padding: .6rem 0 0; color: var(--signal); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.b-job .b-lang { display: inline-block; margin-left: .45rem; font-size: .7rem; font-weight: 700; padding: 0 .3rem; border: 1px solid var(--board-soft); border-radius: 3px; color: var(--board-soft); vertical-align: .1em; }
@media (min-width: 600px) {
  .board-full td.b-emp { color: var(--board-ink); font-size: .95rem; }
  .board-full .b-to { max-width: 12rem; }
  .board-full tbody tr:hover td { background: var(--board-line); }
  .board .b-div th { padding: 1.4rem 0 .5rem; border-top: 1px solid var(--board-line); font-size: .8rem; color: var(--signal); }
}
@media (min-width: 1100px) {
  .board-full .b-cat { display: table-cell; }
  .board-full td.b-cat { color: var(--board-soft); font-size: .9rem; }
  .board-full td { padding-block: .65rem; }
}

/* Sections */
.section { padding-block: 2.5rem 1rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }
.more { font-weight: 600; }
.split { display: grid; gap: 2rem; padding-bottom: 3rem; }
@media (min-width: 800px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.tally { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tally li { border-bottom: 1px solid var(--line); }
.tally li > a, .tally li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; color: var(--ink); text-decoration: none; }
.tally li:has(> a) { padding: 0; }
.tally li > a { width: 100%; }
.tally li > a:hover span { text-decoration: underline; }
.tally b { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 2.5rem; text-align: right; }

/* Job cards */
.cards { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); }
.card {
  position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title title" "emp emp" "facts date";
  grid-template-rows: auto auto 1fr; /* a card stretched by its row gives the extra height to the space above the facts */
  gap: .2rem .75rem; padding: 1rem 1rem .9rem; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--ink); box-shadow: 0 2px 10px rgba(11, 37, 69, .08); }
.card:focus-within { outline: 3px solid var(--signal); outline-offset: 1px; }
.card-title { grid-area: title; margin: 0; font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:focus-visible { outline: none; }
.card:hover .card-title a { text-decoration: underline; }
.card-emp { grid-area: emp; margin: 0; font-size: .92rem; font-weight: 500; }
.card-date { grid-area: date; align-self: end; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.facts { grid-area: facts; align-self: end; display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-end; gap: .3rem; list-style: none; margin: .45rem 0 0; padding: 0; }
.facts li { white-space: nowrap; font-size: .8rem; padding: .12rem .5rem; border-radius: 4px; background: var(--mist); color: var(--ink); }
.facts .f-wl { background: var(--signal); font-weight: 600; }
.facts .f-lang { background: var(--ink); color: #fff; font-weight: 600; }

/* Home: twelve new jobs fill two rows of six on wide screens; smaller screens show six. */
.cards-latest { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
@media (max-width: 1499px) { .cards-latest > :nth-child(n+7) { display: none; } }
@media (min-width: 1500px) { .cards-latest { grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); } }

/* Job list page */
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 1rem; padding-top: 1.5rem; }
.page-head h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.count { font-weight: 600; margin: 0 0 .5rem; }
.filters { border: 1px solid var(--line); border-radius: 12px; padding: .75rem .9rem .9rem; background: var(--mist); container-type: inline-size; }
.f-search { display: flex; gap: .4rem; }
.f-search input { padding-block: .55rem; }
.f-search button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: .55rem .7rem; }
.f-search svg path, .f-more summary svg path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.f-more { margin-top: .5rem; }
.f-more summary { cursor: pointer; font-weight: 600; padding: .5rem 0; width: max-content; min-height: 44px; }
.badge { display: inline-block; margin-left: .4rem; min-width: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: var(--ink); color: #fff; font-size: .8rem; text-align: center; }
fieldset { border: 0; margin: .6rem 0 0; padding: 0; min-width: 0; }
legend { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .3rem; padding: 0; display: block; white-space: nowrap; }
.f-any { font-weight: 400; }
.f-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 1.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip > span { display: inline-flex; align-items: center; min-height: 2.25rem; white-space: nowrap; padding: 0 .7rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .875rem; font-variant-numeric: tabular-nums; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--signal); outline-offset: 2px; }
.chip:hover > span { border-color: var(--ink); }
.reset { display: inline-flex; align-items: center; min-height: 2.25rem; margin-top: .6rem; font-weight: 600; white-space: nowrap; }
/* Wide panel: one compact row (wrapping as needed) of a short search box and the filter groups, no disclosure. */
@container (min-width: 30rem) {
  .f-in { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 1.5rem; }
  .f-search { flex: 0 1 19rem; margin-top: 1.85rem; } /* level with the first chip row, under the legends */
  .f-search input { padding-block: .5rem; }
  .f-more { flex: 1 1 24rem; margin: 0; }
  .f-more > summary { display: none; }
  .f-row .reset { align-self: flex-end; margin-top: .4rem; } /* level with the chips when it fits the row, close under them when it wraps */
  .f-more::details-content { content-visibility: visible; } /* shown before site.js opens it */
}

/* View switcher: one segmented control under the filters; the current view is lit like a departure board (navy, signal-yellow icon). */
.views { display: flex; width: max-content; max-width: 100%; gap: 3px; margin: 1rem 0 1.25rem; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--mist); }
.views a {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .4rem .85rem .4rem .7rem; border-radius: 9px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; transition: background-color .15s, color .15s;
}
.views svg { flex: none; }
.views svg path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.views a:hover { color: var(--ink); background: #fff; }
.views a[aria-current="page"] { color: #fff; background: var(--board); }
.views a[aria-current="page"] svg { color: var(--signal); }
.v-deck { display: none !important; } /* Swipe: phones only (below); deck.js uses the same query */
/* Phones: the switcher spans the width, icon over a short label, every segment a 52px target. */
@media (max-width: 599px) {
  .views { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .views a { flex-direction: column; justify-content: center; gap: .15rem; min-height: 52px; padding: .35rem .2rem; font-size: .74rem; line-height: 1.15; text-align: center; white-space: normal; }
}
@media (pointer: coarse) and (max-width: 899px) { .v-deck { display: inline-flex !important; } }
@media not all and (pointer: coarse) and (max-width: 899px) { .deck { display: none; } } /* desktop: deck.js moves on to the list */
.cards-list { padding-bottom: 3rem; }
.empty { padding-block: 3rem 4rem; }
.empty > * { max-width: 40rem; }
.empty .search { margin-bottom: 1rem; }
.nf-board { padding-bottom: 3rem; }

/* Map view. Phone: heading, filters, map, then the list. Wide: list left, map fills the right column at screen height. */
.mapview { display: flex; flex-direction: column; padding-bottom: 3rem; }
.map-list { display: contents; }
.map-col { order: 1; margin-bottom: 1rem; }
.cards-col { order: 2; align-content: start; }
/* Switzerland is about 3:2 on the map; a box of that shape opens on the country, not on its neighbours. */
.map { aspect-ratio: 3 / 2; max-height: 70vh; width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--mist); }
.map-col p { margin: .5rem 0 0; }
@media (min-width: 960px) {
  .mapview { display: grid; grid-template-columns: minmax(24rem, 2fr) 3fr; gap: 0 var(--gutter); align-items: start; }
  .map-list { display: block; min-width: 0; }
  .map-col { position: sticky; top: calc(var(--head-h) + 12px); margin: 1.25rem 0 0; }
  .map { aspect-ratio: auto; max-height: none; height: calc(100vh - var(--head-h) - 64px); min-height: 420px; }
}
.card.is-hit { border-color: var(--route); background: #f5f9ff; box-shadow: inset 0 0 0 1px var(--route); }
.pin { background: var(--board); color: #fff; border: 2px solid #fff; border-radius: 999px; display: grid; place-items: center; font: 700 12px/1 var(--font); box-shadow: 0 1px 4px rgba(11, 37, 69, .45); }
.pin.many { background: var(--signal); color: var(--board); }
.popup-body { max-height: 260px; overflow: auto; }
.popup-body strong { display: block; }
.popup-body strong + ul + strong { margin-top: .6rem; }
.popup-list { list-style: none; margin: .25rem 0 0; padding: 0; font: 14px/1.35 var(--font); }
.popup-list li + li { margin-top: .45rem; }
.popup-list small { display: block; color: var(--muted); }

/* Timeline */
.timeline { padding-bottom: 3rem; }
.tl-group { position: relative; padding-left: 1.25rem; border-left: 2px dashed var(--line); padding-bottom: 1.5rem; }
.tl-head { font-size: 1.1rem; position: relative; }
.tl-head::before { content: ""; position: absolute; left: calc(-1.25rem - 7px); top: .3em; width: 12px; height: 12px; border-radius: 50%; background: var(--signal); border: 2px solid var(--ink); }
.tl-head .muted { font-weight: 500; font-size: .9rem; margin-left: .4rem; }

/* By employer */
/* Columns, not a grid: one long group (the confidential employers) must not leave a hole beside it. */
.employers { columns: 22rem; column-gap: 3rem; padding-bottom: 3rem; }
.emp-group { break-inside: avoid; margin-bottom: 2rem; }
.emp-head { font-size: 1.1rem; display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--ink); padding-bottom: .4rem; }
.emp-head .muted { font-weight: 500; font-size: .9rem; }
.emp-list { list-style: none; margin: 0; padding: 0; }
.emp-list li { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.emp-list a { color: var(--ink); font-weight: 500; text-decoration: none; display: block; }
.emp-list a:hover { text-decoration: underline; }
.emp-list .muted { font-size: .85rem; }

/* Job detail */
.detail { padding-top: 1.25rem; padding-bottom: 3rem; }
.back { display: inline-block; font-weight: 600; margin-bottom: 1rem; }
.back::before { content: "‹ "; }
.notice { background: #fff4d1; border: 1px solid var(--signal); padding: .75rem 1rem; border-radius: 8px; font-weight: 600; }
.d-head { margin-bottom: 1.5rem; max-width: 50rem; }
.d-cat { margin: 0 0 .5rem; }
.d-cat a { display: inline-block; font-size: .85rem; font-weight: 600; background: var(--mist); color: var(--ink); padding: .2rem .6rem; border-radius: 4px; text-decoration: none; }
.d-head h1 { font-size: clamp(1.5rem, 4.2vw, 2.4rem); overflow-wrap: anywhere; }
.d-emp { font-size: 1.1rem; font-weight: 600; margin: 0; }
.d-grid { display: grid; gap: 2rem; }
.d-side { border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem; align-self: start; }
.btn-apply { display: block; text-align: center; background: var(--signal); color: var(--ink); font-size: 1.05rem; }
.btn-apply:hover { background: #ffd23f; }
.btn-apply + p { margin: .5rem 0 0; }
.d-facts { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; margin: 1.1rem 0; font-size: .95rem; }
.d-facts dt { color: var(--muted); }
.d-facts dd { margin: 0; font-weight: 600; }
.d-links { list-style: none; margin: 0; padding: 1rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .5rem; }
.d-links a { font-weight: 600; }
.d-body { min-width: 0; }
.prose { max-width: 68ch; overflow-wrap: anywhere; }
.prose h3, .prose h4 { margin: 1.5em 0 .5em; font-size: 1.1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .3em; }
/* Wide: the apply card starts level with the back link, beside the title, not below it.
   The last row is 1fr so a tall card stretches the space after the text, not the rows above it. */
@media (min-width: 960px) {
  .detail { display: grid; grid-template-columns: minmax(0, 72ch) 21rem; grid-template-rows: auto auto auto 1fr; column-gap: 3.5rem; align-items: start; }
  .d-grid { display: contents; }
  .detail > *, .d-body { grid-column: 1; }
  .back { justify-self: start; }
  .d-side { grid-column: 2; grid-row: 1 / span 4; position: sticky; top: 80px; }
  .detail > .section { grid-column: 1 / -1; }
}

/* Wider: related jobs get a third column beside the posting instead of sitting below it. */
@media (min-width: 1600px) {
  .detail:has(> .section) { grid-template-columns: minmax(0, 72ch) 21rem minmax(20rem, 1fr); }
  .detail > .section { grid-column: 3; grid-row: 1 / span 4; padding-top: 0; border-left: 1px solid var(--line); padding-left: 2.5rem; position: sticky; top: 80px; } /* at most four cards: fits the screen */
  .detail > .section h2 { font-size: 1.05rem; }
}

/* About */
.about { padding-top: 2rem; padding-bottom: 3rem; }
.about > * { max-width: 44rem; }
.about h2 { margin-top: 2rem; }
@media (min-width: 1200px) {
  .about { display: grid; grid-template-columns: minmax(0, 44rem) minmax(18rem, 1fr); gap: 0 clamp(4rem, 8vw, 10rem); align-items: start; }
  .about-side { padding-top: 4.5rem; max-width: none; }
  .about-side h2:first-child { margin-top: 0; }
}

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--mist); padding: 1.5rem 0; font-size: .9rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.board-full tr { grid-template-columns: 3.4rem 1fr auto auto; grid-template-areas: "date to wl save" "job job job job" "emp emp emp emp"; }
.board-full td.b-save { grid-area: save; }
.board-full th.b-save { width: 2.5rem; }
.board .save, .emp-list .save, .rd-place .save { position: relative; z-index: 1; padding: .3rem; border: 0; color: var(--board-soft); }
.board .save:hover { color: var(--board-ink); background: var(--board-line); }
.board .save[aria-pressed="true"], .emp-list .save[aria-pressed="true"], .rd-place .save[aria-pressed="true"] { color: var(--board); background: var(--signal); }
.emp-list li, .rd-place li { display: grid; grid-template-columns: 1fr auto; column-gap: .75rem; align-items: center; }
.emp-list li > :not(.save), .rd-place li > :not(.save) { grid-column: 1; }
.emp-list .save, .rd-place .save { grid-column: 2; grid-row: 1 / span 2; color: var(--muted); }
.emp-list .save:hover, .rd-place .save:hover { color: var(--ink); background: var(--mist); }
@media (min-width: 600px) { .board-full td.b-save { padding: .45rem 0 0 .25rem; } }

.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
.pdf-text { margin-top: 1.5rem; }
.pdf-text summary { cursor: pointer; font-weight: 600; }

/* ---------- Save button: a bookmark on cards, a labelled button on passes and the job page ---------- */
.save {
  display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer;
  color: inherit; background: transparent; border: 1.5px solid currentColor; border-radius: 999px; padding: .4rem .85rem .4rem .6rem;
  transition: background-color .15s, color .15s, border-color .15s;
}
.save[hidden] { display: none; }
/* Phones: 44px targets. Labelled buttons grow; bookmark icons keep their size and get an invisible 44px hit area, so rows keep their width. */
@media (pointer: coarse), (max-width: 600px) {
  .save-text { min-height: 44px; }
  .board .save::after, .emp-list .save::after, .rd-place .save::after, .card .save::after { content: ""; position: absolute; inset: calc(50% - 22px); }
}
.save svg { flex: none; }
.save svg path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.save[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--board); }
.save[aria-pressed="true"] svg path { fill: currentColor; }
.card .save { position: absolute; top: .55rem; right: .55rem; z-index: 1; padding: .35rem; border: 0; color: var(--muted); }
.card .save:hover { color: var(--ink); background: var(--mist); }
.card .save[aria-pressed="true"] { color: var(--board); background: var(--signal); }
.card:has(.save:not([hidden])) .card-title { padding-right: 2.2rem; }
.d-side .save { color: var(--ink); margin: 1rem 0 .25rem; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--mist); color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.badge[hidden] { display: none; }

/* ---------- Boarding pass: one job; the stub (navy) carries the canton code and the save button ---------- */
.pass {
  --notch: var(--paper);
  position: relative; display: grid; grid-template-rows: 1fr auto; height: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(11, 37, 69, .06), 0 14px 28px -18px rgba(11, 37, 69, .45);
}
.deck-card, .sv-item { container-type: inline-size; } /* the pass switches to a side stub when its holder is wide */
.pass-main { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.25rem 1.25rem; min-width: 0; }
.pass-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .9rem; font-size: .82rem; color: var(--muted); padding-bottom: .65rem; margin-bottom: .45rem; border-bottom: 1px solid var(--line); }
.pass-top time { margin-left: auto; font-variant-numeric: tabular-nums; }
.pass-flight { font-weight: 800; color: var(--board); background: var(--signal); padding: .05rem .4rem; border-radius: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pass-title { margin: 0; font-size: clamp(1.15rem, 1rem + .55vw, 1.55rem); font-weight: 750; line-height: 1.2; letter-spacing: -.015em; overflow-wrap: anywhere; text-wrap: balance; }
.pass-title a { color: var(--ink); text-decoration: none; }
.pass-title a:hover { text-decoration: underline; }
.pass-emp { margin: 0; font-weight: 600; }
.pass-closed { margin: .25rem 0 0; align-self: flex-start; font-size: .85rem; font-weight: 600; background: #fff4d1; border: 1px solid var(--signal); border-radius: 4px; padding: .1rem .5rem; }
.pass-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: .7rem 1.25rem; margin: auto 0 0; padding-top: 1rem; }
.pass-facts dt { font-size: .78rem; color: var(--muted); }
.pass-facts dd { margin: 0; font-weight: 700; line-height: 1.3; }
.pass-stub {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 1.25rem; background: var(--board); color: var(--board-ink); border-radius: 0 0 13px 13px;
  border-top: 2px dashed var(--board-soft);
}
/* Perforation notches, cut in the page colour at both ends of the tear line. */
.pass-stub::before, .pass-stub::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--notch); top: -10px; }
.pass-stub::before { left: -10px; box-shadow: inset -1px 0 0 var(--line); }
.pass-stub::after { right: -10px; box-shadow: inset 1px 0 0 var(--line); }
.pass-code { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--signal); font-variant-numeric: tabular-nums; }
.pass-stub .save { color: var(--board-ink); }
.pass-stub .save:hover { border-color: var(--signal); }
@container (min-width: 34rem) {
  .pass { grid-template-rows: none; grid-template-columns: 1fr 9.5rem; }
  .pass-stub { flex-direction: column; align-items: flex-start; justify-content: space-between; border-top: 0; border-left: 2px dashed var(--board-soft); border-radius: 0 13px 13px 0; padding: 1.1rem 1.1rem 1.1rem 1.25rem; }
  .pass-stub::before, .pass-stub::after { left: -10px; right: auto; }
  .pass-stub::before { top: -10px; box-shadow: inset 0 -1px 0 var(--line); }
  .pass-stub::after { top: auto; bottom: -10px; box-shadow: inset 0 1px 0 var(--line); }
  .pass-code { font-size: 3.4rem; }
}
.pass:focus-within { outline: 3px solid var(--signal); outline-offset: 2px; }
.pass a:focus-visible, .pass button:focus-visible { outline-offset: 3px; }

/* ---------- Swipe deck (phones): right saves, left skips ---------- */
.deck { padding-bottom: 1.5rem; }
.deck-stage { display: grid; gap: 1.25rem; }
.deck-card { position: relative; width: 100%; }
.deck-end { display: grid; place-content: center; gap: .5rem; text-align: center; min-height: 14rem; padding: 2rem 1rem; border: 2px dashed var(--line); border-radius: 14px; background: var(--paper); }
.deck-end-title { font-size: 1.35rem; font-weight: 700; margin: 0; }
.deck-end .btn { margin: .25rem; }
.deck-end .badge { background: var(--signal); color: var(--board); }
.deck.is-live .deck-stage { grid-template-areas: "card"; padding: .5rem 0 1.75rem; overflow-x: clip; touch-action: pan-y; }
.deck.is-live .deck-card {
  grid-area: card; z-index: 1; transform-origin: 50% 110%;
  transition: transform .45s cubic-bezier(.16, 1, .3, 1), opacity .3s ease-out, visibility 0s .45s;
  user-select: none; -webkit-user-select: none;
}
.deck.is-live .deck-card a { -webkit-user-drag: none; }
.deck.is-live .deck-card[data-pos="0"] { z-index: 5; transition-delay: 0s; }
.deck.is-live .deck-card[data-pos="1"] { z-index: 4; transform: translateY(12px) scale(.96); }
.deck.is-live .deck-card[data-pos="2"] { z-index: 3; transform: translateY(24px) scale(.92); }
.deck.is-live .deck-card[data-pos="queued"] { z-index: 2; transform: translateY(24px) scale(.92); opacity: 0; visibility: hidden; }
.deck.is-live .deck-card[data-pos="gone"] { transform: translateX(-125%) rotate(-14deg); opacity: 0; visibility: hidden; }
.deck.is-live .deck-card[data-pos="gone"][data-out="right"] { transform: translateX(125%) rotate(14deg); }
/* The next pass is whole underneath (a drag reveals it); the one after shows only its edge. */
.deck.is-live .deck-card:not([data-pos="0"]) .pass { box-shadow: 0 1px 2px rgba(11, 37, 69, .08); filter: saturate(.6) brightness(.98); }
.deck.is-live .deck-card:not([data-pos="0"], [data-pos="1"]) .pass-main > * { opacity: 0; }
.deck.is-live .deck-card.is-drag { transition: none; }
/* Stamps fade in with the drag (--p runs from -1 to 1 at the threshold) and stay on the pass as it leaves. */
.stamp {
  position: absolute; top: 1.1rem; z-index: 2; padding: .2rem .6rem; border: 3px solid currentColor; border-radius: 8px;
  font-size: 1.15rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; pointer-events: none;
}
.stamp-save { left: 1rem; transform: rotate(-12deg); color: var(--board); background: var(--signal); opacity: clamp(0, var(--p, 0), 1); }
.stamp-skip { right: 1rem; transform: rotate(12deg); color: var(--ink); background: #fff; opacity: clamp(0, calc(var(--p, 0) * -1), 1); }
.deck-card[data-out="right"][data-pos="gone"] .stamp-save, .deck-card[data-out="left"][data-pos="gone"] .stamp-skip { opacity: 1; }
/* Skip, open, save: sticky in thumb reach. */
.deck-ctl { display: flex; align-items: center; justify-content: center; gap: 1.5rem; position: sticky; bottom: 0; z-index: 6; padding: .6rem 0; background: var(--paper); }
.deck-ctl[hidden] { display: none; }
.deck-ctl button { display: grid; place-items: center; width: 3.75rem; height: 3.75rem; border-radius: 50%; cursor: pointer; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); }
.deck-ctl .d-save { background: var(--signal); border-color: var(--signal); color: var(--board); }
.deck-ctl svg path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.deck-ctl .d-save svg path { stroke-width: 1.9; }
.d-open { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; border-radius: 999px; font-weight: 700; color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--line); }
.deck-pos { margin: .25rem 0 0; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.deck-pos:empty, .deck-ctl[hidden] ~ .deck-help { display: none; }
.deck-help { margin: .25rem 0 0; text-align: center; }

/* ---------- Shortlist and compare ---------- */
.shortlist { padding-bottom: 3rem; }
.sv-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: .6rem 1.5rem; padding: .7rem 0; margin-top: 1.25rem; background: var(--paper); border-top: 1px solid var(--line);
}
.sv-bar p { margin: 0; font-weight: 600; line-height: 1.35; }
@media (max-width: 600px) { .sv-bar p { font-size: .88rem; } }
.sv-bar .btn { padding-block: .6rem; cursor: pointer; font: inherit; font-weight: 700; }
.passes { display: grid; gap: 1.75rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 36rem), 1fr)); }
.sv-item { display: flex; flex-direction: column; gap: .6rem; }
.sv-cmp { align-self: flex-start; }
.sv-cmp span { font-weight: 600; }
.sv-cmp input:disabled + span { opacity: .45; }
.sv-shared { margin: 0 0 1rem; }
.sv-empty { padding-top: 1.5rem; }
.cmp { background: var(--board); color: var(--board-ink); border-radius: 14px; padding: 1.1rem 1.25rem 1rem; margin-bottom: 2rem; }
.cmp-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; }
.cmp-head h2 { margin: 0; font-size: 1.15rem; color: var(--signal); }
.cmp a { color: var(--board-ink); }
.cmp .muted { color: var(--board-soft); margin: .75rem 0 0; }
.cmp-scroll { overflow-x: auto; margin-top: .75rem; scrollbar-color: var(--board-soft) var(--board); }
.cmp table { width: 100%; min-width: 40rem; border-collapse: collapse; table-layout: fixed; }
.cmp th, .cmp td { text-align: left; vertical-align: top; padding: .7rem 1rem .7rem 0; border-top: 1px solid var(--board-line); }
.cmp thead th, .cmp thead td { border-top: 0; padding-top: .25rem; }
.cmp thead td, .cmp tbody th { width: 10rem; position: sticky; left: 0; background: var(--board); }
.cmp thead a { display: block; margin: .45rem 0 .15rem; font-weight: 700; line-height: 1.25; text-decoration: none; overflow-wrap: anywhere; }
.cmp thead a:hover { text-decoration: underline; }
.cmp-emp { display: block; font-weight: 500; font-size: .9rem; color: var(--board-soft); }
.cmp tbody th { font-weight: 500; font-size: .85rem; color: var(--board-soft); }
.cmp tr.same td { color: var(--board-soft); }
.cmp tr.diff td { font-weight: 700; }
/* Phones: a narrow label column and readable job columns; the table scrolls sideways under the sticky labels. */
@media (max-width: 600px) {
  .cmp { padding-inline: 1rem; }
  .cmp table, .cmp thead, .cmp tbody { display: block; min-width: 0; }
  .cmp tr { display: grid; grid-template-columns: repeat(var(--cols), minmax(8.5rem, 1fr)); column-gap: 1rem; border-top: 1px solid var(--board-line); }
  .cmp thead tr { border-top: 0; }
  .cmp thead td { display: none; }
  .cmp th, .cmp td { padding: .5rem 0 .6rem; border-top: 0; }
  .cmp tbody th { grid-column: 1 / -1; justify-self: start; width: auto; padding-bottom: 0; font-size: .78rem; }
}
@media (min-width: 1500px) { .cmp table { min-width: 0; } .cmp thead td, .cmp tbody th { width: 13rem; } }

/* ---------- Commute radar ---------- */
.radar { padding-bottom: 3rem; }
.rd-form { grid-area: form; max-width: 44rem; }
.rd-form > label { display: block; font-weight: 700; margin-bottom: .35rem; }
.rd-status { margin: .6rem 0 0; color: var(--muted); min-height: 1.55em; }
.rd-grid { display: grid; gap: 1.5rem; margin-top: 1rem; grid-template-areas: "form" "scope" "list"; }
.rd-scope { grid-area: scope; margin: 0; }
.rd-list { grid-area: list; }
.rd-scope figcaption { margin-top: .6rem; max-width: 60ch; }
.rd-svg { display: block; width: 100%; height: auto; aspect-ratio: 1; background: var(--board); border-radius: 16px; }
.rd-ring { fill: none; stroke: var(--board-line); stroke-width: 2; }
/* --u: drawing units per CSS pixel (radar.js), so names keep their pixel size on a small radar: 13px names, never under 12px. */
.rd-svg { --u: 1.14; }
.rd-ring-label { fill: var(--board-soft); font: 600 calc(var(--u) * 12px) var(--font); paint-order: stroke; stroke: var(--board); stroke-width: calc(var(--u) * 5px); stroke-linejoin: round; text-anchor: middle; dominant-baseline: central; }
.rd-axis { stroke: var(--board-line); stroke-width: 1.5; stroke-dasharray: 3 9; }
.rd-sweep { display: none; }
.rd-sweep path { fill: var(--signal); opacity: .16; }
.is-scanning .rd-sweep { display: block; animation: rd-spin 2.6s linear infinite; }
@keyframes rd-spin { to { transform: rotate(360deg); } }
.rd-home { fill: var(--signal); stroke: var(--board); stroke-width: 5; }
.rd-home-label { fill: var(--board-ink); font: 700 calc(var(--u) * 16px) var(--font); paint-order: stroke; stroke: var(--board); stroke-width: calc(var(--u) * 5px); }
.rd-blip { cursor: pointer; transition: transform 1.1s cubic-bezier(.16, 1, .3, 1); }
.rd-blip circle { fill: var(--signal); stroke: var(--board); stroke-width: 3; fill-opacity: .92; transition: fill .15s; }
.rd-label { fill: var(--board-ink); font: 600 calc(var(--u) * 13.5px) var(--font); paint-order: stroke; stroke: var(--board); stroke-width: calc(var(--u) * 4.5px); stroke-linejoin: round; pointer-events: none; animation: rd-in .5s .8s both; }
@keyframes rd-in { from { opacity: 0; } } /* names follow their blips, which travel out for 1.1s */
.rd-blip.is-hit circle { fill: #fff; }
.rd-labels .is-hit { fill: var(--signal); }
.rd-list { display: flex; flex-direction: column; min-width: 0; }
.rd-group { font-size: 1.05rem; margin: 1.5rem 0 0; padding-bottom: .45rem; border-bottom: 2px solid var(--ink); }
.rd-group[hidden] { display: none; }
.rd-place { padding: .7rem .5rem; margin-inline: -.5rem; border-bottom: 1px solid var(--line); border-radius: 6px; scroll-margin-top: calc(var(--head-h) + 1rem); }
.rd-place h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0 0 .3rem; font-size: 1.02rem; }
.rd-min { font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; background: var(--signal); color: var(--board); padding: .05rem .45rem; border-radius: 4px; }
.rd-min:empty { display: none; }
.rd-place ul { list-style: none; margin: 0; padding: 0; }
.rd-place li { padding: .2rem 0; }
.rd-place li a { display: block; color: var(--ink); font-weight: 500; text-decoration: none; line-height: 1.35; }
.rd-place li a:hover { text-decoration: underline; }
.rd-place li .muted { font-size: .85rem; }
.rd-place.is-hit { background: #f5f9ff; box-shadow: inset 0 0 0 1px var(--route); }
@media (min-width: 960px) {
  /* The station form heads the list column, so the radar starts right under the view tabs and fits the first screen. */
  .rd-grid { grid-template-columns: auto minmax(22rem, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "scope form" "scope list"; gap: 0 var(--gutter); align-items: start; }
  .rd-form { margin-bottom: 1.25rem; }
  .rd-scope { position: sticky; top: calc(var(--head-h) + 1rem); width: min-content; } /* the caption wraps to the radar, not the reverse */
  .rd-svg { width: clamp(22rem, calc(100svh - 24rem), 58vw); }
  .rd-list > :first-child:not([hidden]), .rd-list > .rd-group { margin-top: 0; }
  .radar.has-home .rd-group { margin-top: 1.5rem; }
}
/* Very wide: the places run in two columns beside the radar; group headings span both. */
@media (min-width: 1600px) {
  .rd-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; align-content: start; }
  .rd-group { grid-column: 1 / -1; }
}
/* Phones: the radar is drawn at a third of its size, so its type is set larger in drawing units to stay readable. */
@media (max-width: 600px) {
  .deck-ctl { padding: .6rem 0; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .is-scanning .rd-sweep { animation: none; display: none; }
  .rd-blip, .deck.is-live .deck-card { transition: none !important; }
  .rd-label, .deck.is-live .deck-card .pass-main { animation: none; }
}
