/* 官网招聘与投递；沿用 role-pages 的字体、颜色及按钮。 */
body[data-role-page="candidate"] [hidden] { display: none !important; }

/* Keep one resume entry in the header, including when navigation is collapsed. */
body[data-role-page="candidate"] .primary-nav { margin-left: auto; margin-right: 36px; }
body[data-role-page="candidate"] .site-header__inner > .button { flex: 0 0 auto; }

@media (max-width: 1179px) {
  body[data-role-page="candidate"] .primary-nav { margin-right: 24px; }
  body[data-role-page="candidate"] .site-header__inner > .button { min-width: 156px; }
}

@media (max-width: 959px) {
  body[data-role-page="candidate"] .primary-nav { margin-right: 18px; }
  body[data-role-page="candidate"] .site-header__inner > .button { min-width: 132px; }
}

@media (max-width: 767px) {
  body[data-role-page="candidate"] .primary-nav { margin: 0; }
  body[data-role-page="candidate"] .site-header__inner > .button { order: 1; min-width: 104px; margin-left: auto; padding-inline: 14px; }
  body[data-role-page="candidate"] .menu-toggle { order: 2; margin-left: 8px; flex: 0 0 auto; }
}

/* Unsplash 建筑底图已做浅色与底部渐隐处理，只覆盖职位搜索区顶部。 */
.candidate-jobs {
  position: relative;
  isolation: isolate;
  padding-bottom: 40px;
}

.candidate-jobs + .role-form-section {
  padding-top: 40px;
}

.candidate-jobs::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 400px;
  background: url("./assets/candidate-careers-bg.webp") center top / cover no-repeat;
  pointer-events: none;
  content: "";
}

@media (max-width: 767px) {
  .candidate-jobs { padding-bottom: 28px; }
  .candidate-jobs + .role-form-section { padding-top: 28px; }

  .candidate-jobs::before {
    height: 360px;
    background-position: 60% top;
  }
}

.recruitment-status { margin: 24px 0 0; color: var(--muted); font-size: 12px; }
.recruitment-retry { margin-top: 12px; }

.candidate-jobs .job-listing {
  min-height: 146px;
  padding: 20px 28px;
  align-items: center;
}

.candidate-jobs .job-listing__main { min-width: 0; }
.candidate-jobs .job-listing .job-company { margin-top: 6px; }
.candidate-jobs .job-listing .job-facts { margin-top: 12px; }
.candidate-jobs .job-listing__action { align-self: stretch; gap: 12px; }

.candidate-jobs .job-listing__heading {
  align-items: flex-start;
}

.candidate-jobs .job-listing__heading > .job-tags {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
  margin-left: auto;
}

.candidate-jobs .job-tags .job-tag--overseas {
  color: var(--brand-strong);
  background: #eaf2ff;
}

/* A factual salary highlight, using the same threshold as the 100万以上 filter. */
.candidate-jobs .job-listing--high-salary {
  --job-salary-accent: #d65b17;
}

.candidate-jobs .job-listing--high-salary .job-listing__action > strong {
  color: var(--job-salary-accent);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.job-listing__title {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.job-listing__title h3 { min-width: 0; overflow-wrap: anywhere; }

.job-salary-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--job-salary-accent);
  line-height: 1;
}

.job-salary-badge svg { width: 22px; height: 22px; overflow: visible; }
.job-salary-badge__flame,
.job-salary-badge__spark { transform-box: fill-box; transform-origin: 50% 80%; animation-play-state: paused; }
.job-salary-badge__flame { animation: job-flame-flicker 3.6s ease-in-out infinite paused; }
.job-salary-badge__spark { transform-origin: center; animation: job-spark-twinkle 3.6s ease-in-out infinite paused; }
.is-highlight-visible .job-salary-badge__flame,
.is-highlight-visible .job-salary-badge__spark { animation-play-state: running; }
.job-listing--high-salary:hover .job-salary-badge__flame,
.job-listing--high-salary:focus-within .job-salary-badge__flame { animation-duration: 1.8s; }
.job-list.is-highlight-paused .job-salary-badge__flame,
.job-list.is-highlight-paused .job-salary-badge__spark { animation-play-state: paused; }

@keyframes job-flame-flicker {
  0%, 38%, 72%, 100% { transform: scale(1) rotate(0); }
  46% { transform: scale(.94, 1.09) rotate(-4deg); }
  56% { transform: scale(1.04, .97) rotate(3deg); }
}

@keyframes job-spark-twinkle {
  0%, 34%, 76%, 100% { transform: scale(.8); opacity: .65; }
  48%, 60% { transform: scale(1.12); opacity: 1; }
}

@media (max-width: 767px) {
  .candidate-jobs .job-listing { min-height: 0; padding: 18px; gap: 16px; }
  .candidate-jobs .job-listing__heading { flex-wrap: wrap; gap: 8px 14px; }
  .job-listing__title { gap: 6px 8px; }
  .candidate-jobs .job-listing__action { padding-top: 14px; flex-wrap: wrap; }
  .candidate-jobs .job-listing__action > strong { white-space: nowrap; }
  .candidate-jobs .job-listing__action .button { flex-shrink: 0; margin-left: auto; }
  .candidate-jobs .job-listing--high-salary .job-listing__action > strong { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .job-salary-badge__flame,
  .job-salary-badge__spark { animation: none; }
}

.application-hint { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.application-error { margin: 16px 0; color: #b13b35; font-size: 13px; line-height: 1.8; }
.form-submit:disabled { cursor: wait; opacity: .65; }
.position-dialog { width: calc(100% - 36px); max-width: 700px; max-height: 88dvh; padding: 32px; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-container); overflow-y: auto; overscroll-behavior: contain; }
.position-dialog::backdrop { background: rgb(14 20 33 / 48%); }
body:has(.position-dialog[open]) { overflow: hidden; }
.position-dialog__close { position: absolute; top: 10px; right: 10px; width: 42px; height: 42px; color: var(--muted); font-size: 26px; line-height: 1; background: transparent; border: 0; cursor: pointer; }
.position-dialog h2 { margin: 10px 32px 8px 0; font-size: 25px; line-height: 1.5; }
.position-dialog h3 { margin: 26px 0 10px; font-size: 16px; }
.position-dialog__salary { display: block; margin-top: 18px; font-size: 22px; font-variant-numeric: tabular-nums; }
.position-description { margin: 0; color: #4a5361; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.position-dialog__footer { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.position-dialog__footer p { color: var(--muted); font-size: 12px; }
.position-dialog__footer button { flex-shrink: 0; }
@media (max-width: 767px) {
  .position-dialog { padding: 25px 20px; }
  .position-dialog h2 { font-size: 22px; }
  .position-dialog__footer { flex-direction: column; align-items: stretch; gap: 10px; }
}

/* Candidate-specific context and resume upload controls. */
.candidate-apply__context {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.candidate-apply__context dl,
.candidate-apply__context dd { margin: 0; }

.candidate-apply__context dt {
  margin-bottom: 6px;
  color: #66768b;
  font-size: 12px;
}

.candidate-apply__context dd {
  color: #25415f;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.candidate-apply__context p {
  margin: 8px 0 0;
  color: #66768b;
  font-size: 12px;
  line-height: 1.7;
  text-wrap: pretty;
}

.candidate-apply__file-hint {
  color: #66768b;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
}

.candidate-apply .application-hint {
  color: #66768b;
  font-size: 11px;
  line-height: 1.8;
}

@media (max-width: 767px) {
  .candidate-apply__context dd { font-size: 14px; }
}
