/* HR — staffing terminal.
   Palette measured off the supplied plates with numpy, not guessed. */

@font-face {
  font-family: "Pixeloid";
  src: url("../fonts/PixeloidSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Sligoil";
  src: url("../fonts/Sligoil-Micro.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Sligoil";
  src: url("../fonts/Sligoil-MicroMedium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Sligoil";
  src: url("../fonts/Sligoil-MicroBold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0d0f0c;
  --bg-2: #111310;
  --bg-3: #171b15;
  --line: #1e2418;
  --line-2: #2c3427;
  /* The edge of anything you can press or type into, kept at 3:1 against the ground. */
  --edge: #5f6a5b;
  /* Texture is the only thing allowed to sit below readable contrast: the corner
     log columns and list bullets carry no information. Everything with words in it
     uses --dim or brighter, which clear 4.5:1 on all three grounds. */
  --texture: #3e4638;
  --dim: #7c8a7e;
  --muted: #8a9689;
  --mid: #9aa29a;
  --bone: #d5dbd3;
  --lime: #a7f007;
  --lime-hot: #cdff05;
  --lime-dim: #6f9e05;
  --amber: #d9a441;

  --gap: 24px;
  --pad: clamp(16px, 3.2vw, 44px);

  --mono: "Sligoil", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pixel: "Pixeloid", "Sligoil", monospace;

  color-scheme: dark;
  font-synthesis: none;
}

*,
*::before,
*::after {
  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(--mid);
  font: 400 15px/1.55 var(--mono);
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The phosphor. A dark screen is never perfectly flat. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.018) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: screen;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 45%, transparent 45%, rgba(0, 0, 0, 0.55) 100%);
  mix-blend-mode: multiply;
}
@media (prefers-reduced-motion: no-preference) {
  .grain {
    animation: flicker 5.5s steps(2, end) infinite;
  }
}
@keyframes flicker {
  0%, 97%, 100% { opacity: 1; }
  98% { opacity: 0.82; }
}

::selection {
  background: var(--lime);
  color: var(--bg);
}

a {
  color: var(--bone);
  text-decoration-color: var(--dim);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--lime);
  text-decoration-color: var(--lime-dim);
}

:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ type */

.pixel {
  font-family: var(--pixel);
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.dim {
  color: var(--dim);
}
.mid {
  color: var(--mid);
}
.bone {
  color: var(--bone);
}
.lime {
  color: var(--lime);
}
.warn {
  color: var(--amber);
}

/* ---------------------------------------------------------------- layout */

.wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* A section is a terminal region: a rule, a name, its content. */
.region {
  padding-block: clamp(40px, 6vw, 84px);
  border-top: 1px solid var(--line);
  position: relative;
  scroll-margin-top: 68px;
}
.region + .region {
  border-top: 1px solid var(--line);
}

.region-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.region-head h2 {
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--bone);
  margin: 0;
  text-transform: uppercase;
}
.region-head .rule {
  flex: 1 1 60px;
  height: 1px;
  background: var(--line-2);
  align-self: center;
}
.region-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 46ch;
}

/* --------------------------------------------------------------- masthead */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 52px;
}
.mast-mark {
  font-family: var(--pixel);
  font-size: 18px;
  color: var(--bone);
  line-height: 1;
}
.mast-name {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mast-spacer {
  flex: 1;
}
.mast-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  min-height: min(620px, calc(100svh - 52px));
  display: grid;
  align-items: center;
  padding-block: clamp(36px, 6vw, 72px);
  overflow: hidden;
}

/* The dim columns behind the lockup are the terminal's own traffic, not decoration. */
.hero-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  mask-image: linear-gradient(to bottom, #000 0 22%, transparent 42% 62%, #000 82% 100%);
}
.hero-noise .col {
  position: absolute;
  font-size: 11px;
  line-height: 1.5;
  color: var(--texture);
  white-space: pre;
  letter-spacing: 0.06em;
}
.hero-noise .col-a { top: 14px; left: 0; }
.hero-noise .col-b { top: 14px; right: 0; text-align: right; }
.hero-noise .col-c { bottom: 14px; left: 0; }
.hero-noise .col-d { bottom: 14px; right: 0; text-align: right; }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: 100%;
}

.lockup {
  display: block;
}
.lockup .line {
  display: block;
  font-family: var(--pixel);
  font-weight: 700;
  color: var(--bone);
  line-height: 0.98;
  letter-spacing: 0;
  font-size: 45px;
}
.tagline {
  margin: 22px 0 0;
  font-size: 13px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--mid);
}
.hero-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

/* Discrete steps: Pixeloid is a 9 px bitmap face and only stays crisp on whole multiples. */
@media (min-width: 560px) {
  .lockup .line { font-size: 63px; }
}
@media (min-width: 900px) {
  .lockup .line { font-size: 81px; }
}
@media (min-width: 1180px) {
  .lockup .line { font-size: 99px; }
}
@media (min-width: 1400px) {
  .lockup .line { font-size: 108px; }
}

/* ------------------------------------------------------------------ frame */

/* Every surface on this site is a terminal frame: a hairline box with its
   corners ticked out, the way the plate draws them. Never a rounded card. */
.frame {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 18px;
}
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  pointer-events: none;
}
.frame::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--line-2);
  border-left: 1px solid var(--line-2);
  box-shadow: inset 1px 1px 0 var(--bg);
}
.frame::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
}
.frame > .frame-title {
  position: absolute;
  top: -7px;
  left: 12px;
  padding-inline: 6px;
  background: var(--bg);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ----------------------------------------------------------- status chips */

.chip {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: none;
  background: var(--muted);
}
.chip.on {
  background: var(--lime);
  box-shadow: 0 0 10px rgba(167, 240, 7, 0.55);
}
.chip.idle {
  background: var(--line-2);
}
.chip.warn {
  background: var(--amber);
}
@media (prefers-reduced-motion: no-preference) {
  .chip.on {
    animation: pulse 1.15s steps(2, end) infinite;
  }
}
@keyframes pulse {
  50% { opacity: 0.42; }
}

/* --------------------------------------------------- active workforce list */

.workforce {
  --pad-y: 16px;
}
.workforce h3 {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.workforce h3 .rule {
  flex: 1;
  height: 1px;
  background: var(--line-2);
}
.wf-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 12px;
  padding-block: 9px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.wf-row .who {
  color: var(--bone);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-row.empty .who {
  color: var(--dim);
}
.wf-row .state {
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}
.wf-row.empty .state {
  color: var(--dim);
}
.wf-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
}
.wf-foot.idle {
  color: var(--dim);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  background: transparent;
  border: 1px solid var(--edge);
  color: var(--bone);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms linear, color 120ms linear, border-color 120ms linear;
}
.btn:hover:not(:disabled) {
  border-color: var(--lime-dim);
  color: var(--lime);
}
.btn:active:not(:disabled) {
  background: rgba(167, 240, 7, 0.08);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  color: var(--dim);
  border-color: var(--line);
  cursor: not-allowed;
}
.btn.primary {
  background: var(--lime);
  border-color: var(--lime);
  color: #0b0f04;
  font-weight: 700;
}
.btn.primary:hover:not(:disabled) {
  background: var(--lime-hot);
  border-color: var(--lime-hot);
  color: #0b0f04;
}
.btn.primary:disabled {
  background: transparent;
  color: var(--dim);
  border-color: var(--line);
}
.btn.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
}
.btn.ghost {
  border-color: transparent;
  color: var(--muted);
}
.btn.ghost:hover {
  color: var(--lime);
}

/* ----------------------------------------------------------------- badges */

/* Eight agents want an even grid: 4 + 4, then 2 + 2 + 2 + 2, then a single file.
   auto-fill would leave a ragged last row at some widths, so the counts are fixed. */
.roster {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 660px) {
  .roster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1180px) {
  .roster {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* An ID badge: a photo window, a punched slot, a status lamp. */
.badge {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2) 42%);
  border: 1px solid var(--line-2);
  padding: 0;
}
.badge::before {
  /* the clip slot punched through the top of every laminated badge */
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 7px;
  background: var(--bg);
  border: 1px solid var(--line-2);
}
.badge-top {
  height: 26px;
  border-bottom: 1px solid var(--line);
}
.badge-body {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 16px;
}
.badge-photo {
  position: relative;
  width: 96px;
  height: 96px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.badge-photo img {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.badge-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 2px);
  pointer-events: none;
}
.badge-id {
  min-width: 0;
}
.badge-code {
  font-family: var(--pixel);
  font-size: 18px;
  color: var(--bone);
  line-height: 1;
  margin-bottom: 8px;
}
.badge-job {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 10px;
}
.badge.busy .badge-job,
.idcard .badge-job {
  color: var(--lime);
}
.badge-grade {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dim);
  text-transform: uppercase;
  line-height: 1.5;
}
.badge-record {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 16px 14px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.badge-record b {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--bone);
  margin-top: 3px;
}
.badge-record .none {
  color: var(--dim);
  font-weight: 400;
}
.badge-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}
.badge-fee {
  flex: 1;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.badge-fee b {
  color: var(--bone);
  font-weight: 700;
}
.badge.busy {
  border-color: var(--lime-dim);
}
.badge.busy .badge-top {
  background: repeating-linear-gradient(90deg, var(--lime-dim) 0 6px, transparent 6px 12px);
  opacity: 0.5;
}

/* ------------------------------------------------------------------ desks */

.floor {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 1000px) {
  .floor {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  }
}

.desks {
  display: grid;
  gap: 12px;
  align-content: start;
}
.desk {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}
.desk.free {
  border-style: dashed;
  border-color: var(--line);
  background: transparent;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  min-height: 74px;
  place-content: center;
  text-align: center;
}
.desk-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.desk-head .name {
  font-family: var(--pixel);
  font-size: 14px;
  color: var(--bone);
}
.desk-head .state {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
}
.desk-sub {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}
.desk-bar {
  height: 4px;
  background: var(--line);
  overflow: hidden;
}
.desk-bar i {
  display: block;
  height: 100%;
  background: var(--lime);
  width: 30%;
}
@media (prefers-reduced-motion: no-preference) {
  .desk-bar i {
    animation: crawl 1.6s linear infinite;
  }
}
@keyframes crawl {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(333%); }
}
.desk-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- journal */

.journal {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 14px 16px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}
.journal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.journal-head .count {
  margin-left: auto;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
/* A tail, not a scroller: the newest lines, and the rest has gone by. */
.journal-lines {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  flex: 1;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.6;
}
.jline {
  display: grid;
  grid-template-columns: 62px 74px 1fr auto;
  gap: 10px;
  align-items: baseline;
  white-space: nowrap;
}
.jline .t {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.jline .who {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.jline .msg {
  color: var(--mid);
  overflow: hidden;
  text-overflow: ellipsis;
}
.jline .ms {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.jline.ok .msg { color: var(--lime); }
.jline.fail .msg { color: var(--amber); }
.jline.sys .msg { color: var(--muted); }
.jline.cache .msg { color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .jline {
    animation: linein 140ms ease-out;
  }
}
@keyframes linein {
  from { opacity: 0; transform: translateY(4px); }
}
.journal-caret {
  display: inline-block;
  width: 8px;
  height: 13px;
  background: var(--lime);
  vertical-align: -2px;
}
@media (prefers-reduced-motion: no-preference) {
  .journal-caret { animation: pulse 1s steps(2, end) infinite; }
}

/* --------------------------------------------------------------- reports */

.reports {
  display: grid;
  gap: var(--gap);
}
.report {
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}
.report-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}
.report-head .code {
  font-family: var(--pixel);
  font-size: 14px;
  color: var(--bone);
}
.report-head .job {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
}
.report-head .when {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.report-subject {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  word-break: break-all;
}
.report-subject b {
  color: var(--bone);
  font-weight: 500;
}

.headline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-bottom: 1px solid var(--line);
}
.headline .cell {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}
.headline .cell:last-child {
  border-right: 0;
}
.headline .k {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.headline .v {
  font-family: var(--pixel);
  font-size: 27px;
  line-height: 1;
  color: var(--bone);
}
.headline .v.lime { color: var(--lime); }
.headline .v.warn { color: var(--amber); }

.verdict {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.verdict.lime { color: var(--lime); }
.verdict.warn { color: var(--amber); }

.table-wrap {
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
table.data caption {
  text-align: left;
  padding: 14px 18px 6px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
table.data th {
  text-align: left;
  padding: 8px 18px;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 8px 18px;
  color: var(--mid);
  border-bottom: 1px solid rgba(30, 36, 24, 0.55);
  white-space: nowrap;
}
table.data tr:last-child td {
  border-bottom: 0;
}
table.data .right {
  text-align: right;
}
table.data tr.dim td {
  color: var(--dim);
}
table.data tr.lime td:first-child,
table.data tr.warn td:first-child {
  color: inherit;
}
table.data td .dir-out { color: var(--amber); }
table.data td .dir-in { color: var(--lime); }
table.data a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--line-2);
}
table.data a:hover {
  color: var(--lime);
  border-bottom-color: var(--lime-dim);
}

.notes {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 7px;
}
.notes p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
}
.notes p::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--texture);
}

.receipts {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--dim);
  display: grid;
  gap: 4px;
}
.receipts .rc {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.receipts .rc b {
  color: var(--muted);
  font-weight: 400;
}

.report-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
}
.report-foot .status {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.report-foot .status.paid { color: var(--lime); }
.report-foot .status.stale { color: var(--amber); }
.report-foot .spacer { flex: 1; }

/* --------------------------------------------------------------- payroll */

.payroll {
  display: grid;
  gap: var(--gap);
}
@media (min-width: 900px) {
  .payroll {
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
    align-items: start;
  }
}
.pay-total {
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  padding: 20px;
  display: grid;
  gap: 6px;
}
.pay-total .k {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.pay-total .v {
  font-family: var(--pixel);
  font-size: 36px;
  line-height: 1;
  color: var(--lime);
}
.pay-total .sub {
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.5;
  margin-top: 8px;
}
.pay-empty {
  color: var(--dim);
  font-size: 13px;
  padding: 22px 0;
}

/* ---------------------------------------------------- employer of record */

.record {
  display: grid;
  gap: var(--gap);
}
@media (min-width: 900px) {
  .record {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }
}
/* The employer's own ID badge. Same object as the staff wear, so the contract
   address sits where an employee number sits, with a real barcode of it. */
.idcard {
  align-self: start;
}
.idcard-photo {
  display: grid;
  place-items: center;
  background: var(--bg);
}
.idcard-photo span {
  font-family: var(--pixel);
  font-size: 27px;
  color: var(--bone);
  line-height: 1;
}
.idcard .badge-code {
  font-size: 16px;
  letter-spacing: 0;
}
.idcard-number {
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--line);
}
.idcard-number .k {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
/* The magstripe band, and the barcode printed into it. */
.idcard-stripe {
  height: 62px;
  margin: 14px 16px;
  padding: 8px 10px;
  background: #070906;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.idcard-stripe svg {
  width: 100%;
  height: 100%;
  display: block;
  color: var(--bone);
}
.stripe-note {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: center;
}
.idcard-foot {
  background: rgba(0, 0, 0, 0.25);
}
.idcard-foot .badge-fee {
  color: var(--dim);
}
.idcard-foot.issued .badge-fee {
  color: var(--lime);
}

.ca-value {
  font-size: clamp(13px, 2.6vw, 17px);
  line-height: 1.5;
  color: var(--bone);
  word-break: break-all;
  overflow-wrap: anywhere;
  user-select: all;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.ca-value.pending {
  color: var(--dim);
  user-select: none;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 13px;
}
.ca-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.ca-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--dim);
  line-height: 1.55;
}
.copy-state {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
}
.copy-state.fail {
  color: var(--amber);
}

.links {
  display: grid;
  gap: 10px;
  align-content: start;
}
.link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--bone);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.link-row:hover {
  border-color: var(--lime-dim);
  color: var(--lime);
}
.link-row svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.link-row .after {
  margin-left: auto;
  color: var(--dim);
  font-size: 11px;
}
.link-row[aria-disabled="true"] {
  color: var(--dim);
  cursor: not-allowed;
  border-style: dashed;
}
.link-row[aria-disabled="true"]:hover {
  border-color: var(--line);
  color: var(--dim);
}

.colophon {
  border-top: 1px solid var(--line);
  padding-block: 26px 40px;
  font-size: 11.5px;
  color: var(--dim);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

/* --------------------------------------------------------------- dialogs */

dialog {
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--mid);
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: min(86svh, 760px);
  overflow: auto;
  font: 400 15px/1.55 var(--mono);
}
dialog::backdrop {
  background: rgba(4, 6, 3, 0.86);
}
.dlg-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  z-index: 2;
}
.dlg-head h3 {
  margin: 0;
  font-family: var(--pixel);
  font-size: 16px;
  color: var(--bone);
  line-height: 1;
}
.dlg-head .close {
  margin-left: auto;
}
.dlg-body {
  padding: 18px;
  display: grid;
  gap: 18px;
}
.dlg-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.dlg-foot .spacer { flex: 1; }

.field {
  display: grid;
  gap: 8px;
}
.field > .k {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input[type="text"],
.field input[type="number"] {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--edge);
  color: var(--bone);
  font: 400 14px/1 var(--mono);
  letter-spacing: 0.02em;
}
.field input::placeholder {
  color: var(--dim);
}
.field input:focus-visible {
  border-color: var(--lime-dim);
}
.field .hint {
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.5;
}
.field .hint.bad {
  color: var(--amber);
}
.presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.preset {
  appearance: none;
  min-height: 36px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--edge);
  color: var(--muted);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.preset:hover {
  border-color: var(--lime-dim);
  color: var(--lime);
}
.preset[aria-pressed="true"] {
  border-color: var(--lime);
  color: var(--lime);
  background: rgba(167, 240, 7, 0.07);
}

.dossier-top {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: start;
}
.dossier-top img {
  width: 120px;
  height: 120px;
  display: block;
  image-rendering: pixelated;
  border: 1px solid var(--line-2);
  background: var(--bg);
}
.dossier p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--mid);
}
.duties {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}
.duties li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
}
.duties li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  background: var(--lime-dim);
}
.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 18px;
  font-size: 12.5px;
}
.kv dt {
  color: var(--dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
}
.kv dd {
  margin: 0;
  color: var(--bone);
}

/* --------------------------------------------------------------- utility */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  background: var(--lime);
  color: #0b0f04;
  padding: 10px 16px;
  font: 700 12px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: top 120ms linear;
}
.skip:focus {
  top: 8px;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 899px) {
  .hero {
    min-height: auto;
    padding-block: 40px 48px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-grid .workforce {
    order: 2;
  }
  .hero-noise {
    mask-image: linear-gradient(to bottom, #000 0 12%, transparent 26%);
    opacity: 0.7;
  }
  .hero-noise .col-c,
  .hero-noise .col-d {
    display: none;
  }
  .headline .cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .headline .cell:last-child {
    border-bottom: 0;
  }
  .dossier-top {
    grid-template-columns: 88px 1fr;
  }
  .dossier-top img {
    width: 88px;
    height: 88px;
  }
}

@media (max-width: 660px) {
  /* The corner log is texture for a wide screen. On a phone it only crowds the
     lockup, and the same lines are already on the floor's journal. */
  .hero-noise {
    display: none;
  }
}

@media (max-width: 440px) {
  .mast-name {
    display: none;
  }
  .masthead .wrap {
    gap: 10px;
  }
  .mast-links .btn {
    white-space: nowrap;
    padding: 0 10px;
  }
}

@media (max-width: 400px) {
  /* 36 px is the next whole multiple of Pixeloid's 9 px body down from 45. */
  .lockup .line {
    font-size: 36px;
  }
}

@media (max-width: 420px) {
  .badge-body {
    grid-template-columns: 72px 1fr;
    gap: 12px;
  }
  .badge-photo {
    width: 72px;
    height: 72px;
  }
  .jline {
    grid-template-columns: 58px 1fr auto;
  }
  .jline .who {
    display: none;
  }
}
