/*
  Reading-layout owner: jobs/index.html supplies semantic groups; jobs.css owns
  component/gallery mechanics; this last layer owns spacing and type rhythm.
  Keep related text close, group boundaries larger, and section gaps bounded.
  Regression owner: check-root-jobs-cognitive + root-jobs-spacing-checks.
*/
.jobs-page {
  --jobs-grid-width: 960px;
  --jobs-reading-width: 68ch;
  --jobs-module-space: 1.75rem;
  --jobs-card-gap: 1.25rem;
  --jobs-section-space: clamp(1.75rem, 3vw, 2.5rem);
  --jobs-panel-space: clamp(1rem, 2vw, 1.5rem);
  --jobs-text-space: 1rem;
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* Clip paint without creating a scroll container that breaks sticky headers. */
html,
body.jobs-page {
  overflow-x: hidden;
  overflow-x: clip;
}

.jobs-page .page-hero,
.jobs-page .content-section {
  padding: var(--jobs-section-space) clamp(1rem, 3vw, 2rem);
  background: #173954;
}

.jobs-page .content-section.band {
  background: #1b405e;
}

.jobs-page .page-hero > .wrap,
.jobs-page .content-section > .wrap,
.jobs-page .document-nav > .wrap {
  width: 100%;
  max-width: var(--jobs-grid-width);
}

.jobs-page .notice-section > .wrap {
  padding-left: 0;
  border-left: 0;
}

.jobs-page .section-kicker {
  margin: 0 0 0.625rem;
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: 0.035em;
}

.jobs-hero h1 {
  max-width: 27ch;
  font-size: 2.75rem;
  line-height: 1.2;
  text-wrap: pretty;
}

.jobs-page .content-section h2 {
  max-width: 34ch;
  font-size: 2.125rem;
  line-height: 1.3;
  text-wrap: pretty;
}

.jobs-page .content-section h2::after {
  display: none;
}

.jobs-page .content-section h3 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.25rem;
  line-height: 1.4;
}

.jobs-page .content-section p,
.jobs-hero .page-lede,
.jobs-role-note,
.jobs-verified {
  max-width: var(--jobs-reading-width);
  line-height: 1.65;
}

.jobs-page .content-section p,
.jobs-hero .page-lede {
  margin-top: var(--jobs-text-space);
}

.jobs-hero .page-lede {
  font-size: 1.125rem;
  font-weight: 400;
  color: #edf4f8;
}

.jobs-hero .actions {
  margin-top: 1.25rem;
  gap: 0.75rem;
}

.jobs-role-note,
.jobs-verified {
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-weight: 400;
}

.jobs-hero-rates {
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.jobs-hero-rates li {
  padding: 0.875rem 1rem;
  gap: 0.25rem;
}

.jobs-page .document-nav {
  padding: 1.25rem clamp(1rem, 3vw, 2rem);
  background: #102f48;
}

.jobs-jump-links {
  gap: 0.5rem 0.75rem;
}

.jobs-jump-links a {
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  line-height: 1.5;
  font-size: 1rem;
  font-weight: 600;
}

/* Paired facts/comparisons keep their natural heights, without filler space. */
.jobs-facts,
.jobs-columns,
.jobs-certainty-grid {
  margin-top: var(--jobs-module-space);
  gap: var(--jobs-card-gap);
  align-items: start;
}

.jobs-facts > div {
  padding: 1.125rem 1.25rem;
  background: #102e48;
}

.jobs-facts dt {
  font-size: 0.9375rem;
  line-height: 1.5;
  text-transform: none;
}

.jobs-facts dd {
  margin-top: 0.5rem;
  line-height: 1.5;
  font-size: 1.125rem;
}

.jobs-fact-detail {
  margin-top: 0.375rem;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
}

.jobs-before-apply,
.jobs-card,
.jobs-certainty-card,
.jobs-rate-note,
.jobs-schedule,
.jobs-approval-note,
.jobs-fee-note,
.jobs-duty-block,
.jobs-program-references,
.jobs-access-note,
.jobs-applicant-welcome,
.jobs-inclusion-callout {
  min-width: 0;
  padding: var(--jobs-panel-space);
  background: rgba(7, 27, 44, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 6px;
}

.jobs-before-apply,
.jobs-access-note,
.jobs-applicant-welcome,
.jobs-inclusion-callout {
  max-width: var(--jobs-reading-width);
  margin-top: var(--jobs-module-space);
}

.jobs-before-apply {
  border-top: 3px solid var(--jobs-section-title-color);
}

/* A separate welcome box directly beneath the job heading; no fixed height. */
.jobs-applicant-welcome {
  border-left: 3px solid var(--gold);
  background: #102e43;
}

.jobs-welcome-heart {
  display: block;
  margin: 0 auto 0.375rem;
  font-size: 2rem;
  line-height: 1.25;
  text-align: center;
}

.jobs-page .jobs-applicant-welcome h2 {
  text-align: center;
  margin: 0;
  padding: 0;
  max-width: none;
  font-size: 1.375rem;
  line-height: 1.4;
  color: #fff;
}

.jobs-page .jobs-applicant-welcome h2::after {
  display: none;
}

.jobs-applicant-welcome p {
  text-align: left;
  margin: 0.875rem 0 0;
  color: #edf4f8;
}

.jobs-inclusion-callout {
  border-left: 3px solid var(--jobs-subtitle-color);
}

.jobs-certainty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: var(--jobs-grid-width);
}

.jobs-certainty-card--scheduled {
  border-top: 3px solid var(--jobs-subtitle-color);
}

.jobs-certainty-card--possible {
  border-top: 3px solid var(--jobs-section-title-color);
}

.jobs-page .content-section ul,
.jobs-page .content-section ol {
  margin-top: 1rem;
  gap: 0.75rem;
}

.jobs-page .content-section li {
  line-height: 1.65;
}

/* One item per row; subtle rules group instructions without a box per line. */
.jobs-readiness-list,
.jobs-separated-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: none !important;
  padding-left: 0 !important;
  list-style: none;
}

.jobs-page .content-section .jobs-readiness-list,
.jobs-page .content-section .jobs-separated-list {
  gap: 0;
}

.jobs-readiness-list li,
.jobs-separated-list li {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 0.875rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  overflow-wrap: anywhere;
}

.jobs-readiness-list strong,
.jobs-separated-list strong {
  color: #fff;
}

.jobs-change-note {
  max-width: var(--jobs-reading-width) !important;
  margin-top: var(--jobs-module-space) !important;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--gold);
  background: rgba(7, 27, 44, 0.28);
}

.jobs-photo-gallery {
  margin-top: var(--jobs-module-space);
  padding-top: var(--jobs-module-space);
  border-top-width: 1px;
}

.jobs-page .jobs-process {
  margin-top: var(--jobs-module-space);
  gap: 1rem;
}

.jobs-process li {
  padding: 1.125rem 1.25rem 1.125rem 3.5rem;
}

.jobs-process li::before {
  top: 1.125rem;
  content: counter(jobs-step) / "";
}

.jobs-process li > strong {
  display: block;
  margin-bottom: 0.375rem;
  color: #fff;
}

.jobs-apply-card {
  gap: 1.5rem;
  align-items: start;
}

.jobs-apply-card .actions {
  margin-top: 0;
}

@media (max-width: 800px) {
  .jobs-hero h1 { font-size: 2.25rem; }
  .jobs-page .content-section h2 { font-size: 1.75rem; }
  .jobs-hero .hero-copy { grid-row: 1; }
  .jobs-certainty-grid { grid-template-columns: minmax(0, 1fr); }
  .jobs-page .topbar { position: relative; top: auto; }
  .jobs-page main [id] { scroll-margin-top: 1rem; }
}

@media (max-width: 520px) {
  .jobs-page .nav-menu-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: auto;
    width: min(220px, calc(100vw - 1.5rem));
    max-height: calc(100vh - 1rem);
    overflow-y: auto;
  }
}

@media (min-width: 381px) and (max-width: 520px) and (min-height: 421px) {
  .jobs-page .nav-menu { position: static; }
  .jobs-page .nav-menu-panel {
    top: calc(100% + 0.5rem);
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-height: calc(100vh - 100% - 1rem);
    max-height: calc(100dvh - 100% - 1rem);
  }
}

@media (max-height: 420px) {
  .jobs-page .topbar { position: relative; top: auto; }
  .jobs-page main [id] { scroll-margin-top: 1rem; }
}

@media (max-width: 380px) {
  .jobs-page { --jobs-panel-space: 0.875rem; }
  .jobs-facts > div { padding: 1rem; }
  .jobs-hero h1 { font-size: 2rem; }
  .jobs-page .content-section h2 { font-size: 1.625rem; }
  .jobs-page .content-section :is(h3, p, li),
  .jobs-facts dd { overflow-wrap: anywhere; }
}

.jobs-lightbox h2 { line-height: 1.3; }

/* Long action labels must reflow with enlarged text, even at 320px. */
.jobs-page .button { min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: center; }

/* A section starts at its padding edge; paragraph defaults must not add a second gap. */
.jobs-page .content-section .section-kicker { margin-top: 0; }

/* Keep the refrigerator/freezer comparison together at every text size. */
.jobs-page .content-section .jobs-storage-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-left: 1.25rem;
  gap: 0.625rem;
}
.jobs-storage-list strong { color: #fff; }
