/* PPE Careers plugin: multi-step employment application (from careers.html / apply.css). */
.apply-section { background: var(--navy-50); padding-block: clamp(48px, 7vw, 96px); }
.apply-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

/* Sidebar stepper */
.apply-aside { position: sticky; top: calc(var(--nav-h) + 24px); }
.apply-aside h2 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); margin-bottom: 10px; }
.apply-aside > p { font-size: .92rem; margin-bottom: 24px; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.stepper button {
  width: 100%;
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 10px 12px 10px 10px;
  background: transparent; border: 0; border-radius: var(--r-sm);
  text-align: left; cursor: default;
  color: var(--ink-faint); font-weight: 600; font-size: .94rem;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.stepper .dot {
  width: 34px; height: 34px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong);
  font-family: var(--font-display); font-weight: 720; font-size: .86rem;
  font-variant-numeric: tabular-nums;
  transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.stepper .dot .icon { width: 15px; height: 15px; display: none; }
.stepper small { display: block; font-weight: 500; font-size: .78rem; color: var(--ink-faint); }
.stepper li.is-done button { color: var(--navy-900); cursor: pointer; }
.stepper li.is-done button:hover { background: rgba(29,42,99,.06); }
.stepper li.is-done .dot { background: var(--navy-900); color: #fff; box-shadow: none; }
.stepper li.is-done .dot span { display: none; }
.stepper li.is-done .dot .icon { display: block; }
.stepper li.is-current button { background: var(--surface); color: var(--navy-950); box-shadow: var(--sh-1); }
.stepper li.is-current .dot { background: var(--amber-500); color: var(--navy-950); box-shadow: none; }

.aside-note {
  margin-top: 24px; padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font-size: .84rem; color: var(--ink-soft); line-height: 1.55;
}
.aside-note strong { color: var(--navy-950); display: block; margin-bottom: 4px; font-size: .88rem; }

/* Mobile progress (replaces the sidebar list) */
.apply-progress { display: none; }
.progress-track { height: 6px; border-radius: var(--r-pill); background: rgba(29,42,99,.10); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--amber-500); border-radius: inherit; transition: width .5s var(--ease-out); }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: .86rem; font-weight: 620; color: var(--navy-900); }
.progress-meta span:last-child { color: var(--ink-faint); font-weight: 560; }

/* Form card */
.apply-card {
  background: var(--surface);
  border-radius: var(--r-bezel);
  box-shadow: inset 0 0 0 1px var(--line), var(--sh-2);
  padding: clamp(24px, 4vw, 48px);
}
.apply-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.apply-step + .apply-step { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--line); }
.js .apply-step + .apply-step { margin-top: 0; padding-top: 0; border-top: 0; }
.js .apply-step[hidden] { display: none; }
.step-head { margin-bottom: 28px; }
.step-head::after { content: ""; display: block; clear: both; }
.eyebrow-num {
  display: block; margin-bottom: 10px;
  font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber-600);
}
.apply-step legend { padding: 0; float: left; width: 100%; }
.apply-step legend h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin: 0; }
.apply-step legend h2:focus, .apply-done:focus { outline: none; }
.step-head p { margin: 8px 0 0; font-size: .95rem; clear: both; }

.form-grid--3 { grid-template-columns: 2fr 1fr 1fr; }
.req { color: var(--amber-600); margin-left: 2px; }
.optional { font-weight: 500; color: var(--ink-faint); font-size: .8rem; margin-left: 4px; }

.field select {
  font: inherit; font-size: .96rem; color: var(--ink);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%231d2a63' d='M212.24 100.24l-80 80a6 6 0 0 1-8.48 0l-80-80a6 6 0 0 1 8.48-8.48L128 167.51l75.76-75.75a6 6 0 0 1 8.48 8.48Z'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
  border: 0; box-shadow: inset 0 0 0 1px var(--line-strong);
  border-radius: var(--r-sm);
  padding: 13px 40px 13px 15px;
  appearance: none;
  transition: box-shadow .3s var(--ease);
}
.field select:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--navy-700), 0 0 0 4px rgba(29,42,99,.10); }

/* Errors */
.field-error { display: none; font-size: .8rem; font-weight: 600; color: #8f2a1d; }
.has-error > .field-error, .has-error .field-error { display: block; }
.field.has-error input, .field.has-error select, .field.has-error textarea {
  box-shadow: inset 0 0 0 1.5px #c0432f, 0 0 0 4px rgba(192,67,47,.10);
}

/* Yes / No segmented choices */
.choices { margin-bottom: 28px; }
.choice {
  border: 0; margin: 0; padding: 18px 0; min-width: 0;
  border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center;
}
.choice:first-child { padding-top: 0; }
.choice legend { float: left; padding: 0; font-weight: 620; font-size: .96rem; color: var(--navy-950); max-width: 46ch; }
.choice .field-error { grid-column: 1 / -1; }
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--r-pill); background: var(--navy-50); box-shadow: inset 0 0 0 1px var(--line); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: block; min-width: 68px; padding: 8px 18px; text-align: center;
  border-radius: var(--r-pill); font-weight: 640; font-size: .9rem; color: var(--ink-soft);
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.segmented label:hover span { color: var(--navy-950); }
.segmented input:checked + span { background: var(--navy-900); color: #fff; box-shadow: var(--sh-1); }
.segmented input:focus-visible + span { outline: 2px solid var(--amber-500); outline-offset: 2px; }
.choice.has-error .segmented { box-shadow: inset 0 0 0 1.5px #c0432f; }

.reveal-field[hidden] { display: none; }

/* Education is only required for office positions (apply.js adds .is-required) */
#step-education:not(.is-required) .req { display: none; }

.check-line {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  font-size: .94rem; font-weight: 620; color: var(--navy-950); cursor: pointer;
}
.check-line input { width: 20px; height: 20px; margin: 0; accent-color: var(--navy-900); }

/* Sensitive (SSN) block */
.secure-field {
  padding: 20px;
  border-radius: var(--r-md);
  background: var(--navy-50); box-shadow: inset 0 0 0 1px var(--line);
}
.secure-field .field { max-width: 320px; }
.secure-input { position: relative; }
.secure-input input { width: 100%; padding-right: 72px; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.secure-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; cursor: pointer;
  padding: 6px 10px; border-radius: var(--r-sm);
  font-size: .8rem; font-weight: 650; color: var(--navy-700);
}
.secure-toggle:hover { background: rgba(29,42,99,.08); }
.secure-note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; font-size: .82rem; color: var(--ink-soft); max-width: 60ch; }
.secure-note .icon { width: 18px; height: 18px; color: #17663a; margin-top: 1px; }

/* Repeatable entries */
.repeat-list { display: grid; gap: 16px; }
.repeat-item {
  border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  padding: 20px;
  animation: itemIn .45s var(--ease-out);
}
@keyframes itemIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.repeat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; min-height: 32px; }
.repeat-head h3 { margin: 0; font-size: 1rem; }
.repeat-remove {
  border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 620; color: var(--ink-faint);
  padding: 6px 10px; border-radius: var(--r-sm);
}
.repeat-remove:hover { color: #8f2a1d; background: #fdedea; }
.repeat-remove .icon { width: 14px; height: 14px; }
.repeat-add {
  margin-top: 16px; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; border: 0; cursor: pointer;
  border-radius: var(--r-md);
  background: transparent;
  outline: 1.5px dashed var(--line-strong); outline-offset: -1.5px;
  font-weight: 640; font-size: .92rem; color: var(--navy-700);
  transition: background-color .25s var(--ease), outline-color .25s var(--ease);
}
.repeat-add:hover { background: var(--navy-50); outline-color: var(--navy-300); }
.repeat-add:focus-visible { outline: 2px solid var(--amber-500); }
.repeat-add[hidden] { display: none; }
.repeat-add .icon { width: 16px; height: 16px; }
.repeat-count { font-size: .8rem; color: var(--ink-faint); text-align: center; margin: 8px 0 0; max-width: none; }

/* Review */
.review { display: grid; gap: 14px; margin-bottom: 28px; }
.review-block {
  border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 18px 20px;
}
.review-block header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.review-block h3 { margin: 0; font-size: 1rem; }
.review-edit {
  border: 0; background: transparent; cursor: pointer;
  font-size: .82rem; font-weight: 650; color: var(--navy-700);
  padding: 6px 10px; border-radius: var(--r-sm);
  text-decoration: underline; text-underline-offset: 3px;
}
.review-edit:hover { background: var(--navy-50); }
.review-block dl { margin: 0; display: grid; grid-template-columns: minmax(130px, 200px) minmax(0, 1fr); gap: 6px 16px; font-size: .9rem; }
.review-block dt { color: var(--ink-faint); }
.review-block dd { margin: 0; color: var(--ink); font-weight: 560; overflow-wrap: anywhere; }
.review-sub { grid-column: 1 / -1; margin-top: 8px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-600); }

.certify {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 18px 20px; border-radius: var(--r-md);
  background: var(--navy-50);
  font-size: .9rem; color: var(--ink-soft); cursor: pointer;
}
.certify input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--navy-900); }
.certify-wrap.has-error .certify { box-shadow: inset 0 0 0 1.5px #c0432f; }
.certify-wrap .field-error { margin-top: 8px; }
.signature-grid { margin-top: 18px; }
#signature { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.eeo { margin: 20px 0 0; font-size: .82rem; color: var(--ink-faint); max-width: none; }

/* Hidden spam trap */
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Footer nav */
.apply-nav {
  display: flex; align-items: center; gap: 12px;
  margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line);
}
.apply-nav .btn[hidden] { display: none; }
.apply-nav .spacer { flex: 1; }
.btn--back .chip { transform: scaleX(-1); }
.btn--back:hover .chip { transform: scaleX(-1) translateX(3px); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.saved-hint { font-size: .8rem; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 6px; opacity: 0; transition: opacity .4s var(--ease); }
.saved-hint.is-on { opacity: 1; }
.saved-hint .icon { width: 14px; height: 14px; color: #17663a; }
html:not(.js) .js-only { display: none !important; }

/* Success */
.apply-done { text-align: center; padding-block: clamp(24px, 4vw, 48px); }
.apply-done .badge {
  width: 72px; height: 72px; margin: 0 auto 22px;
  border-radius: var(--r-pill); display: grid; place-items: center;
  background: #e8f6ed; color: #17663a;
  animation: pop .6s var(--ease-out);
}
.apply-done .badge .icon { width: 34px; height: 34px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.apply-done h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.apply-done p { margin-inline: auto; }
.apply-done .ref { font-family: var(--font-display); font-weight: 700; color: var(--navy-950); }

/* Step transition */
.js .apply-step.is-entering { animation: stepIn .45s var(--ease-out); }
@keyframes stepIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .apply-layout { grid-template-columns: 1fr; }
  .apply-aside { position: static; }
  .js .apply-aside .stepper, .js .apply-aside .aside-note { display: none; }
  .js .apply-progress { display: block; }
}
@media (max-width: 640px) {
  .form-grid--3 { grid-template-columns: 1fr 1fr; }
  .form-grid--3 .field:first-child { grid-column: 1 / -1; }
  .choice { grid-template-columns: 1fr; }
  .review-block dl { grid-template-columns: 1fr; gap: 2px; }
  .review-block dd { margin-bottom: 8px; }
  .apply-nav .btn { padding-left: 18px; }
  .saved-hint { display: none; }
  .repeat-item { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .apply-step.is-entering, .repeat-item, .apply-done .badge { animation: none; }
}

/* ---------- Plugin additions ---------- */
.ppec .icon { width: 1em; height: 1em; fill: currentColor; flex: none; }
.js .ppec .no-js-only { display: none; }
.ppec .btn-label { display: inline; }
/* No JS: conditional fields stay visible, so label them. */
html:not(.js) .ppec #step-education .req { display: none; }
