/* Job openings (the Careers page): one white card per opening, stacked.
   Card surface matches the service and practitioner tiles (.svcard in
   service-tiles.css): white, hairline border, large radius, small shadow. */

.roles__list { display: grid; gap: var(--sp-5); }

.role {
  background: var(--color-tile-white);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(var(--sp-4), 3vw, var(--sp-6));
  /* Clear of the sticky header when reached on its own address. */
  scroll-margin-top: calc(var(--header-h) + var(--sp-4));
}
.section--tint .role, .section--tint-cool .role { border-color: var(--color-border); }

/* Phone: introduction, quick facts, then the full description.
   Wide: introduction and full description on the left; quick facts and the
   Apply button on the right, staying in view while the role is read. */
.role { display: grid; gap: var(--sp-5); grid-template-areas: "intro" "aside" "more"; }
.role__intro { grid-area: intro; }
.role__aside { grid-area: aside; }
.role__more  { grid-area: more; }
@media (min-width: 62rem) {
  .role {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-areas: "intro aside" "more aside";
    grid-template-rows: auto 1fr;
    column-gap: var(--sp-7);
    row-gap: 0;
  }
  .role__aside { align-self: start; position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
}

.role__type {
  margin: 0 0 var(--sp-1);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--color-eyebrow);
}
.role__title { margin: 0; font-size: var(--fs-h4); color: var(--color-heading); line-height: var(--lh-snug); }
.role__summary { margin-top: var(--sp-3); color: var(--color-text); text-wrap: pretty; }
.role__summary p { margin: 0; }
.role__summary p + p { margin-top: var(--sp-3); }

/* Quick facts and the Apply button: a soft panel beside the introduction. */
.role__aside {
  display: grid;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  /* Half-strength teal tint: the full tint read as a filled block. */
  background: color-mix(in srgb, var(--color-surface-cool) 50%, var(--color-tile-white));
  border-radius: var(--radius-md);
}
.role__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.role__facts li { display: flex; gap: var(--sp-2); align-items: flex-start; font-size: var(--fs-sm); color: var(--color-text-strong); }
.role__fact-mark { flex: none; margin-top: 0.2em; color: var(--color-link); }
.role__apply { justify-self: start; }

/* "Read the full role" */
.role__more { border-top: 1px solid var(--color-divider); }
@media (min-width: 62rem) { .role__more { margin-top: var(--sp-5); } }
.role__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  padding: var(--sp-1) 0;
  font-weight: var(--fw-semi);
  color: var(--color-link);
  cursor: pointer;
  list-style: none;
}
.role__toggle::-webkit-details-marker { display: none; }
.role__toggle:hover { color: var(--color-link-hover); text-decoration: underline; }
.role__toggle:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: var(--radius-sm); }
.role__toggle-mark { transition: transform var(--transition); }
.role__toggle-open { display: none; }
.role__more[open] .role__toggle-open { display: inline; }
.role__more[open] .role__toggle-closed { display: none; }
.role__more[open] .role__toggle-mark { transform: rotate(180deg); }

/* The full description. */
.role__parts { margin-top: var(--sp-5); }
.role__part { margin-bottom: var(--sp-5); }
.role__part-title { margin: 0 0 var(--sp-2); font-size: var(--fs-h6); color: var(--color-heading); line-height: var(--lh-snug); }
.role__part p { margin: 0 0 var(--sp-3); }
.role__part ul, .role__part ol { margin: 0 0 var(--sp-3); padding-left: 1.25em; }
.role__part li + li { margin-top: var(--sp-1); }
.role__part > :last-child { margin-bottom: 0; }
.role__part a { color: var(--color-link); font-weight: var(--fw-semi); overflow-wrap: anywhere; }

@media print {
  .role__toggle { display: none; }
}
