/* ---------------------------------------------------------------------------
   Help Center
   ---------------------------------------------------------------------------
   Loaded only on /help/ and its guides, from inc/enqueue.php.

   Why this file exists at all, when every other pattern styles itself inline:
   the inline styling elsewhere is a constraint carried over from the design
   tool the marketing pages were authored in, not a house preference — the
   project README says so directly. A guide is mostly repeated prose, and
   inline-styling several hundred paragraphs, list items and table cells makes
   each new guide expensive to write and impossible to restyle afterwards. So
   the guides get a real stylesheet and the marketing pages keep their inline
   styles; nothing here leaks outside the Help pages.

   Tokens come from base.css. Cards, badges, buttons and checklists come from
   components.css and are not redefined here.

   Breakpoints are the three in RESPONSIVE-SPEC.md — phone below 768, tablet
   768 to 1023, desktop 1024 and up — mobile first, columns added upward.
   --------------------------------------------------------------------------- */

/* ------------------------------------------------------------------ shell */

.jd-help {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--jd-slate-800);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

.jd-help-hero {
  background:
    radial-gradient(45% 55% at 85% 8%, rgba(56, 189, 248, .07) 0%, rgba(56, 189, 248, 0) 62%),
    #ffffff;
}

.jd-help-hero__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 88px 24px 40px;
  text-align: center;
}

.jd-help-hero__lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--jd-body);
  margin: 20px auto 0;
  max-width: 58ch;
}

/* Matches the eyebrow chip on FAQ and Resources. */
.jd-help-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border-radius: var(--jd-radius-full);
  background: var(--jd-sky-tint);
  color: var(--jd-sky-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.jd-help-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* --------------------------------------------------------------- hub: steps */

.jd-help-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 28px 0 0;
}

.jd-help-step {
  position: relative;
  padding: 22px 22px 22px 20px;
  border: 1px solid var(--jd-border);
  border-left: 3px solid var(--jd-sky);
  border-radius: var(--jd-radius-lg);
  background: #ffffff;
}

.jd-help-step__n {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--jd-sky-deep);
  margin: 0 0 8px;
}

.jd-help-step__t {
  font-size: 16px;
  font-weight: 700;
  color: var(--jd-contrast);
  margin: 0 0 6px;
}

.jd-help-step p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--jd-body);
  margin: 0;
}

/* --------------------------------------------------------------- hub: cards */

.jd-help-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 28px 0 0;
}

/* The whole card is the link, so the hit area is the card and not just the
   title. Everything inside inherits, which keeps the card from turning into a
   wall of underlined sky-blue text. */
.jd-help-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius-lg);
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
  color: inherit;
  text-decoration: none;
  transition: transform .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s cubic-bezier(.4, 0, .2, 1), border-color .2s cubic-bezier(.4, 0, .2, 1);
}

.jd-help-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .08);
  border-color: var(--jd-sky-soft);
  color: inherit;
}

.jd-help-card__kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--jd-sky-deep);
  margin: 0 0 10px;
}

.jd-help-card__title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--jd-contrast);
  margin: 0 0 10px;
}

.jd-help-card__desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--jd-body);
  margin: 0 0 16px;
}

.jd-help-card__list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.jd-help-card__list li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--jd-faint);
}

.jd-help-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--jd-sky);
}

.jd-help-card__more {
  margin-top: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--jd-sky-deep);
}

/* ------------------------------------------------------------- guide layout */

.jd-guide {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 24px;
}

.jd-guide__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

.jd-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--jd-muted);
  margin: 0 0 18px;
}

.jd-breadcrumb a {
  color: var(--jd-sky-deep);
  text-decoration: none;
}

.jd-breadcrumb a:hover {
  text-decoration: underline;
}

/* ----------------------------------------------------- guide: contents list */

/* Plain anchors, no scrollspy. A guide is short enough that highlighting the
   current section buys little, and skipping it keeps the whole Help Center
   free of JavaScript. */
.jd-toc {
  border: 1px solid var(--jd-border);
  border-radius: 14px;
  padding: 20px 22px;
  background: var(--jd-off-white);
}

.jd-toc__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--jd-faint);
  margin: 0 0 12px;
}

.jd-toc ol {
  list-style: none;
  counter-reset: jd-toc;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.jd-toc li {
  counter-increment: jd-toc;
}

.jd-toc a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  /* 44px tap target on touch, per the accessibility rules in the README. */
  min-height: 44px;
  padding: 10px 10px 10px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #334155;
  text-decoration: none;
  transition: background .15s cubic-bezier(.4, 0, .2, 1), color .15s cubic-bezier(.4, 0, .2, 1);
}

.jd-toc a::before {
  content: counter(jd-toc);
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--jd-muted);
}

.jd-toc a:hover {
  background: var(--jd-sky-wash);
  color: var(--jd-sky-deep);
}

.jd-toc a:hover::before {
  color: var(--jd-sky-deep);
}

/* --------------------------------------------------------- guide: prose */

.jd-doc {
  min-width: 0;
}

.jd-doc > section {
  /* Clears the 72px fixed header when an anchor link jumps here. */
  scroll-margin-top: 92px;
  padding: 0 0 8px;
}

.jd-doc > section + section {
  margin-top: 44px;
  padding-top: 40px;
  border-top: 1px solid var(--jd-border-soft);
}

.jd-doc h2 {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 300;
  font-size: 34px;
  line-height: 1.18;
  color: var(--jd-contrast);
  margin: 0 0 16px;
  text-wrap: balance;
}

.jd-doc h3 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--jd-contrast);
  margin: 32px 0 12px;
}

.jd-doc h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--jd-contrast);
  margin: 24px 0 10px;
}

.jd-doc p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--jd-body);
  margin: 0 0 16px;
  max-width: 68ch;
  text-wrap: pretty;
}

.jd-doc p:last-child {
  margin-bottom: 0;
}

.jd-doc strong {
  color: var(--jd-contrast);
  font-weight: 700;
}

.jd-doc a {
  color: var(--jd-sky-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.jd-doc ul,
.jd-doc ol {
  margin: 0 0 18px;
  padding-left: 22px;
  max-width: 68ch;
}

.jd-doc li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--jd-body);
  margin: 0 0 8px;
}

.jd-doc li::marker {
  color: var(--jd-sky);
}

/* Numbered procedure, where the order is the point. */
.jd-steps {
  list-style: none;
  counter-reset: jd-step;
  margin: 0 0 20px;
  padding: 0;
  max-width: 68ch;
}

.jd-steps > li {
  position: relative;
  counter-increment: jd-step;
  padding: 0 0 0 44px;
  margin: 0 0 18px;
}

.jd-steps > li::before {
  content: counter(jd-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--jd-sky-tint);
  color: var(--jd-sky-deep);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ------------------------------------------------------------ guide: tables */

/* Acceptance point in RESPONSIVE-SPEC.md: a wide table scrolls inside its own
   box. It must never widen the page. */
.jd-doc-tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius-lg);
  margin: 0 0 20px;
}

.jd-doc-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 14px;
}

.jd-doc-table th {
  text-align: left;
  padding: 13px 16px;
  background: var(--jd-off-white);
  border-bottom: 1px solid var(--jd-border);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--jd-faint);
  white-space: nowrap;
}

.jd-doc-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--jd-border-soft);
  color: var(--jd-body);
  line-height: 1.6;
  vertical-align: top;
}

.jd-doc-table tr:last-child td {
  border-bottom: none;
}

.jd-doc-table td strong {
  color: var(--jd-contrast);
}

/* ----------------------------------------------------------- guide: callout */

.jd-callout {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  margin: 0 0 20px;
  border: 1px solid #cde9fb;
  border-left: 3px solid var(--jd-sky);
  border-radius: var(--jd-radius-lg);
  background: var(--jd-sky-wash);
  max-width: 68ch;
}

.jd-callout__icon {
  flex: none;
  color: var(--jd-sky-deep);
  margin-top: 2px;
}

.jd-callout p {
  font-size: 14.5px;
  line-height: 1.65;
  color: #0c4a6e;
  margin: 0;
  max-width: none;
}

.jd-callout p + p {
  margin-top: 10px;
}

/* ------------------------------------------------------------ guide: mockups */

/* Hand-built stand-ins for the app UI. Not screenshots, so they never go stale
   against a rebuild of the product and cost nothing to keep in the repo. */
.jd-mock {
  border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius-lg);
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
  overflow: hidden;
  margin: 0 0 12px;
}

.jd-mock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--jd-off-white);
  border-bottom: 1px solid var(--jd-border);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--jd-faint);
}

.jd-mock__body {
  padding: 16px;
}

.jd-mock__caption {
  font-size: 13px;
  line-height: 1.55;
  color: var(--jd-muted);
  margin: 0 0 22px;
  max-width: 68ch;
}

/* Tabs strip, as it reads inside a Job Drive. */
.jd-mock-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jd-mock-tab {
  padding: 7px 14px;
  border-radius: var(--jd-radius-full);
  border: 1px solid var(--jd-border);
  background: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--jd-body);
}

.jd-mock-tab.is-active {
  background: var(--jd-sky);
  border-color: var(--jd-sky);
  color: var(--jd-contrast);
}

/* A candidate row: name and detail on the left, score and rating on the right. */
.jd-mock-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--jd-border-soft);
}

.jd-mock-row:first-child {
  padding-top: 0;
}

.jd-mock-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.jd-mock-row__main {
  flex: 1 1 220px;
  min-width: 0;
}

.jd-mock-row__name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--jd-contrast);
}

.jd-mock-row__meta {
  font-size: 13px;
  line-height: 1.5;
  color: var(--jd-muted);
  margin-top: 3px;
}

.jd-mock-row__score {
  flex: none;
  font-size: 15px;
  font-weight: 800;
  color: var(--jd-contrast);
  font-variant-numeric: tabular-nums;
}

.jd-mock-reason {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--jd-radius-md);
  background: var(--jd-off-white);
  border: 1px solid var(--jd-border-soft);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--jd-body);
}

.jd-mock-reason__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--jd-muted);
  margin-bottom: 5px;
}

/* Two-stage matching diagram. */
.jd-mock-stages {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.jd-stage {
  padding: 18px;
  border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius-lg);
  background: #ffffff;
}

.jd-stage__n {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--jd-sky-deep);
}

.jd-stage__t {
  font-size: 15px;
  font-weight: 700;
  color: var(--jd-contrast);
  margin: 6px 0 6px;
}

.jd-stage p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--jd-body);
  margin: 0;
  max-width: none;
}

/* What happens after a candidate submits, as a vertical run of beats. */
.jd-timeline {
  list-style: none;
  counter-reset: jd-tl;
  margin: 0;
  padding: 0;
}

.jd-timeline > li {
  position: relative;
  counter-increment: jd-tl;
  padding: 0 0 24px 42px;
}

.jd-timeline > li::before {
  content: counter(jd-tl);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--jd-sky);
  color: var(--jd-contrast);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* The connecting rail, drawn from each marker down to the next. */
.jd-timeline > li::after {
  content: "";
  position: absolute;
  left: 12.5px;
  top: 26px;
  bottom: 0;
  width: 1px;
  background: var(--jd-border);
}

.jd-timeline > li:last-child {
  padding-bottom: 0;
}

.jd-timeline > li:last-child::after {
  display: none;
}

.jd-timeline__t {
  font-size: 15px;
  font-weight: 700;
  color: var(--jd-contrast);
  margin: 3px 0 6px;
}

.jd-timeline p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--jd-body);
  margin: 0;
}

/* --------------------------------------------------------- guide: prev/next */

.jd-guide-next {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 44px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--jd-border);
}

.jd-guide-next a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius-lg);
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s cubic-bezier(.4, 0, .2, 1);
}

.jd-guide-next a:hover {
  border-color: var(--jd-sky-soft);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .08);
}

.jd-guide-next__dir {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--jd-muted);
  margin-bottom: 6px;
}

.jd-guide-next__t {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--jd-contrast);
  line-height: 1.4;
}

/* ---------------------------------------------------------------- foot CTA */

.jd-help-cta {
  background: #f5f6f7;
}

.jd-help-cta__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 24px;
  text-align: center;
}

.jd-help-cta__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0 0;
}

/* Ink on sky, roughly 8:1. White on sky is about 2:1 and fails, which is why
   every primary button on this site is dark-on-sky. */
.jd-help-cta__primary {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 26px;
  border-radius: 10px;
  background: var(--jd-sky);
  color: var(--jd-contrast);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(56, 189, 248, .4);
}

.jd-help-cta__primary:hover {
  background: var(--jd-sky-mid);
  color: var(--jd-contrast);
}

.jd-help-cta__ghost {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: var(--jd-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.jd-help-cta__ghost:hover {
  border-color: var(--jd-sky);
  color: var(--jd-ink);
}

/* ------------------------------------------------------------- tablet up */

@media (min-width: 768px) {
  .jd-help-hero__inner {
    padding: 100px 32px 44px;
  }

  .jd-help-section {
    padding: 56px 32px;
  }

  .jd-guide {
    padding: 0 32px 32px;
  }

  .jd-help-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .jd-help-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .jd-mock-stages {
    grid-template-columns: repeat(2, 1fr);
  }

  .jd-guide-next {
    grid-template-columns: repeat(2, 1fr);
  }

  .jd-help-cta__inner {
    padding: 68px 32px;
  }
}

/* ------------------------------------------------------------ desktop up */

@media (min-width: 1024px) {
  .jd-help-steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .jd-help-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  /* The contents list moves alongside the body and follows the reader down.
     Below this width it stays in the flow, above the guide, where a sticky
     panel would eat most of a phone screen. */
  .jd-guide__grid {
    grid-template-columns: 244px minmax(0, 1fr);
    gap: 56px;
  }

  .jd-toc {
    position: sticky;
    /* 72px of fixed header, plus room to breathe. */
    top: 96px;
    max-height: calc(100vh - 128px);
    overflow-y: auto;
  }
}

/* Someone who asked for less movement should not get a panel that tracks the
   scroll, and the site gates every scroll-driven effect this way already. */
@media (prefers-reduced-motion: reduce) {
  .jd-toc {
    position: static;
    max-height: none;
  }

  .jd-help-card,
  .jd-guide-next a {
    transition: none;
  }

  .jd-help-card:hover {
    transform: none;
  }
}

/* ---------------------------------------------------------------------------
   Help Center search

   Filters the guide cards in place. Rendered hidden by the pattern and revealed
   by help-search.js, so no-JS visitors get the full list instead of a dead box.
   --------------------------------------------------------------------------- */
.jd-help-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  margin: 30px auto 0;
  padding: 0 14px;
  border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius-full);
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.jd-help-search:focus-within {
  border-color: var(--jd-sky-deep);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .20);
}

.jd-help-search__icon {
  display: flex;
  flex: 0 0 auto;
  color: var(--jd-faint);
}

.jd-help-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 13px 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 15.5px;
  color: var(--jd-contrast);
}

.jd-help-search__input::placeholder { color: var(--jd-faint); }
.jd-help-search__input:focus { outline: none; } /* the ring lives on the wrapper */

/* Safari paints its own control inside type="search"; ours is the X button. */
.jd-help-search__input::-webkit-search-decoration,
.jd-help-search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.jd-help-search__clear {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: var(--jd-radius-full);
  background: var(--jd-border-soft);
  color: var(--jd-body);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.jd-help-search__clear:hover { background: var(--jd-border); }

/* Cards are anchors in a grid; `hidden` alone loses to `display: flex`. */
.jd-help-card[hidden] { display: none; }

.jd-help-card__list li.is-match {
  color: var(--jd-contrast);
  font-weight: 700;
}

.jd-help-empty {
  margin: 26px 0 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--jd-body);
}

.jd-help-empty[hidden] { display: none; }

@media (max-width: 600px) {
  .jd-help-search { margin-top: 22px; }
  .jd-help-search__input { font-size: 16px; } /* under 16px iOS zooms on focus */
}
