/* AI jobs board section styles (prototype/jobs/section.css).
   1. Page-level guards (no smooth scroll on touch or phones).
   2. Role tiles with the share bar (the quiet signature: bars draw in once, desktop only).
   3. Filter bar extras: Remote only switch and sort toolbar above the list, date chips row, More filters,
      active filter chips.
   4. Job list: a card grid (3, 2, 1 across), equal-height cards, Apply pinned to the card foot.
   5. Aside (board status and how-it-works note), pager, back to top, empty state, filter sheet.
   6. Tablet and phone layouts (tablet: 2 cards across; phone: 1 card across, nothing sticky).
   7. Reduced motion.
   Colors only from --aii-* and --rh-* tokens. Hover styles only for (hover: hover) and (pointer: fine). */

/* 1. Page-level guards */
@media (hover: none), (pointer: coarse), (max-width: 780px) {
  html { scroll-behavior: auto !important; }
}
.jb-app { overflow-wrap: anywhere; }

.jb-head__meta { gap: 4px 20px; }

/* 2. Role tiles */
.jb-roles {
  margin: 0 0 var(--rh-8);
}
.jb-roles__title {
  margin-bottom: var(--rh-5);
}
.jb-tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* Desktop: 5 across (10 families = 2 full rows). Counts that would leave 1 or 2 tiles alone on the last row
     switch to 3 or 4 across below. Tablet and phone: 2 across, an odd last tile spans the row. */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.jb-tiles:has(> li:last-child:nth-child(6)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jb-tiles:has(> li:last-child:nth-child(7)),
.jb-tiles:has(> li:last-child:nth-child(8)),
.jb-tiles:has(> li:last-child:nth-child(-n+4)),
.jb-tiles:has(> li:last-child:nth-child(11)),
.jb-tiles:has(> li:last-child:nth-child(12)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.jb-tiles > li {
  min-width: 0;
  display: flex;
}
.jb-tile {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  row-gap: 10px;
  width: 100%;
  min-height: 148px;
  padding: 18px 20px 20px;
  border-radius: var(--rh-r-box);
  background: #ffffff;
  border: 1px solid rgba(220, 215, 205, 0.85);
  box-shadow: 0 6px 18px -12px rgba(36, 26, 32, 0.16);
  color: var(--aii-ink);
  text-decoration: none;
  transition: transform var(--dur-base) var(--ease-reveal), border-color var(--dur-fast),
    box-shadow var(--dur-base) var(--ease-reveal), background var(--dur-fast);
}
.jb-tile__label {
  padding-right: 26px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-wrap: balance;
  transition: color var(--dur-fast);
}
.jb-tile__count {
  align-self: end;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-size: 13px;
  color: var(--aii-muted);
}
.jb-tile__n {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--aii-ink);
  font-variant-numeric: tabular-nums;
}
.jb-tile__noun { font-weight: 600; }
.jb-tile__bar {
  display: block;
  height: 6px;
  border-radius: 6px;
  background: rgba(194, 96, 60, 0.14);
  overflow: hidden;
}
.jb-tile__fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--aii-terra), var(--aii-button));
  transform-origin: left center;
  transform: scaleX(var(--share, 0));
}
.jb-tile__arrow {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 18px;
  height: 18px;
  color: var(--aii-terra);
  opacity: 0.55;
  transition: transform var(--dur-base) var(--ease-reveal), opacity var(--dur-fast);
}
@media (hover: hover) and (pointer: fine) {
  .jb-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(194, 96, 60, 0.5);
    background: var(--aii-card);
    box-shadow: 0 14px 28px -16px rgba(163, 77, 44, 0.35);
  }
  .jb-tile:hover .jb-tile__arrow { transform: translateX(3px); opacity: 1; }
  .jb-tile:hover .jb-tile__label { color: var(--aii-button); }
}
.jb-tile:active { transform: translateY(-1px); }
.jb-tile:focus-visible {
  outline: 3px solid var(--aii-terra);
  outline-offset: 3px;
  border-color: rgba(194, 96, 60, 0.5);
}

/* Role page: "Other roles" sits after the list */
.jb-layout + .jb-roles {
  margin: var(--rh-8) 0 0;
}

/* Layout: results column and the aside */
.jb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--rh-6);
  align-items: start;
}
/* The card grid, toolbar, pager and aside span the same width as the role tiles; the filter form keeps its
   920px reading width. The aside follows the list as a calm band. */
.jb-layout { max-width: none; }
.jb-filters { max-width: 920px; }
.jb-results { min-width: 0; }
.jb-results__title {
  margin-bottom: var(--rh-4);
}
.jb-results__title:focus { outline: none; }
.jb-results__title:focus-visible {
  outline: 3px solid var(--aii-terra);
  outline-offset: 3px;
}

/* 3. Filter bar extras */
.jb-filters { margin-bottom: var(--rh-4); }
.jb-filters [data-jb-clear][hidden] { display: none; }
.jb-filters__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--rh-4);
}
.jb-search { flex: 1 1 320px; }
.jb-sheet-btn { display: none; }

/* Remote only switch: native checkbox, visible text label, 44px target */
.jb-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px 0 8px;
  border-radius: var(--rh-r-chip);
  border: var(--silver-border);
  background: var(--aii-card);
  color: var(--aii-ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.jb-switch__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.jb-switch__track {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 28px;
  border-radius: 999px;
  background: #e9dfd2;
  box-shadow: inset 0 0 0 1px rgba(110, 93, 82, 0.28);
  transition: background var(--dur-base) var(--ease-reveal);
}
.jb-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(36, 26, 32, 0.22);
  transition: transform var(--dur-base) var(--ease-reveal);
}
.jb-switch__thumb::after {
  content: "";
  position: absolute;
  left: 7.5px;
  top: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--aii-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0.4);
  opacity: 0;
  transition: transform var(--dur-base) var(--ease-reveal), opacity var(--dur-fast);
}
.jb-switch__input:checked + .jb-switch__track { background: var(--aii-ink); box-shadow: none; }
.jb-switch__input:checked + .jb-switch__track .jb-switch__thumb { transform: translateX(16px); }
.jb-switch__input:checked + .jb-switch__track .jb-switch__thumb::after { opacity: 1; transform: rotate(45deg) scale(1); }
.jb-switch:has(.jb-switch__input:checked) { border-color: var(--aii-ink); }
.jb-switch__input:focus-visible + .jb-switch__track {
  outline: 3px solid var(--aii-terra);
  outline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
  .jb-switch:hover { border-color: var(--aii-terra); background: var(--aii-linen); }
}

/* Toolbar right above the list: the Remote only toggle (same state as the filters, remote=1) and the sort */
.jb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 var(--rh-3);
}
.jb-switch--lead {
  min-height: 48px;
  padding-right: 20px;
  font-size: 15px;
  background: #ffffff;
  border: 1px solid rgba(194, 96, 60, 0.35);
}
.jb-switch--lead:has(.jb-switch__input:checked) { background: var(--aii-peach); border-color: var(--aii-ink); }
.jb-sort { display: none; }
.rh-js-ready .jb-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: var(--rh-r-chip);
  border: var(--silver-border);
  background: var(--aii-card);
}
.jb-sort__label {
  padding: 0 8px 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--aii-muted);
}
.jb-seg { position: relative; display: inline-flex; }
.jb-seg input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.jb-seg label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--rh-r-chip);
  font-size: 14px;
  font-weight: 600;
  color: var(--aii-ink);
  cursor: pointer;
  user-select: none;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.jb-seg input:checked + label { background: var(--aii-ink); color: #ffffff; }
.jb-seg input:focus-visible + label { outline: 3px solid var(--aii-terra); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .jb-seg input:not(:checked) + label:hover { background: var(--aii-linen); color: var(--aii-button); }
}
.jb-sort-note {
  margin: 0 0 var(--rh-3);
  padding: 10px 14px;
  border-left: 3px solid var(--aii-terra);
  border-radius: 0 10px 10px 0;
  background: var(--aii-linen);
  font-size: 14px;
  line-height: 1.5;
  color: var(--aii-text);
}
.jb-sort-note[hidden] { display: none; }

/* Date chips row */
.jb-dates { margin-bottom: 4px; }

/* More filters (desktop disclosure) */
.jb-more { margin-top: var(--rh-3); }
.jb-more summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--rh-r-chip);
  border: var(--silver-border);
  background: var(--aii-card);
  font-size: 14px;
  font-weight: 700;
  color: var(--aii-ink);
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.jb-more summary::-webkit-details-marker { display: none; }
.jb-more summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin: -3px 0 0 2px;
  border: solid var(--aii-terra);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform var(--dur-base) var(--ease-reveal);
}
.jb-more[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.jb-more summary:focus-visible { outline: 3px solid var(--aii-terra); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .jb-more summary:hover { border-color: var(--aii-terra); background: var(--aii-linen); }
}
.jb-more__n:empty { display: none; }
.jb-more__n {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--aii-ink);
  color: #ffffff;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.jb-more__body {
  padding: var(--rh-4) 0 var(--rh-1);
  gap: 20px 32px;
}

/* Active filter chips (each removes one filter) */
.jb-active {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--rh-4);
}
.jb-active[hidden] { display: none; }
.jb-remove {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  max-width: 100%;
  padding: 0 12px 0 16px;
  border-radius: var(--rh-r-chip);
  border: 1px solid rgba(194, 96, 60, 0.35);
  background: var(--aii-peach);
  color: var(--aii-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.jb-remove span { overflow-wrap: anywhere; }
.jb-remove svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--aii-rust);
}
@media (hover: hover) and (pointer: fine) {
  .jb-remove:hover { border-color: var(--aii-terra); background: var(--aii-blush); }
}
.jb-remove:focus-visible { outline: 3px solid var(--aii-terra); outline-offset: 3px; }

.jb-count { font-size: 14px; }
.jb-count:focus { outline: none; }
.jb-count:focus-visible { outline: 3px solid var(--aii-terra); outline-offset: 3px; border-radius: 6px; }
[data-jb-count-n] {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* 4. Job list: a card grid (3 across on desktop, 2 on tablets, 1 on phones). Cards in one row share a height:
   title, then company, key facts and posted time, then salary and the role chip; the source line and Apply sit
   at the card foot so they line up across the row. */
.jb-board {
  position: relative;
  transition: opacity var(--dur-fast);
}
.jb-board[aria-busy="true"] .jb-list { opacity: 0.45; }
.jb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  transition: opacity var(--dur-fast);
}
.jb-list:empty { display: none; }
.jb-row {
  min-width: 0;
  display: flex;
}
.jb-job {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  padding: 20px 20px 18px;
  border-radius: var(--rh-r-box);
  background: #ffffff;
  border: 1px solid rgba(220, 215, 205, 0.85);
  box-shadow: 0 6px 18px -12px rgba(36, 26, 32, 0.16);
  transition: border-color var(--dur-base) var(--ease-reveal), box-shadow var(--dur-base) var(--ease-reveal);
}
.jb-job::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(247, 221, 205, 0.5), rgba(244, 237, 226, 0.2) 55%, rgba(244, 237, 226, 0));
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-reveal);
  pointer-events: none;
}
.jb-job > * { position: relative; }
@media (hover: hover) and (pointer: fine) {
  .jb-job:hover { border-color: rgba(194, 96, 60, 0.35); box-shadow: 0 14px 28px -18px rgba(36, 26, 32, 0.28); }
  .jb-job:hover::before { opacity: 1; }
}
.jb-job:focus-within { border-color: rgba(194, 96, 60, 0.45); }
/* Each card takes two rows of the list grid (content, foot) through subgrid, so the source line and Apply start
   at the same height in every card of a row. Without subgrid the cards still share a height (flex fallback). */
@supports (grid-template-rows: subgrid) {
  .jb-row,
  .jb-job {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
}
.jb-body {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.jb-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--aii-ink);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
/* Company on its own line under the title, then the key facts, then the posted time. The dot before the first
   fact and before the time is hidden (screen readers still hear the comma). */
.jb-meta {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--aii-muted);
}
.jb-mi { white-space: nowrap; }
.jb-mi--wrap { white-space: normal; overflow-wrap: anywhere; }
.jb-mi--co {
  display: block;
  margin-bottom: 6px;
  color: var(--aii-ink);
  font-size: 15px;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
}
.jb-mi--co + .jb-mi > .jb-sep,
.jb-mi--date > .jb-sep { display: none; }
.jb-mi--date {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  white-space: normal;
}
.jb-sep {
  display: inline-block;
  margin: 0 7px;
  color: var(--aii-terra);
  font-weight: 700;
}
.jb-new {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 6px;
  padding: 1px 9px 1px 8px;
  border-radius: 999px;
  background: var(--aii-peach);
  color: var(--aii-rust);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.6;
  vertical-align: 1px;
}
.jb-new::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aii-terra);
}
.jb-new[hidden] { display: none; }
/* Full date: for screen readers on desktop (hover shows it too), visible on phones */
.jb-full {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.jb-pay {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--aii-ink);
  overflow-wrap: anywhere;
}
.jb-pay__icon { color: var(--aii-terra); flex-shrink: 0; }
.jb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
}
.jb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 11px;
  border-radius: var(--rh-r-chip);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}
.jb-chip--role {
  background: var(--aii-linen);
  color: var(--aii-ink);
  border: 1px solid rgba(220, 215, 205, 0.95);
}
.jb-chip--easy {
  background: var(--rh-tone-ok-bg);
  color: var(--rh-tone-ok-text);
}
.jb-chip__glyph {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  flex-shrink: 0;
}
.jb-src {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--aii-muted);
}
.jb-src .rh-checked { font-size: 12px; padding: 3px 10px; }
.jb-act {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(36, 26, 32, 0.08);
}
.jb-act .jb-apply { margin-top: auto; }
.jb-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--rh-r-chip);
  background: var(--aii-button);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 18px -10px rgba(163, 77, 44, 0.75);
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.jb-apply__text { overflow-wrap: anywhere; }
.jb-apply__icon {
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-reveal);
}
@media (hover: hover) and (pointer: fine) {
  .jb-apply:hover { background: var(--aii-ink); }
  .jb-apply:hover .jb-apply__icon { transform: translate(2px, -2px); }
}
.jb-apply:active { transform: scale(0.98); }
.jb-apply:focus-visible { outline: 3px solid var(--aii-terra); outline-offset: 3px; }

/* Empty state */
.jb-empty { margin: 14px 0; }
.jb-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.jb-empty .rh-btn { text-decoration: none; }
.rh-chip.is-zero label { color: var(--aii-muted); }

/* 5. Pager and back to top */
.jb-pager { margin-top: var(--rh-6); text-align: center; }
.jb-pager[hidden] { display: none; }
.jb-pager__status {
  margin: 0 0 var(--rh-3);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aii-rust);
}
.jb-pager .hub-pager { margin-top: 0; }
.jb-pager .hub-pager a { text-decoration: none; }
.jb-pager .hub-pager a:focus-visible { outline: 3px solid var(--aii-terra); outline-offset: 3px; }
.jb-pager .is-off { opacity: 0.45; }
.jb-top { margin: var(--rh-5) 0 0; text-align: center; }
.jb-top a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--aii-rust);
  text-decoration: underline;
  text-decoration-color: rgba(194, 96, 60, 0.45);
  text-underline-offset: 3px;
}

/* Aside: board status and how-it-works note, a band after the list (never sticky) */
.jb-aside {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "total note" "updated note" "link note";
  column-gap: clamp(20px, 4vw, 48px);
  align-items: start;
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--rh-r-card);
  background: linear-gradient(120deg, var(--aii-peach) 0%, var(--aii-clay) 55%, var(--aii-sand) 100%);
  border: 1px solid rgba(194, 96, 60, 0.18);
}
.jb-aside__total { grid-area: total; margin: 0; color: var(--aii-ink); }
.jb-aside__n {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.jb-aside__noun { font-size: 15px; font-weight: 600; }
.jb-aside__updated { grid-area: updated; margin: 6px 0 0; font-size: 13px; color: var(--aii-text); }
.jb-aside .jb-note {
  grid-area: note;
  align-self: center;
  margin: 0;
  background: rgba(255, 250, 243, 0.72);
  font-size: 15px;
  padding: 16px 18px;
}
.jb-aside__link { grid-area: link; margin: 4px 0 0; }
.jb-aside__link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  color: var(--aii-rust);
  text-decoration: underline;
  text-decoration-color: rgba(135, 59, 32, 0.4);
  text-underline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
  .jb-aside__link a:hover { color: var(--aii-ink); }
}

/* Filter sheet close button */
.jb-sheet__close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: var(--silver-border);
  background: var(--aii-card);
  color: var(--aii-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.jb-sheet__close:focus-visible { outline: 3px solid var(--aii-terra); outline-offset: 3px; }

/* 6a. Tablet (781 to 1080px) */
@media (max-width: 1080px) {
  .jb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jb-tiles:has(> li:last-child:nth-child(n)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jb-tiles > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .jb-tile { min-height: 132px; }
  .jb-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

/* 6b. Phones (780px and below) */
@media (max-width: 780px) {
  .jb-roles { margin-bottom: var(--rh-7); }
  .jb-tiles { gap: 10px; }
  .jb-tile {
    padding: 14px 14px 16px;
    row-gap: 8px;
  }
  .jb-tile__label { font-size: 15px; padding-right: 0; }
  .jb-tile__n { font-size: 28px; }
  .jb-tile__count { font-size: 12px; gap: 2px 6px; }
  .jb-tile__arrow { display: none; }
  .jb-tile__bar { height: 5px; }

  .jb-toolbar { gap: 10px; }
  .jb-toolbar .jb-switch--lead { order: 0; flex: 1 1 auto; justify-content: flex-start; }
  .rh-js-ready .jb-sort { flex: 1 1 100%; }
  .jb-seg { flex: 1 1 0; }
  .jb-seg label { width: 100%; justify-content: center; padding: 0 10px; }

  .jb-filters__top { gap: 10px; }
  .jb-search { flex: 1 1 100%; order: 0; }
  .rh-js-ready .jb-sheet-btn { display: inline-flex; order: 1; flex: 1 1 auto; min-height: 48px; }
  .jb-switch { order: 2; flex: 0 1 auto; }
  .jb-more { margin-top: var(--rh-2); }

  .jb-job { padding: 18px 16px 16px; }
  .jb-job::before { display: none; }
  .jb-title {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
  .jb-full {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
  }
  .jb-apply { min-height: 48px; }

  .jb-pager .hub-pager { gap: 6px; }
  .jb-pager .hub-pager a, .jb-pager .hub-pager span { padding: 0 12px; }
  .jb-aside {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "total" "updated" "note" "link";
  }
  .jb-aside .jb-note { margin-top: 16px; }
}

@media (max-width: 600px) {
  .jb-list { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

@media (max-width: 359px) {
  .jb-tiles { grid-template-columns: minmax(0, 1fr); }
  .jb-tiles:has(> li:last-child:nth-child(n)) { grid-template-columns: minmax(0, 1fr); }
  .jb-tiles > li:last-child:nth-child(odd) { grid-column: auto; }
  .jb-sort__label { padding: 0 4px 0 8px; }
  .jb-filters { padding: 14px; }
  .jb-dates .rh-chip label { padding: 0 12px; }
  .jb-switch { flex: 1 1 100%; }
  .jb-pager .hub-pager a, .jb-pager .hub-pager span { min-width: 44px; padding: 0 10px; }
}

/* 7. Reduced motion: no movement anywhere */
@media (prefers-reduced-motion: reduce) {
  .jb-tile, .jb-tile__arrow, .jb-tile__label, .jb-seg label, .jb-apply, .jb-apply__icon, .jb-switch__thumb, .jb-switch__thumb::after,
  .jb-job, .jb-job::before, .jb-more summary::after, .jb-list, .jb-board {
    transition: none !important;
  }
  .jb-tile:hover, .jb-tile:active, .jb-apply:active { transform: none !important; }
  .jb-tile:hover .jb-tile__arrow, .jb-apply:hover .jb-apply__icon { transform: none !important; }
}

/* 8. Rendering cost: below-the-list blocks skip layout and paint until they near the viewport (A12, A16) */
.jb-page .site-footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}
.jb-aside, .jb-page .rh-method, .jb-layout + .jb-roles {
  content-visibility: auto;
  contain-intrinsic-size: auto 260px;
}

/* No double box around the empty state */
.jb-board:has(> .jb-list:empty) {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
}
