/* The departures board, shared by the landing page and the home page of the app (templates/landing.html, index.html).
   Always dark: a navy field, sheets of the lighter navy with a gold edge on top (the logo's own sheets), split-flap cells
   for time and numbers, a gold tag where a vacancy sits on the employer's own site. Colours are the brand palette by
   name (they exist in landing.css and in style.css), the faces come from fonts.css. */

/* ---- split-flap cells: a word, or a number ---- */
.slot { display: inline-flex; gap: .05em; vertical-align: middle; }
.flap { position: relative; display: inline-grid; place-items: center; width: .64em; height: 1.02em; background: var(--cell); border-radius: .06em; color: var(--gold); font-weight: 700; overflow: hidden; }
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: .03em; background: var(--seam); }
.flap i { font-style: normal; display: block; transform-origin: 50% 50%; }
.num { font-variant-numeric: tabular-nums; }

/* ---- the board ---- */
.board { margin-top: 40px; }
.board-head, .row { display: grid; grid-template-columns: 92px minmax(0, 1.7fr) minmax(0, 1.25fr) minmax(0, .9fr) 168px; gap: 4px; }
.board-head { font-size: .875rem; color: var(--white-soft); padding: 0 0 8px; }
.board-head span { padding: 0 14px; }
.board-head span:first-child { padding-left: 0; }
.rows { display: grid; gap: 8px; perspective: 900px; }
.row { transform-origin: 50% 0; color: var(--paper); text-decoration: none; }
.row > * { background: var(--board-2); padding: 12px 14px; min-width: 0; box-shadow: inset 0 3px 0 var(--gold); }
a.row:hover > * { background: var(--cell); }
a.row:hover { color: var(--paper); }
a.row:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.row .t { display: flex; gap: 2px; padding: 8px 10px; align-items: center; }
.row .t b { display: inline-grid; place-items: center; width: 1.05em; height: 1.45em; background: var(--cell); font: 700 1.125rem/1 var(--font-display); position: relative; }
a.row:hover .t b { background: var(--board-2); }
.row .t b::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--seam); }
.row .t b.c { width: .55em; background: transparent; }
.row .t b.c::after { display: none; }
.row .t i { font-style: normal; }
.row .ttl { font-weight: 600; font-size: 1rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .who, .row .src { color: var(--white-soft); font-size: .9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .rem { font: 700 1.0625rem/1.3 var(--font-display); letter-spacing: .01em; }
.row .rem-note { display: block; font: 600 .8125rem/1.2 var(--font-sans); letter-spacing: 0; margin-top: 2px; opacity: .85; }
.row .rem.emp { background: var(--gold); color: var(--ink); box-shadow: inset 0 3px 0 var(--gold-2); }
.row .flag { display: inline-block; margin-right: 8px; padding: 0 7px; background: var(--paper); color: var(--navy); font: 700 .875rem/1.5 var(--font-display); letter-spacing: .01em; vertical-align: 1px; }
.row .flag-new { background: var(--gold); }
.row-focus > .ttl, .row-focus > .t { background: color-mix(in srgb, var(--gold) 14%, var(--board-2)); }
.board-foot { margin-top: 14px; font-size: .9375rem; color: var(--white-soft); max-width: 70ch; }
.js .rows .row:not(.in) { opacity: 0; }

@media (max-width: 1100px) {
  .board-head, .row { grid-template-columns: 92px minmax(0, 1.6fr) minmax(0, 1.2fr) 150px; }
  .board-head span:nth-child(4), .row .src { display: none; }
}
@media (max-width: 860px) {
  .board-head { display: none; }
  .row { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "t rem" "ttl ttl" "who who"; gap: 0; background: var(--board-2); border-top: 3px solid var(--gold); }
  .row > *, .row .rem.emp { box-shadow: none; }
  .row .t { grid-area: t; } .row .rem { grid-area: rem; justify-self: end; align-self: center; }
  .row .ttl { grid-area: ttl; white-space: normal; padding-bottom: 2px; } .row .who { grid-area: who; white-space: normal; padding-top: 0; }
  .row > * { padding: 10px 12px; }
  .rows .row:nth-child(n+6) { display: none; }
}
@media (max-width: 520px) { .flap { width: .6em; } }

/* ---- the home page of the app: the board of the selected search profile ---- */
.hall-app {
  /* a navy field in both themes, so every token inside reads as on dark */
  --text: var(--paper); --muted: var(--white-soft); --border: var(--line-dark); --field-border: var(--field-line);
  --surface-2: var(--cell); --panel: var(--board-2); --accent-ink: var(--gold); --bg: var(--navy);
  background: var(--navy); color: var(--paper); border-top: 6px solid var(--gold);
  padding: 28px clamp(16px, 3vw, 40px) 32px; margin: 28px 0 48px;
}
.hall-app .profile-switcher { margin-bottom: 24px; }
.hall-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.hall-status { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: .9375rem; color: var(--white-soft); }
.hall-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.75rem, 6vw, 5.25rem); line-height: .95; letter-spacing: -0.025em; color: var(--paper); text-wrap: balance; }
.hall-sub { margin: 12px 0 0; color: var(--white-soft); }
.hall-new { color: var(--gold); font-weight: 700; }
.hall-lead { max-width: 52ch; margin: 20px 0 0; font-size: 1.2rem; line-height: 1.5; }
.hall-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hall-first .hall-actions { margin-top: 28px; }
.hall-actions form { margin: 0; }
.counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px 40px; margin-top: 32px; }
.count { display: flex; align-items: center; gap: 18px; color: var(--paper); text-decoration: none; }
.count-slot { font-family: var(--font-display); font-size: clamp(2.75rem, 5vw, 4.25rem); line-height: 1; flex: none; }
.count-cap { max-width: 30ch; font-size: 1rem; line-height: 1.35; color: var(--white-soft); }
a.count:hover { color: var(--paper); }
a.count:hover .count-cap { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.hall-alert { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 28px 0 0; padding: 12px 16px; background: color-mix(in srgb, var(--gold) 12%, var(--board-2)); border-top: 3px solid var(--gold); }
.hall-alert a, .hall-link { color: var(--gold); font-weight: 600; }
.board-empty { margin: 0; padding: 28px 18px; background: var(--board-2); border-top: 3px solid var(--gold); color: var(--white-soft); }
.hall-foot { display: flex; flex-wrap: wrap; gap: 10px 36px; align-items: center; max-width: none; }
.hall-foot-item { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.hall-foot-item b { color: var(--paper); font-weight: 600; }
.hall-app .logo-attribution { margin: 14px 0 0; color: var(--white-soft); }
html[data-theme] .hall-app .btn:hover { background: var(--cell); border-color: var(--paper); color: var(--paper); }
html[data-theme] .hall-app .btn { --field-border: var(--field-line); }
html[data-theme] .hall-app .btn-primary, html[data-theme] .hall-app .btn-primary:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
html[data-theme] .hall-app .btn-primary:hover { background: var(--gold-2); border-color: var(--gold-2); }
html[data-theme="light"] .hall-app .profile-switcher-item { color: var(--white-soft); }
html[data-theme="light"] .hall-app .profile-switcher-item:hover { color: var(--paper); }
html[data-theme="light"] .hall-app .profile-switcher-item.is-active { color: var(--paper); box-shadow: inset 0 -3px 0 var(--gold); }
html[data-theme] .hall-app a:focus-visible, html[data-theme] .hall-app button:focus-visible { outline-color: var(--gold); }
@media (max-width: 860px) {
  .hall-head { align-items: flex-start; }
  .counts { grid-template-columns: 1fr; }
}
