/* Nunavut Jobs – community bulletin board.
   Brand: paper #FFF8E7, ink #121212, flag yellow #FFC61A, star red #D22630. Flat print: rules, no shadows, no gradients. */

@font-face {
  font-family: "Archivo Black";
  src: url("fonts/archivo-black-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #FFF8E7;
  --paper-2: #F6EDD6;           /* paper with a touch of ink: toolbar, column header */
  --ink: #121212;
  --ink-60: rgba(18, 18, 18, .68);
  --ink-12: rgba(18, 18, 18, .12);
  --flag: #FFC61A;
  --star: #D22630;

  --display: "Archivo Black", "Arial Black", "Arial Bold", Arial, sans-serif;
  --text: "Space Grotesk", Arial, "Helvetica Neue", Helvetica, sans-serif;

  --pad: 16px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.4 var(--text);
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.star { display: inline-block; width: .62em; height: .78em; fill: var(--star); vertical-align: -.04em; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, .soon-toggle:focus-within {
  outline: 3px solid var(--flag);
  outline-offset: 2px;
}

/* ---------- Masthead ---------- */
.mast { border-bottom: 6px solid var(--ink); }
.mast-strip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 8px;
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 500;
}
.mast-strip span { color: var(--ink-60); }
.mast-main {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "logo title" "count count";
  align-items: center;
  column-gap: 14px;
  padding: 16px 0 0;
}
.mast-logo {
  grid-area: logo;
  width: 76px; height: 76px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--paper);
  display: block;
}
.mast-title { grid-area: title; min-width: 0; }
h1 {
  margin: 0;
  font: 400 clamp(38px, 11.5vw, 84px)/.88 var(--display);
  text-transform: uppercase;
  letter-spacing: -.01em;
}
h1 span { display: block; }
.tagline { margin: 8px 0 0; font-size: 15px; font-weight: 500; }
.count {
  grid-area: count;
  margin: 16px calc(var(--pad) * -1) 0;
  padding: 10px var(--pad);
  border-top: 2px solid var(--ink);
  font-size: 15px;
  font-weight: 500;
}
.count b { font: 400 22px/1 var(--display); }

@media (min-width: 900px) {
  .mast-main {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo title count";
    column-gap: 22px;
    padding: 22px 0 24px;
  }
  .mast-logo { width: 104px; height: 104px; }
  h1 span { display: inline; }
  .tagline { font-size: 17px; }
  .count {
    margin: 0;
    padding: 0 0 0 22px;
    border-top: 0;
    border-left: 2px solid var(--ink);
    text-align: left;
    line-height: 1.25;
    font-size: 16px;
  }
  .count span { display: block; }
  .count b { font-size: 40px; }
  .count .count-2 { margin-top: 4px; }
  .count .count-2 b { font-size: 22px; }
}

/* ---------- Board tools (sticky) ---------- */
.tools {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper-2);
  border-bottom: 2px solid var(--ink);
}
.tools-inner { padding-top: 10px; padding-bottom: 10px; }
.tools-row { display: flex; gap: 8px; }
.search { flex: 1; min-width: 0; }
input[type="search"], select, .filters-btn, .clear, .soon-toggle {
  font: 500 16px/1.2 var(--text);   /* 16px stops iOS zooming */
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 0;
  min-height: 44px;
}
input[type="search"] {
  width: 100%;
  padding: 10px 12px;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}
input[type="search"]::placeholder { color: var(--ink-60); }
.filters-btn, .clear {
  background: var(--paper);
  padding: 0 14px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}
.filters-btn[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.filters-n {
  display: inline-block;
  min-width: 20px;
  margin-left: 6px;
  padding: 2px 5px;
  background: var(--flag);
  color: var(--ink);
  font-size: 13px;
  text-align: center;
}
.filters-n[hidden] { display: none; }
.filters {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 8px;
}
.filters.open { display: grid; }
.pick { display: block; min-width: 0; }
.pick:first-child { grid-column: 1 / -1; }
select {
  width: 100%;
  padding: 10px 34px 10px 10px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0h12L6 8z' fill='%23121212'/%3E%3C/svg%3E") no-repeat right 11px center;
  -webkit-appearance: none;
  appearance: none;
  text-overflow: ellipsis;
}
select.is-set { background-color: var(--flag); font-weight: 700; }
.soon-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--paper);
  cursor: pointer;
  font-weight: 700;
  user-select: none;
}
.soon-toggle input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 18px; height: 18px;
  margin: 0;
  border: 2px solid var(--ink);
  background: #fff;
}
.soon-toggle input:checked { background: var(--star); border-color: var(--star); box-shadow: inset 0 0 0 3px #fff; }
.soon-toggle:has(input:checked) { border-color: var(--star); color: var(--star); }
.soon-toggle input:focus-visible { outline: none; }

@media (min-width: 900px) {
  .tools-inner { display: flex; gap: 8px; }
  .tools-row { flex: 1 1 300px; }
  .filters-btn { display: none; }
  .filters, .filters.open {
    display: flex;
    flex: 3 1 auto;
    padding-top: 0;
    gap: 8px;
  }
  .pick { flex: 1 1 0; }
}

/* ---------- The board ---------- */
main { padding-top: 0; padding-bottom: 40px; }
.board-cols { display: none; }

.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 0;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--ink);
  font: 400 17px/1.1 var(--display);
}
.group-head small { font: 500 14px var(--text); color: var(--ink-60); white-space: nowrap; }

.job {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title title"
    "emp   emp"
    "where where"
    "close apply";
  column-gap: 12px;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--ink-12);
}
.job.soon::before {               /* red tab in the margin, like a flagged notice */
  content: "";
  position: absolute;
  left: calc(var(--pad) * -1);
  top: 14px; bottom: 16px;
  width: 5px;
  background: var(--star);
}
.job-title {
  grid-area: title;
  margin: 0;
  font: 700 18px/1.2 var(--text);
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.job-emp { grid-area: emp; margin: 3px 0 0; color: var(--ink-60); font-size: 15px; font-weight: 500; }
.job-where { grid-area: where; margin: 8px 0 0; font-size: 15px; }
.job-where .sep { color: var(--ink-60); padding: 0 6px; }
.job-type-col { display: none; }
.job-close { grid-area: close; align-self: center; margin-top: 12px; font-size: 14px; }
.job-close .date { display: block; font-weight: 700; }
.job-close .left { color: var(--star); font-weight: 700; }

.badge {
  display: inline-block;
  padding: 4px 7px 3px;
  font: 700 12px/1.1 var(--text);
  letter-spacing: .02em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  white-space: nowrap;
}
.badge-open { background: var(--flag); }
.badge-soon { background: var(--star); border-color: var(--star); color: #fff; margin-bottom: 4px; }

.apply {
  grid-area: apply;
  align-self: end;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--flag);
  color: var(--ink);
  border: 2px solid var(--ink);
  font: 700 16px/1 var(--text);
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);   /* printed offset, not a soft shadow */
  transition: transform .08s ease, box-shadow .08s ease;
}
.apply:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
@media (hover: hover) {
  .apply:hover { background: var(--ink); color: var(--flag); }
  .filters-btn:hover, .clear:hover { background: var(--ink); color: var(--paper); }
}
@media (prefers-reduced-motion: reduce) {
  .apply { transition: none; }
}

.empty {
  margin: 28px 0;
  padding: 28px 16px;
  border: 2px dashed var(--ink);
  text-align: center;
}
.empty p { margin: 0 0 14px; font: 400 18px/1.25 var(--display); }

@media (min-width: 900px) {
  .board-cols, .job {
    display: grid;
    grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.35fr) minmax(0, 1fr) 168px 112px;
    column-gap: 20px;
  }
  .board-cols {
    margin-top: 22px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ink);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-60);
  }
  .group-head { margin-top: 26px; }
  .board-cols + #board .group-head:first-child { margin-top: 10px; }
  .job {
    grid-template-areas:
      "title where type close apply"
      "emp   where type close apply";
    grid-template-rows: auto 1fr;
    align-items: start;
    padding: 14px 0;
  }
  .job:hover { background: rgba(255, 198, 26, .14); }
  .job.soon::before { left: -14px; top: 14px; bottom: 14px; }
  .job-where { margin: 0; }
  .job-where .sep, .job-where .type-inline { display: none; }
  .job-type-col { display: block; grid-area: type; margin: 0; font-size: 15px; }
  .job-close { margin-top: 0; align-self: start; }
  .apply { margin-top: 0; align-self: start; justify-self: end; }
}

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: var(--paper); }
.foot-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 36px;
}
.foot-star { width: 26px; height: 32px; margin-top: 2px; }
.foot p { margin: 0 0 12px; max-width: 62ch; }
.foot-lead { font-size: 16px; font-weight: 500; }
.foot a { color: var(--flag); font-weight: 700; text-underline-offset: 3px; }
.foot-small { font-size: 13px; opacity: .75; }
