/* OJPM Jobs. Mobile first: everything below is the phone layout; wider screens are adjusted at the end. */

:root {
  --navy: #003b4d;
  --blue: #00adee;
  --sky: #8ad4eb;
  --pale: #b8e3ed;
  --yellow: #ffc440;
  --orange: #f7941d;
  --ink: #062e3c;
  --paper: #fffdfa;
  --wash: #f5fafb;
  --line: #d5e6ea;
  --edge: #678791;
  --muted: #44626c;
  --danger: #a12a12;
  --danger-wash: #fdf0ec;
  --display: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 17px/1.5 var(--body); }
a { color: var(--navy); text-underline-offset: 3px; }
h1, h2, h3, h4, legend { font-family: var(--display); color: var(--navy); line-height: 1.12; margin: 0; }
h1 { font-size: 2.35rem; letter-spacing: -0.03em; }
h2 { font-size: 1.7rem; letter-spacing: -0.02em; }
h3 { font-size: 1.55rem; }
h4 { font-size: 1.1rem; }
p { margin: 0; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 20; padding: 12px 16px;
  background: var(--yellow); color: var(--ink); font-weight: 800; border-radius: 6px;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid #005a78; outline-offset: 3px; }
/* The rating buttons and the two upload buttons hide their real input, so the ring goes on the
   visible part. Kept apart from the rule above so a browser without :has() still gets that one. */
@supports selector(:has(a)) {
  .choice:has(input:focus-visible),
  .scale-option:has(input:focus-visible),
  .file-button:has(input:focus-visible) { outline: 3px solid #005a78; outline-offset: 3px; }
}
@supports not selector(:has(a)) {
  .scale-option:focus-within,
  .file-button:focus-within { outline: 3px solid #005a78; outline-offset: 3px; }
}
#step-title:focus, #application-heading:focus { outline: none; }

/* ---- Header and landing ---- */

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; padding: 8px var(--gutter); background: #fff; border-bottom: 1px solid var(--line);
}
.brand img { display: block; width: 92px; height: auto; }
.header-link { font-weight: 800; text-decoration: none; padding: 12px 4px; }
.header-link span { color: var(--orange); }

.hero { position: relative; overflow: hidden; padding: 34px var(--gutter) 38px; background: #fff; }
.hero::after {
  content: ""; position: absolute; right: -175px; top: -185px; width: 230px; height: 230px;
  border: 20px solid var(--yellow); border-radius: 50%; opacity: 0.8; pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.eyebrow { margin-bottom: 10px; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.14em; color: #12677f; }
.eyebrow span {
  display: inline-block; width: 22px; height: 7px; margin-right: 8px; vertical-align: middle;
  background: var(--orange); transform: skewX(-26deg);
}
.hero-lede { margin: 14px 0 24px; max-width: 620px; color: #28525e; }

.path-cards { display: grid; gap: 14px; max-width: 860px; }
.path-card {
  display: grid; gap: 6px; width: 100%; min-height: 48px; padding: 18px 18px 16px; text-align: left; cursor: pointer;
  font: inherit; color: #fff; background: var(--navy); border: 0; border-radius: 10px; box-shadow: 5px 5px 0 var(--yellow);
}
.path-card:nth-child(2) { box-shadow: 5px 5px 0 var(--orange); }
.path-card:hover { background: #004e66; }
.path-card[aria-pressed="true"] { outline: 3px solid var(--blue); outline-offset: 3px; }
.path-card-title { font: 800 1.35rem/1.15 var(--display); }
.path-card-text { color: #dff3f8; }
.path-card-meta { margin-top: 4px; font-size: 0.92rem; font-weight: 700; color: var(--yellow); }
.save-note { margin-top: 20px; font-size: 0.92rem; color: var(--muted); }
.save-note span {
  display: inline-grid; place-items: center; width: 21px; height: 21px; margin-right: 6px;
  border-radius: 50%; background: var(--blue); color: #fff; font-weight: 900; font-size: 0.8rem;
}
.noscript { margin-top: 16px; padding: 14px; border: 2px solid var(--orange); background: #fff7e4; }

.why-section { padding: 40px var(--gutter); background: var(--wash); }
.benefit-list { display: grid; gap: 18px; margin-top: 20px; }
.benefit-list article { padding-top: 12px; border-top: 4px solid var(--blue); }
.benefit-list article:nth-child(2) { border-top-color: var(--yellow); }
.benefit-list article:nth-child(3) { border-top-color: var(--orange); }
.benefit-list p { margin-top: 4px; color: var(--muted); font-size: 0.95rem; }

.site-footer { padding: 30px var(--gutter); background: var(--navy); color: #d9f0f6; font-size: 0.88rem; }
.site-footer p { margin: 8px 0; max-width: 820px; }
.site-footer a { color: #fff; }

/* ---- Application ---- */

.application-section { padding: 30px 12px 44px; background: linear-gradient(180deg, #e9f8fc 0, #fff8e5 100%); scroll-margin-top: 8px; }
.application-heading { padding: 0 8px; }
.application-note { padding: 6px 8px 18px; color: var(--muted); font-size: 0.95rem; }
#application-root { max-width: 720px; margin: 0 auto; }
.application-heading, .application-note, .draft-tools, .human-check, .human-check-prompt { max-width: 720px; margin-left: auto; margin-right: auto; }

form, .confirmation { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 34px rgba(0, 59, 77, 0.1); }
.step-head { padding: 20px var(--gutter) 0; }
.step-count { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #12677f; }
.step-progress {
  display: block; width: 100%; height: 8px; margin: 8px 0 16px; border: 0; border-radius: 4px;
  background: var(--line); overflow: hidden; appearance: none; -webkit-appearance: none;
}
.step-progress::-webkit-progress-bar { background: var(--line); }
.step-progress::-webkit-progress-value { background: var(--blue); }
.step-progress::-moz-progress-bar { background: var(--blue); }
.step-body { padding: 18px var(--gutter) 6px; }
.step-note { margin-bottom: 18px; color: var(--muted); }
.subhead { margin: 26px 0 4px; padding-top: 18px; border-top: 1px solid var(--line); }
.subhead + .hint { margin: 0 0 14px; }

.field { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.field > label, .field-label, .group > legend {
  display: block; margin-bottom: 6px; padding: 0; font: 700 1rem/1.3 var(--body); color: #143f4c;
}
.required { color: var(--danger); }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--edge); border-radius: 8px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input[type="date"] { min-width: 0; -webkit-appearance: none; appearance: none; }
.hint { margin-top: 6px; font-size: 0.88rem; color: var(--muted); }
.group > .hint { margin: 0 0 8px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
[data-text="homeAddress.state"] { text-transform: uppercase; }

.has-error input:not([type="checkbox"]):not([type="radio"]), .has-error select, .has-error textarea { border-color: var(--danger); background: var(--danger-wash); }
.field-error { margin-top: 6px; font-size: 0.92rem; font-weight: 700; color: var(--danger); }
.field-error::before { content: "! "; }
.form-message {
  margin: 14px var(--gutter) 0; padding: 12px 14px; font-weight: 700; color: #6b3d0f;
  background: #fff4d8; border-left: 5px solid var(--orange); border-radius: 4px;
}

.form-note {
  margin: 14px var(--gutter) 0; padding: 12px 14px; font-weight: 700; color: #0b4a5e;
  background: #e6f6fb; border-left: 5px solid var(--blue); border-radius: 4px;
}

.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 16px; cursor: pointer;
  color: #1e4a57; font-weight: 600; background: #fff; border: 1.5px solid var(--edge); border-radius: 8px;
}
.choice input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--navy); }
.choice:has(input:checked) { background: #e6f6fb; border-color: var(--navy); color: var(--navy); }
.has-error > .choices .choice { border-color: var(--danger); }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chip { padding: 10px 12px; }

.ratings { margin: 4px 0 22px; padding: 2px 14px 12px; background: var(--wash); border-radius: 8px; }
.ratings .subhead { margin-top: 12px; border-top: 0; padding-top: 6px; }
.rating { margin: 0; padding: 12px 0; border: 0; border-top: 1px solid var(--line); }
.rating legend { padding: 0; font: 700 1rem/1.3 var(--body); color: #143f4c; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.scale-option { position: relative; display: block; cursor: pointer; }
.scale-option input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.scale-option span {
  display: grid; place-items: center; min-height: 48px; font-weight: 800; color: #1e4a57;
  background: #fff; border: 1.5px solid var(--edge); border-radius: 8px;
}
.scale-option input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.rating.has-error .scale-option span { border-color: var(--danger); }

.upload-list { list-style: none; margin: 8px 0 0; padding: 0; }
.upload-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 8px; padding: 10px 12px;
  background: var(--wash); border-left: 4px solid var(--blue); border-radius: 4px; font-size: 0.95rem;
}
.upload-item.is-done { border-left-color: #1f8a4c; }
.upload-item.is-failed { border-left-color: var(--danger); background: var(--danger-wash); }
.upload-name { flex: 1 1 60%; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.upload-state { color: var(--muted); }
.is-failed .upload-state { color: var(--danger); font-weight: 700; }
.upload-item progress { flex: 1 1 100%; height: 8px; }
.upload-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.file-button { position: relative; }

details.more { margin: 0 0 18px; padding: 0 14px; background: var(--wash); border-radius: 8px; }
details.more > summary { min-height: 50px; padding: 13px 0; font-weight: 700; color: var(--navy); cursor: pointer; }
details.more[open] { padding-bottom: 14px; }
.credential-list { display: grid; gap: 16px; margin-bottom: 14px; }
.credential { padding: 14px; background: var(--wash); border-left: 5px solid var(--blue); border-radius: 4px; }
details.more .credential { background: #fff; }
.credential-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 18px;
  font: 800 1rem var(--body); text-decoration: none; text-align: center; cursor: pointer; border: 0; border-radius: 8px;
}
.button-primary { color: #fff; background: var(--navy); box-shadow: 4px 4px 0 var(--yellow); }
.button-primary span { color: var(--yellow); font-size: 1.25em; line-height: 1; }
.button-primary[disabled] { opacity: 0.7; cursor: progress; }
.button-quiet { color: var(--navy); background: #fff; border: 1.5px solid var(--edge); }
.button-secondary { width: 100%; color: var(--ink); background: var(--yellow); }
.text-button {
  min-height: 48px; min-width: 48px; padding: 8px 6px; font: 800 0.95rem var(--body); color: var(--navy);
  text-decoration: underline; background: none; border: 0; cursor: pointer;
}
/* Next stays in reach at the bottom of the screen however long the step is. */
.form-actions {
  position: sticky; bottom: 0; z-index: 2; display: flex; gap: 12px; padding: 12px var(--gutter) 14px;
  background: #fff; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; box-shadow: 0 -6px 14px rgba(0, 59, 77, 0.07);
}
.form-actions .button { flex: 1; }
.form-actions .button-quiet { flex: 0 0 34%; }

.review-section { margin-bottom: 14px; padding: 12px 14px; background: var(--wash); border: 1px solid var(--line); border-radius: 8px; }
.review-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review-list { margin: 4px 0 0; font-size: 0.95rem; }
.review-list dt { margin-top: 8px; font-weight: 700; color: #2b5360; }
.review-list dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.review-list em { color: var(--muted); }
.consent { display: flex; align-items: flex-start; width: 100%; margin: 12px 0 0; padding: 14px; font-weight: 400; }
.consent input { margin-top: 2px; }
.consent b { font-weight: 700; }
.consent small { display: block; margin-top: 6px; font-size: 0.86rem; color: var(--muted); }
.consent.has-error { border-color: var(--danger); background: var(--danger-wash); }

.human-check-prompt {
  margin-bottom: 8px; padding: 12px 14px; font-weight: 700; color: #6b3d0f;
  background: #fff4d8; border-left: 5px solid var(--orange); border-radius: 4px;
}
.human-check.needs-tap { margin-bottom: 14px; scroll-margin: 80px; }
.draft-tools { padding: 14px 8px 0; font-size: 0.9rem; color: var(--muted); }
.confirmation { padding: 44px 24px; text-align: center; }
.confirmation p { margin: 12px auto 0; max-width: 440px; }
.confirmation-mark {
  display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 18px;
  font-size: 2rem; font-weight: 900; color: #fff; background: var(--blue); border-radius: 50%; box-shadow: 6px 6px 0 var(--yellow);
}

/* ---- Privacy page ---- */

.privacy-page { background: var(--wash); }
.privacy-content { max-width: 760px; margin: 0 auto; padding: 40px var(--gutter) 56px; }
.privacy-content .lead { margin: 12px 0 24px; font-size: 1.1rem; color: var(--muted); }
.privacy-content section { padding: 20px 0; border-top: 1px solid #c9dce1; }
.privacy-content section h2 { margin-bottom: 8px; font-size: 1.3rem; }
.privacy-content section p + p { margin-top: 10px; }

/* ---- Wider screens ---- */

@media (min-width: 720px) {
  :root { --gutter: 32px; }
  h1 { font-size: 3.6rem; }
  h2 { font-size: 2.3rem; }
  .site-header { padding: 10px max(var(--gutter), calc((100vw - 1100px) / 2)); }
  .brand img { width: 118px; }
  .hero, .why-section { padding: 64px max(var(--gutter), calc((100vw - 1100px) / 2)); }
  .hero::after { right: -120px; top: -130px; width: 320px; height: 320px; border-width: 30px; }
  .site-footer { padding: 36px max(var(--gutter), calc((100vw - 1100px) / 2)); }
  .path-cards { grid-template-columns: 1fr 1fr; gap: 22px; }
  .path-card { padding: 24px; align-content: start; }
  .benefit-list { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .application-section { padding: 48px var(--gutter) 64px; }
  .chips { grid-template-columns: repeat(3, 1fr); }
  .form-actions { justify-content: space-between; }
  .form-actions .button { flex: 0 1 240px; }
  .form-actions .button-quiet { flex: 0 0 140px; }
  .upload-actions { grid-template-columns: repeat(2, minmax(0, 220px)); }
  .review-list { display: grid; grid-template-columns: 190px 1fr; gap: 6px 16px; }
  .review-list dt { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
