/* ============================================================================
   Careers open-roles table (spec 017). Loaded after an-resources.css on
   /employment-opportunities only; the rest of that page is the Resources
   family (an-rs-*).

   Rows come from the code-owned OpenRoleRoster (synced from Notion by
   /careers-sync). Unlike the comparison table (an-compare.css), which scrolls
   sideways to keep its matrix intact, this table is a list: at phone widths
   each row collapses into a stacked card with its column labels, so the page
   never scrolls horizontally.

   Brand guide applies: DM Sans, hairlines over boxes, radius 12 controls /
   16 cards, no pills. Colours are --an-* tokens only.
   ============================================================================ */

/* Visually hidden but kept in the accessibility tree (caption, and thead on mobile). */
.an-cr-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.an-cr-tablewrap {
  border: 1px solid var(--an-border);
  border-radius: 16px;
  background: var(--an-white);
  overflow: hidden;
}

.an-cr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.an-cr-table th,
.an-cr-table td {
  text-align: left;
  padding: 20px 22px;
  border-bottom: 1px solid var(--an-border);
  vertical-align: top;
  line-height: 1.6;
}
.an-cr-table thead th {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--an-gray-3);
  font-weight: 700;
  background: var(--an-paper);
  padding-block: 14px;
}
.an-cr-table tbody tr:last-child th,
.an-cr-table tbody tr:last-child td { border-bottom: 0; }

.an-cr-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--an-ink);
  letter-spacing: -0.01em;
  width: 26%;
}
.an-cr-summary { color: var(--an-gray-3); }
.an-cr-apply { width: 1%; }

.an-cr-apply__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.an-cr-apply__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  padding: 10px 18px;
  border: 1px solid var(--an-red);
  border-radius: 12px;
  color: var(--an-red);
  background: var(--an-white);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .25s var(--an-ease), color .25s var(--an-ease);
}
.an-cr-apply__btn:hover {
  background: var(--an-red);
  color: #fff;
}
.an-cr-apply__btn:focus-visible {
  outline: 2px solid var(--an-red);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .an-cr-apply__btn { transition: none; }
}

/* ---- Phone widths: each row becomes a stacked card ------------------------ */
@media (max-width: 720px) {
  .an-cr-tablewrap {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }
  .an-cr-table,
  .an-cr-table tbody,
  .an-cr-table tr,
  .an-cr-table th,
  .an-cr-table td { display: block; width: auto; }

  .an-cr-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .an-cr-row {
    border: 1px solid var(--an-border);
    border-radius: 16px;
    background: var(--an-white);
    padding: 22px 20px;
  }
  .an-cr-row + .an-cr-row { margin-top: 16px; }

  .an-cr-table th,
  .an-cr-table td,
  .an-cr-table tbody tr:last-child th,
  .an-cr-table tbody tr:last-child td {
    padding: 0;
    border-bottom: 0;
  }
  .an-cr-summary { margin-top: 10px; }
  .an-cr-apply { margin-top: 18px; }

  .an-cr-summary::before,
  .an-cr-apply::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--an-gray-4);
    margin-bottom: 6px;
  }

  .an-cr-apply__links { flex-direction: row; flex-wrap: wrap; }
  .an-cr-apply__btn { flex: 1 1 160px; padding-block: 12px; }
}
