/* Volunteer roster and career directory. Loaded only by /volunteer/ and /careers/, after
   site.css, under a versioned URL (VOLUNTEER_CSS_V in tools/build-site.py). Everything these
   two pages need beyond the shared tokens and components is here, so a browser holding an
   older site.css still gets the full layout. Bump the version whenever this file changes. */

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

/* ---- Page head, shared by both directories ------------------------------------------- */
.volunteer-head > p { max-width: 74ch; text-wrap: pretty; }
.volunteer-head > p:not(.lead) { color: var(--ink-2); }
.volunteer-head > p + p { margin-block-start: 12px; }
.volunteer-head > p.lead { max-width: 62ch; }
.volunteer-head .mark a { color: inherit; text-decoration: none; }
.volunteer-head .mark a:hover { text-decoration: underline; }

/* Roster / by career: the same two-way switch on both pages. */
.volunteer-switch { display: inline-grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; max-width: 100%; margin-block: 26px 22px; padding: 4px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.volunteer-switch a { display: grid; gap: 1px; min-height: 52px; align-content: center; padding: 8px 18px; border: 1px solid transparent; border-radius: 12px; color: var(--ink-2); text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.volunteer-switch strong { font-weight: 650; font-size: .95rem; line-height: 1.3; color: var(--ink); }
.volunteer-switch span { font: 500 .7rem/1.4 var(--mono); letter-spacing: .02em; color: var(--muted); }
.volunteer-switch a:hover { background: var(--surface); }
.volunteer-switch a[aria-current="page"] { background: var(--surface); border-color: var(--line-2); }
.volunteer-switch a[aria-current="page"] strong { color: var(--accent); }

/* Workstream jump links: the whole pill is the link. */
.workstreams { margin-block-start: 28px; padding-block-start: 20px; border-top: 1px solid var(--line); }
.workstreams-label { font: 500 .72rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.workstreams .tags { gap: 8px; margin-top: 12px; }
.workstreams .tags li { padding: 0; border: 0; background: none; font-size: .86rem; }
.workstreams .tags a { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); color: var(--ink-2); text-decoration: none; transition: border-color .15s, color .15s, background .15s; }
.workstreams .tags a:hover { border-color: var(--accent); background: var(--surface); color: var(--ink); }
.workstreams .tags li:first-child a { border-color: color-mix(in srgb, var(--accent) 50%, var(--line-2)); color: var(--ink); }

/* ---- Roster sections ----------------------------------------------------------------- */
.volunteer-section { margin-block-end: clamp(48px, 6vw, 76px); scroll-margin-top: 96px; }
.volunteer-section > h2, .app-support-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.45rem); line-height: 1.1; }
.volunteer-section > h2 { margin-block-end: 18px; padding-block-end: 16px; border-bottom: 1px solid var(--line); }
.volunteer-board .job { scroll-margin-top: 96px; }
.volunteer-board .job .co { font: 500 .74rem/1.5 var(--mono); letter-spacing: .03em; color: var(--muted); margin-top: 6px; }
.volunteer-description { grid-column: 1 / -1; max-width: 74ch; color: var(--ink-2); }
.volunteer-board .job:target, .app-support-card:target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ---- App support and development ------------------------------------------------------ */
.app-support {
  --track-swift: var(--accent);
  --track-qa: var(--seal-text);
  --track-community: var(--ink);
}
.app-support-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 20px clamp(28px, 5vw, 72px); align-items: end; padding-block-end: 26px; border-bottom: 1px solid var(--line); }
.app-support-eyebrow { margin-block-end: 12px; font: 500 .72rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.app-support-lead { margin-block-start: 14px; max-width: 60ch; font-size: 1.04rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.app-support-terms { padding: 14px 18px; border: 1px solid var(--line); border-inline-start: 3px solid var(--seal); border-radius: 4px 14px 14px 4px; background: var(--bg-2); font-size: .9rem; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

/* The ten apps as jump links. */
.app-support-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 20px 0 0; padding: 0; }
@media (min-width: 900px) {
  .app-support-index { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.app-support-index a { display: flex; height: 100%; align-items: center; gap: 8px; min-height: 40px; padding: 5px 14px 5px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .86rem; font-weight: 600; line-height: 1.2; text-decoration: none; transition: border-color .15s; }
.app-support-index a:hover { border-color: var(--accent); color: var(--ink); }
.app-support-index img { display: block; flex: none; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

.app-support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; list-style: none; margin: 22px 0 0; padding: 0; }
.app-support-card { container: app-card / inline-size; display: flex; flex-direction: column; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); scroll-margin-top: 96px; transition: border-color .15s; }
.app-support-card:hover { border-color: var(--line-2); }
.app-support-card p, .app-support-card dl, .app-support-card dd { margin: 0; }

.app-card-head { display: flex; align-items: center; gap: 14px; }
.app-card-head img { display: block; flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.app-card-head h3 { font: 600 1.5rem/1.15 var(--display); letter-spacing: -.02em; color: var(--ink); }
.app-support-platforms { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 8px; }
.app-support-platforms .chip { padding: 2px 9px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 .68rem/1.5 var(--mono); letter-spacing: .03em; color: var(--ink-2); white-space: nowrap; }

/* Three tracks, each in its own inset panel, keyed by a colour and a label. */
.app-tracks { display: grid; gap: 8px; }
.app-track { display: grid; gap: 4px 18px; padding: 12px 16px 13px; border: 1px solid var(--line); border-inline-start: 2px solid var(--track); border-radius: 3px 12px 12px 3px; background: var(--bg-2); }
.app-track-swift { --track: var(--track-swift); }
.app-track-qa { --track: var(--track-qa); }
.app-track-community { --track: var(--track-community); }
.app-track dt { margin: 0; font: 600 .7rem/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--track); }
.app-track dd { font-size: .95rem; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
@container app-card (min-width: 470px) {
  .app-track { grid-template-columns: 9.5rem minmax(0, 1fr); align-items: baseline; }
  .app-track dt { padding-block-start: .2em; }
}

.app-support-note { font-size: .86rem; line-height: 1.5; color: var(--muted); }

/* Three destinations as rows: what you do on the left, where it goes on the right. */
.app-support-actions { display: block; margin-block-start: auto; border-top: 1px solid var(--line); }
.app-support-actions a { display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; min-height: 46px; padding-block: 8px; color: var(--ink); font-size: .93rem; font-weight: 650; line-height: 1.3; text-decoration: none; transition: color .15s; }
.app-support-actions a + a { border-top: 1px solid var(--line); }
.app-support-actions a:last-child { padding-block-end: 0; min-height: 38px; }
.app-action-meta { flex-shrink: 0; font: 500 .7rem/1.4 var(--mono); letter-spacing: .03em; color: var(--muted); white-space: nowrap; transition: color .15s; }
.app-support-actions a:hover, .app-support-actions a:hover .app-action-meta { color: var(--accent); }
.app-support-actions a:focus-visible { outline-offset: 2px; }
@container app-card (max-width: 330px) {
  .app-action-meta span { display: none; }
}

/* ---- Career directory (/careers/) ----------------------------------------------------- */
.career-directory { margin-block: 12px 38px; }
.career-directory > h2, .career-note > h2 { font-size: clamp(1.75rem, 3.2vw, 2.45rem); line-height: 1.1; padding-block-end: 16px; border-bottom: 1px solid var(--line); }
.career-note { margin-block: 38px 64px; max-inline-size: min(100%, 980px); }
.career-note p { margin-block: 12px; max-width: 74ch; color: var(--ink-2); }
.career-directory [hidden] { display: none !important; }
.career-filters { display: grid; grid-template-columns: 1.25fr 1fr auto; align-items: end; gap: 14px; margin-block: 18px; }
.career-filters label { display: block; margin-block-end: 6px; font: 500 .72rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.career-filters input, .career-filters select { inline-size: 100%; min-height: 44px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; }
.career-filters .button { min-height: 44px; }
.career-families, .career-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); align-items: stretch; list-style: none; padding: 0; gap: 14px; margin-block: 18px; }
.career-families li, .career-list li { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color .15s; }
.career-families li:hover, .career-list li:hover { border-color: var(--line-2); }
.career-families h3, .career-list h3 { font: 600 1.18rem/1.25 var(--display); letter-spacing: -.012em; text-wrap: balance; }
.career-families li > div { margin-block-start: auto; padding-block-start: 6px; display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.career-families p, .career-list p { margin: 0; font-size: .95rem; line-height: 1.5; color: var(--ink-2); }
.career-families a, .career-list a { display: inline-flex; align-items: center; min-height: 36px; font-size: .93rem; font-weight: 650; }
.career-list a { margin-block-start: auto; }
.career-browse { color: inherit; background: transparent; font: inherit; font-size: .93rem; font-weight: 650; padding: 5px 0; min-height: 36px; border: 0; text-decoration: underline; text-underline-offset: .22em; cursor: pointer; }
.career-browse:hover { color: var(--accent); }

/* ---- Narrow screens ------------------------------------------------------------------- */
@media (max-width: 900px) {
  .app-support-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (max-width: 820px) {
  .app-support-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 690px) {
  .career-filters { grid-template-columns: 1fr; }
  .career-filters .button { justify-self: start; }
}
@media (max-width: 520px) {
  .volunteer-switch { display: grid; }
  .volunteer-switch a { padding-inline: 12px; }
  .app-support-card { padding: 18px; gap: 16px; border-radius: 16px; }
  .app-card-head img { width: 44px; height: 44px; }
  .app-card-head h3 { font-size: 1.35rem; }
  .app-track { padding-inline: 13px; }
}

/* Volunteer role practice paths */
.volunteer-learning { grid-column: 1 / -1; max-width: 74ch; margin-block: 8px 2px; }
.volunteer-learning summary { cursor: pointer; color: var(--ink); font-weight: 650; line-height: 1.45; }
.volunteer-learning summary:hover { color: var(--accent); }
.volunteer-learning ol { margin: 10px 0 0; padding-inline-start: 1.5em; color: var(--ink-2); }
.volunteer-learning li + li { margin-block-start: 6px; }
.trade-training > p { max-width: 74ch; margin-block: 16px; }
.trade-training .trade-path { grid-template-columns: minmax(0, 1fr); }
.trade-path h3 { margin-block-end: 6px; }
.trade-path p { max-width: 74ch; }

/* Curriculum guides remain readable and fully navigable without JavaScript. */
.role-guide { padding-bottom: clamp(48px, 8vw, 100px); }
.role-guide .page-head, .role-guide section { max-width: 52rem; }
.role-guide .page-head h1 { overflow-wrap: anywhere; }
.curriculum-steps { list-style-position: outside; padding-inline-start: clamp(1.4rem, 4vw, 2.2rem); }
.curriculum-steps li { padding: .75rem 0 1.2rem .35rem; border-bottom: 1px solid currentColor; }
.curriculum-steps li:last-child { border-bottom: 0; }
.curriculum-steps h3 { margin: 0 0 .45rem; }
.curriculum-steps p { margin: 0 0 .5rem; }
.role-guide-next { margin-top: 2rem; }
.role-guide a:not(.button), .career-list h3 a { text-decoration: underline; text-underline-offset: .19em; }

/* A career guide card has one destination. Its real link fills the tile. */
.career-list .career-guide-card { gap: 0; padding: 0; border: 0; background: transparent; }
.career-list .career-guide-card > a {
  display: flex; flex: 1; margin: 0; min-height: 44px; padding: 14px 20px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
}
.career-list .career-guide-card > a:hover { border-color: var(--accent); }

/* Keep the actions separate on cards containing several destinations. */
@media (max-width: 760px), (pointer: coarse) {
  .workstreams .tags a, .app-support-index a, .app-support-actions a:last-child,
  .career-families a, .career-list a, .career-browse { min-height: 44px; }
  .volunteer-board .job h3 a, .trade-path h3 a {
    display: inline-flex; align-items: center; min-height: 44px;
  }
  .volunteer-learning summary { min-height: 44px; padding-block: 10px; }
}

/* Original artwork is decorative. Existing titles and links retain their semantics. */
.role-art { display: block; height: auto; max-width: 100%; border-radius: 10px; background: var(--bg-2); }
.role-art-thumb { flex: none; width: clamp(64px, 19vw, 108px); }
.role-art-family { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.role-art-guide { width: 224px; margin-block: 16px; }
.role-card-heading, .career-list .career-guide-card > a { align-items: center; gap: 12px; }
.volunteer-board .role-card-heading, .career-list li > .role-card-heading { display: flex; min-width: 0; }
.career-list li > .role-card-heading { margin: 0; padding: 0; }
.role-card-heading > :not(img), .career-guide-card a > span { min-width: 0; overflow-wrap: anywhere; }
