/* The job ad at /jobs/<slug> — variant C2, "right rail, floating card".
   Chosen by Mus on 2026-08-05: the narrative starts at the left edge where the
   eye lands, and the facts ride in a raised card that stays put while the ad
   scrolls, then becomes a fixed apply bar on a phone. Apprentices read these on
   phones, and this is the only layout where the apply action never leaves the
   screen.

   Every colour, radius, shadow and typeface here is a token from site.css. */

.job-ad { padding-block: clamp(2rem, 5vw, 3.5rem) 0; }
.job-ad__grid { align-items: start; display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 1fr) 20rem; }
.job-ad__body { min-width: 0; }
/* An ad is often the first page somebody lands on from a search result, so it
   needs a way into the rest of the board that is not the nav. */
.job-ad__back { margin: 0 0 var(--space-4); }
.job-ad__back a { color: var(--mid-grey); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.job-ad__back a:hover { color: var(--green-dark); }
.job-ad__title { font-family: var(--font-display); font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.03; margin: 0 0 var(--space-4); }
.job-ad__intro { color: var(--warm-grey); font-size: 1.12rem; font-weight: 600; margin: 0; max-width: 42rem; }

.job-ad__section { margin-block-start: var(--space-8); }
.job-ad__section h2 { color: var(--charcoal); font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.02em; margin: 0 0 var(--space-3); }
.job-ad__section p { color: var(--warm-grey); margin: 0 0 var(--space-3); max-width: 42rem; }
.job-ad__list { color: var(--warm-grey); list-style: none; margin: 0 0 var(--space-3); max-width: 42rem; padding: 0; }
.job-ad__list li { margin-top: var(--space-3); padding-left: 1.6rem; position: relative; }
.job-ad__list li::before { background: var(--green-bright); border-radius: 50%; content: ""; height: .45rem; left: .35rem; position: absolute; top: .6rem; width: .45rem; }

/* The rail. `top` clears the sticky site header. */
.job-ad__rail { position: sticky; top: 8rem; }
.job-facts { background: var(--sand); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--space-6); }
.job-facts__rate { color: var(--green-deep); font-family: var(--font-display); font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 0; }
.job-facts__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: var(--space-4) 0 0; padding: 0; }
.job-facts__chips li { background: var(--sand-light); border: 1px solid var(--rule); border-radius: 999px; color: var(--warm-grey); font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: .3rem .7rem; text-transform: uppercase; }
.job-facts__list { margin: var(--space-6) 0 var(--space-6); }
.job-facts__list dt { color: var(--mid-grey); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.job-facts__list dd { color: var(--charcoal); font-weight: 600; margin: 0 0 var(--space-4); }
.job-facts__list dd:last-child { margin-bottom: 0; }
.job-facts__apply { display: block; text-align: center; width: 100%; }

.job-ad__apply { border-top: 1px solid var(--rule); margin-block-start: var(--space-12); padding-block-start: var(--space-8); scroll-margin-top: 7rem; }
.job-ad__apply h2 { color: var(--charcoal); font-family: var(--font-display); font-size: 1.55rem; letter-spacing: -.03em; margin: 0 0 var(--space-2); }
.job-ad__apply .section-copy { color: var(--warm-grey); margin: 0 0 var(--space-6); max-width: 42rem; }

/* Phone: the rail leads with the money and the chips, and the apply action
   detaches into a bar that follows the reader down the ad. */
.job-ad__bar { display: none; }

@media (max-width: 60rem) {
  .job-ad__grid { grid-template-columns: minmax(0, 1fr); }
  .job-ad__rail { order: -1; position: static; }
  .job-facts__apply { display: none; }
  .job-ad__bar {
    align-items: center;
    background: var(--cream);
    border-top: 1px solid var(--rule);
    bottom: 0;
    box-shadow: 0 -.5rem 1.5rem rgba(6, 74, 51, .12);
    display: flex;
    gap: var(--space-4);
    justify-content: space-between;
    left: 0;
    padding: var(--space-3) clamp(1rem, 4vw, 2.5rem);
    position: fixed;
    right: 0;
    z-index: 9;
  }
  .job-ad__bar-title { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .job-ad__bar .button { flex: none; }
  /* Clear the fixed bar so it never covers the last of the footer. */
  .site { padding-bottom: 4.5rem; }
}
