/* ============================================================================
   The application, asked six steps at a time — /talent-pool and every
   /vacancies/<slug>. Loaded after site.css (see $page_css), which already
   dresses every field inside the form: what is here is the wizard around them.

   IN PIXELS, like the vacancies sheet and for the same reason: the root
   font-size on this site is 70% and steps down to 45% on a narrow screen, and
   a control a finger has to hit must not shrink with it.
   ========================================================================= */

/* ---- the two doors ---- */
.apw-gate { display: flex; flex-direction: column; gap: 14px; max-width: 520px; margin: 0 0 8px; }
.apw-door {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left;
  padding: 20px 22px; border: 1.5px solid var(--navy); border-radius: 3px;
  background: transparent; color: var(--navy); cursor: pointer;
  transition: background-color .15s, color .15s;
}
.apw-door:hover { background: var(--navy); color: var(--white); }
.apw-door-t { font-family: var(--kanit); font-weight: 600; font-size: 17px; text-transform: uppercase; letter-spacing: .03em; }
.apw-door-s { font-size: 13px; color: var(--mid); }
.apw-door:hover .apw-door-s { color: var(--white); }

/* ---- the step rail ----
   Numbers, not a progress bar: a bar says how far along you are, a rail says
   what the steps ARE — which is the question somebody has on step one. */
.apw-rail { display: flex; align-items: center; list-style: none; margin: 0 0 28px; padding: 0; gap: 0; flex-wrap: wrap; }
.apw-r { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.apw-r:last-child { flex: 0 0 auto; }
.apw-r::after {
  content: ''; flex: 1; height: 1.5px; background: var(--rule); margin: 0 10px; min-width: 12px;
}
.apw-r:last-child::after { display: none; }
.apw-r.done::after { background: var(--navy); }
.apw-r-b {
  display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 0;
  cursor: pointer; min-height: 44px; color: inherit;
}
.apw-r-n {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--kanit); font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--line-strong); background: var(--white); color: var(--mid);
}
.apw-r-l { font-size: 12px; color: var(--mid); white-space: nowrap; }
.apw-r.on .apw-r-n { border-color: var(--navy); color: var(--navy); }
.apw-r.on .apw-r-l { color: var(--navy); font-weight: 600; }
.apw-r.done .apw-r-n { background: var(--navy); border-color: var(--navy); color: var(--white); }
.apw-r.done .apw-r-l { color: var(--navy); }
/* A step with something still missing. Not an error -- a person is allowed to walk
   ahead and look -- so it is the gold of the brand and not the red of a refusal. */
.apw-r.todo .apw-r-n { border-color: var(--gold); color: var(--gold); }
.apw-r.todo.on .apw-r-n { background: var(--gold); border-color: var(--gold); color: var(--white); }

/* ---- steps ---- */
.apw-h { font-family: var(--kanit); font-weight: 400; font-size: 24px; color: var(--navy); margin: 0 0 18px; }
.apw-step { margin: 0; }
.apw-step + .apw-step { margin-top: 40px; }          /* only ever seen with no script */

/* ---- repeatable one- and two-column rows (links, registrations) ---- */
.af-rows { display: flex; flex-direction: column; gap: 10px; }
.af-row2 { display: grid; grid-template-columns: 150px 1fr; gap: 8px; align-items: start; position: relative; }
.af-row1 { display: block; position: relative; }
.af-row-add {
  align-self: flex-start; background: none; border: 1px solid var(--rule); cursor: pointer;
  font-family: var(--kanit); font-size: 13px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--navy); padding: 9px 16px; min-height: 40px;
}
.af-row-add:hover { border-color: var(--navy); }
/* The "there is nothing to put here" answer, one line under its own block. */
.af-none { margin-top: 10px; }

/* ---- cover letter toolbar ---- */
.af-ta-bar {
  display: flex; gap: 4px; align-items: center; padding: 8px;
  background: var(--light); border: 1px solid var(--rule); border-bottom: 0;
}
.af-ta-b {
  width: 32px; height: 32px; border: 1px solid var(--rule); background: var(--white);
  cursor: pointer; color: var(--navy); font-size: 14px; line-height: 1;
}
.af-ta-b:hover { border-color: var(--navy); }
.af-ta-count { margin-left: auto; font-size: 11px; color: var(--mid); }

/* ---- the bar at the bottom ---- */
.apw-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--rule);
}
.apw-nav-r { display: flex; gap: 10px; align-items: center; margin-left: auto; flex-wrap: wrap; }
/* Back, Review and Save as PDF are the quiet ones: four solid navy buttons in a row give
   equal weight to "send this application" and "look at it again", and only one of those
   cannot be undone. */
.apw-nav .btn.ghost {
  background: transparent; color: var(--navy); border: 1.5px solid var(--navy);
}
.apw-nav .btn.ghost:hover { background: var(--navy); color: var(--white); }
.apw-say { margin-top: 14px; font-size: 14px; color: var(--gold); }
.apw-say b { color: var(--navy); font-weight: 600; }
.apw-say ul { margin: 6px 0 0; padding: 0; list-style: none; }
.apw-say li { font-size: 13px; color: var(--mid); padding: 2px 0; }
.apw-say a { color: var(--navy); text-decoration: underline; }

/* ---- draft notice ---- */
.apw-draft {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  border: 1px solid var(--rule); border-left: 4px solid var(--gold);
  background: var(--light); padding: 12px 16px; margin-bottom: 18px; font-size: 14px;
}
.apw-draft button {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: var(--navy); text-decoration: underline;
}

/* ---- the review sheet ---- */
.apw-review-note { margin-bottom: 18px; }
.apw-rv-g { margin: 0 0 22px; }
.apw-rv-h {
  font-family: var(--kanit); font-size: 13px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--navy); padding-bottom: 6px;
  border-bottom: 2px solid var(--gold); margin: 0 0 10px;
}
.apw-rv-r { display: grid; grid-template-columns: 220px 1fr; gap: 4px 18px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.apw-rv-r:last-child { border-bottom: 0; }
.apw-rv-k { font-family: var(--kanit); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--mid); }
.apw-rv-v { font-size: 14px; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.apw-rv-v.empty { color: var(--gold); font-style: italic; }

/* ---- printing the review: the page becomes the sheet ----
   No PDF library. The browser's own "save as PDF" is the export, and everything
   that is not the review is taken off the paper. */
@media print {
  header, .site-foot, .page-hero, .apw-rail, .apw-nav, .apw-gate, #apply-back,
  .apw-step, .apw-draft, .apw-say, .section-head, .breadcrumb { display: none !important; }
  .apw-review[hidden] { display: block !important; }
  .apw-review { display: block !important; }
  body, .page-section, .container { background: #fff !important; padding: 0 !important; margin: 0 !important; }
  .apw-rv-r { break-inside: avoid; }
  .apw-h { font-size: 20px; }
}

/* ---- phone ---- */
@media (max-width: 700px) {
  /* Six numbered circles and no words is not a rail, it is a row of dots. The
     step a person is ON keeps its name; the rest are numbers, and the name is
     printed again as the step's own heading directly below. */
  .apw-r-l { display: none; }
  .apw-r.on .apw-r-l { display: inline; }
  .apw-r::after { margin: 0 6px; min-width: 6px; }
  .apw-nav { flex-direction: column-reverse; align-items: stretch; }
  .apw-nav-r { margin-left: 0; }
  .apw-nav .btn, .apw-nav-r .btn { width: 100%; justify-content: center; }
  .af-row2 { grid-template-columns: 1fr; }
  .apw-rv-r { grid-template-columns: 1fr; }
}

/* ---- the position, stated rather than chosen (the vacancy form) ---- */
.apw-fixed {
  border: 1px solid var(--rule); border-left: 4px solid var(--gold);
  background: var(--light); padding: 16px 18px; margin-bottom: 24px;
}
.apw-fixed-t { font-family: var(--kanit); font-size: 20px; color: var(--navy); margin-top: 4px; }
.apw-fixed-m { font-size: 13px; color: var(--mid); margin-top: 2px; }
.apw-fixed-a { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--navy); text-decoration: underline; }

/* ---- what a position asks for, folded into its own row ---- */
.af-plist .af-chk { flex-wrap: wrap; }
.af-chk-n {
  flex: 0 0 auto; font-family: var(--kanit); font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 2px; padding: 1px 6px;
}
.af-req-b {
  flex: 0 0 auto; background: none; border: 0; padding: 4px 6px; cursor: pointer;
  font-family: var(--kanit); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--navy); text-decoration: underline; min-height: 32px;
}
.af-req-b:hover { color: var(--gold); }
.af-req {
  flex: 0 0 100%; margin-top: 8px; padding: 12px 14px;
  background: var(--white); border: 1px solid var(--rule); border-radius: 2px;
  font-size: 13px; line-height: 1.55; color: var(--text); cursor: default;
}
.af-req h5 {
  font-family: var(--kanit); font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mid); margin: 10px 0 4px;
}
.af-req ul { margin: 0; padding: 0; list-style: none; }
.af-req li { position: relative; padding-left: 14px; margin: 3px 0; }
.af-req li::before { content: ''; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; background: var(--gold); }
.af-req p { margin: 0 0 6px; }
.af-req-k { color: var(--mid); }
.af-req-k b { color: var(--navy); font-weight: 600; }

/* ---- a role we do not have ---- */
.af-other { margin-top: 14px; }
.af-other-row { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }

/* ---- the cover letter: a small editor, and what it will look like ---- */
.af-ta-bar { flex-wrap: wrap; }
.af-ta-b {
  width: auto; min-width: 32px; height: 32px; padding: 0 8px;
  font-family: var(--kanit); font-size: 13px; letter-spacing: .02em;
}
.af-ta-b.on { background: var(--navy); color: var(--white); border-color: var(--navy); }
.af-ta-sep { flex: 1; }
.af-ta { min-height: 180px; }
.af-ta-preview {
  border: 1px solid var(--rule); border-top: 0; background: var(--white);
  padding: 14px 16px; font-size: 15px; line-height: 1.6; color: var(--text);
  min-height: 180px;
}
.af-ta-preview p { margin: 0 0 10px; }
.af-ta-preview ul { margin: 0 0 10px 20px; list-style: disc; }
.af-ta-preview ol { margin: 0 0 10px 20px; list-style: decimal; }
.af-ta-preview li { margin: 2px 0; }
.af-ta-preview strong { color: var(--navy); }

/* ---- what is still missing: said above the step, and marked on the field ---- */
.apw-say { margin: 0 0 22px; padding: 14px 16px; border: 1px solid var(--gold); border-left-width: 4px; background: var(--white); }
.af-inp.is-missing, .af-ta.is-missing { border-color: var(--gold); }
.af-inp.is-missing:focus { border-color: var(--gold); }
.af-consent input.is-missing, .af-chk input.is-missing { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---- the step rail does not wrap ----
   Six circles and one label do not fit 390px: the sixth used to drop to a line of its own
   and sit there like a stray. It scrolls sideways instead, with the current step brought
   into view by the script. */
@media (max-width: 700px) {
  .apw-rail {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin-left: -2rem; margin-right: -2rem; padding: 0 2rem 4px;
  }
  .apw-rail::-webkit-scrollbar { display: none; }
  .apw-r { flex: 0 0 auto; }
  .apw-r::after { flex: 0 0 14px; min-width: 14px; }
}

/* ---- /vacancies/<slug>/apply — the application on its own page ----
   Light, like the vacancies list, and with no dark hero: the clearance under the fixed
   header comes from --hdr-h with a pixel floor, the same way /vacancies takes it. The
   rules are HERE rather than reused from vacancies.css because a page loads exactly one
   sheet of its own, and copying that whole sheet across for four rules is how two
   stylesheets start disagreeing. */
.apw-page { padding-top: calc(var(--hdr-h, 96px) + 40px); padding-bottom: 64px; }
.apw-head-b { max-width: 760px; margin-bottom: 36px; }
.apw-bc {
  font-family: var(--kanit); font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--mid); margin-bottom: 14px;
}
.apw-bc a:hover { color: var(--gold); }
.apw-bc .sep { color: var(--gold); margin: 0 .6em; }
.apw-head-b h1 {
  font-family: var(--kanit); font-weight: 300; font-size: clamp(32px, 4vw, 44px);
  line-height: 1.05; color: var(--navy); margin: 0 0 14px;
}
.apw-head-b h1 em { color: var(--gold); font-style: normal; }
.apw-head-b p { font-size: 15px; line-height: 1.6; color: var(--mid); margin: 0; }
@media (max-width: 560px) {
  .apw-page { padding-top: calc(var(--hdr-h, 96px) + 24px); }
  .apw-head-b { margin-bottom: 24px; }
}

/* ---- your own applications, and the one you chose to correct ---- */
.af-mine { margin: 12px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.af-mine-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--rule); background: var(--white); padding: 10px 14px; border-radius: 2px;
}
.af-mine-t { font-size: 14px; color: var(--text); }
.af-mine-t .af-hint { display: block; }
.af-mine-row .btn { white-space: nowrap; }

/* The kicker above the heading: it says what the page IS, which "Apply for Future" does
   not. Same words the dark band used to carry, in the light page's voice. */
.apw-kicker {
  display: block; font-family: var(--kanit); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
}
