:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #66716b;
  --line: #dfe5e1;
  --surface: #ffffff;
  --canvas: #f4f6f4;
  --accent: #16644a;
  --accent-soft: #e9f3ee;
  --closed: #7a3e3e;
  --closed-soft: #f7eceb;
  --shadow: 0 1px 2px rgb(23 33 28 / 5%), 0 12px 32px rgb(23 33 28 / 6%);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgb(22 100 74 / 7%), transparent 30rem),
    var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

.page-shell {
  width: min(100% - 2rem, 78rem);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 7vw, 6rem);
}

.job-table-wrapper,
.job-table,
.job-table tbody,
.job-table tr,
.job-table td {
  display: block;
}

.job-table {
  width: 100%;
  border: 0;
  border-collapse: collapse;
}

.job-table caption {
  display: block;
  max-width: 21ch;
  margin-bottom: clamp(2rem, 5vw, 3.75rem);
  color: var(--ink);
  font-size: clamp(2.2rem, 6vw, 4.75rem);
  font-weight: 670;
  letter-spacing: -0.055em;
  line-height: 1.02;
  text-align: left;
}

.job-table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.job-table tbody {
  counter-reset: vacancies;
}

.job-table tbody tr {
  position: relative;
  margin-bottom: 1rem;
  overflow: hidden;
  counter-increment: vacancies;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  box-shadow: var(--shadow);
}

.job-table tbody tr::before {
  content: "0" counter(vacancies);
  position: absolute;
  top: 1.25rem;
  right: 1.4rem;
  color: #aab2ad;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.job-table td {
  padding: 1.2rem 1.35rem;
  border-bottom: 1px solid var(--line);
}

.job-table td:last-child {
  border-bottom: 0;
}

.job-table td::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.job-table td:first-child {
  padding-right: 4rem;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

.job-table td:first-child::before {
  display: none;
}

.job-table td:nth-child(2) strong {
  display: block;
  max-width: 30ch;
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin-top: 0.8rem;
  padding: 0.26rem 0.65rem;
  color: var(--closed);
  background: var(--closed-soft);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-transform: uppercase;
}

.status::before {
  width: 0.38rem;
  height: 0.38rem;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.job-table td:nth-child(5) {
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.job-table small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 450;
  line-height: 1.5;
}

.job-table a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0;
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.job-table a + a {
  border-top: 1px solid var(--line);
}

.job-table a::after {
  content: "↗";
  flex: 0 0 auto;
  font-size: 1.15rem;
  font-weight: 400;
  transition: transform 160ms ease;
}

.job-table a:hover {
  text-decoration: underline;
}

.job-table a:hover::after {
  transform: translate(0.12rem, -0.12rem);
}

.job-table a:focus-visible {
  border-radius: 0.25rem;
  outline: 3px solid rgb(22 100 74 / 30%);
  outline-offset: 3px;
}

@media (min-width: 48rem) {
  .page-shell {
    width: min(100% - 4rem, 78rem);
  }

  .job-table tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: start;
  }

  .job-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
  }

  .job-table td {
    padding: 1.35rem 1.5rem;
  }

  .job-table td:first-child,
  .job-table td:nth-child(2),
  .job-table td:nth-child(3),
  .job-table td:nth-child(4) {
    grid-column: 1 / -1;
  }

  .job-table td:nth-child(5) {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .job-table td:nth-child(6) {
    border-bottom: 0;
  }
}

@media (min-width: 70rem) {
  .job-table tbody {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .job-table tbody tr {
    grid-column: span 6;
  }

  .job-table tbody tr:nth-child(1),
  .job-table tbody tr:nth-child(4),
  .job-table tbody tr:nth-child(7) {
    grid-column: span 7;
  }

  .job-table tbody tr:nth-child(2),
  .job-table tbody tr:nth-child(3),
  .job-table tbody tr:nth-child(5),
  .job-table tbody tr:nth-child(6) {
    grid-column: span 5;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .job-table a::after {
    transition: none;
  }
}
