/* ============ Careers site ============ */
:root {
  --ink: #1f2733;
  --ink-soft: #5b6673;
  --line: #e2e7ef;
  --surface: #ffffff;
  --canvas: #f0f2f5;
  --danger: #b02a37;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 0 60px;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-primary); }

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

/* ---------------- header ---------------- */
.careers-head {
  background: var(--surface);
  text-align: center;
  padding: 44px 20px 30px;
}
.brand-logo { width: 300px; max-width: 90%; height: auto; max-height: none; margin-bottom: 18px; }
.brand-wordmark {
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--brand-primary); margin-bottom: 14px;
}
.careers-head h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.lede { margin: 0 auto; max-width: 620px; color: var(--ink-soft); font-size: 16px; }

.openings-pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px; padding: 7px 16px;
  background: color-mix(in srgb, var(--brand-primary) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 22%, #fff);
  color: var(--brand-primary);
  border-radius: 999px; font-size: 13.5px; font-weight: 600;
}

/* ---------------- tabs ---------------- */
.role-tabs {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.role-tabs::-webkit-scrollbar { display: none; }
.role-tabs-inner {
  display: flex; gap: 4px;
  max-width: 1180px; margin: 0 auto; padding: 0 20px;
}
.role-tab {
  flex: 0 0 auto;
  padding: 15px 14px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px; font-weight: 600;
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
}
.role-tab:hover { color: var(--ink); }
.role-tab.is-active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }

/* ---------------- job grid ---------------- */
.jobs-wrap { max-width: 1180px; margin: 0 auto; padding: 34px 20px 0; }
.job-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.job-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  display: flex; flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease;
}
.job-card:hover { box-shadow: 0 8px 26px rgba(15, 30, 60, .09); transform: translateY(-2px); }
.job-card-title { margin: 0 0 12px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.job-card-title a { color: #0f172a; text-decoration: none; }
.job-card-title a:hover { color: var(--brand-primary); }
.job-card-excerpt { margin: 14px 0 20px; color: var(--ink-soft); font-size: 14.5px; flex: 1; }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-block; padding: 4px 11px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); background: #f7f9fc; color: var(--ink-soft);
}
.badge-dept { color: var(--brand-primary); border-color: color-mix(in srgb, var(--brand-primary) 25%, #fff); background: color-mix(in srgb, var(--brand-primary) 7%, #fff); }
.badge-count { color: #7a4a05; background: #fff5e6; border-color: #ffe0b2; }

.btn-apply {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  background: var(--brand-primary); color: var(--brand-on-primary);
  border: none; border-radius: calc(var(--radius) - 4px);
  font-size: 14.5px; font-weight: 600; text-decoration: none;
  cursor: pointer;
}
.btn-apply:hover { background: var(--brand-secondary); }

.btn-ghost {
  display: inline-flex; align-items: center;
  padding: 11px 22px;
  border: 1px solid var(--line); border-radius: calc(var(--radius) - 4px);
  background: #fff; color: var(--ink); text-decoration: none;
  font-size: 14.5px; font-weight: 600;
}

.empty-state {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 54px 26px; text-align: center;
}
.empty-state h2 { margin: 0 0 8px; font-size: 20px; }
.empty-state p { margin: 0; color: var(--ink-soft); }

/* ---------------- job detail ---------------- */
.job-page { max-width: 860px; margin: 0 auto; padding: 26px 20px 0; }
.job-page.narrow { max-width: 620px; padding-top: 70px; }

.back-link { display: inline-block; margin-bottom: 16px; font-size: 14px; text-decoration: none; font-weight: 600; }
.back-link:hover { text-decoration: underline; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 20px;
}
.job-header { padding: 26px 30px; }
.job-header-inner { display: flex; gap: 20px; align-items: flex-start; }
.job-header-logo { width: 240px; max-width: 80%; height: auto; max-height: none; }
.job-company { margin: 0 0 4px; color: var(--ink-soft); font-size: 13.5px; }
.job-header h1 { margin: 0 0 14px; font-size: clamp(21px, 3.4vw, 27px); letter-spacing: -0.02em; }

.section-label {
  margin: 30px 0 14px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.panel > .section-label:first-child { margin-top: 0; }

.rich { color: #34404f; }
.rich p { margin: 0 0 13px; }
.rich ul, .rich ol { margin: 0 0 13px; padding-left: 22px; }
.rich li { margin-bottom: 6px; }
.rich h2, .rich h3, .rich h4 { font-size: 16px; margin: 20px 0 8px; }

.glance { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.glance li { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.glance strong { color: var(--ink-soft); font-weight: 600; font-size: 14px; }

/* ---------------- form ---------------- */
.required-note { margin: -4px 0 20px; color: var(--ink-soft); font-size: 13.5px; }
.req { color: var(--danger); }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.field-wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; }
.field label { margin-bottom: 7px; font-size: 14px; font-weight: 600; color: #34404f; }

.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="url"], .field input[type="number"], .field input[type="date"],
.field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d5dce6;
  border-radius: 8px;
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 96px; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 16%, transparent);
}
.field input[type="file"] {
  padding: 10px; border: 1px solid #d5dce6; border-radius: 8px; background: #fff; font-size: 14px; width: 100%;
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }

.field-help { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.field-error { margin: 6px 0 0; font-size: 13px; color: var(--danger); font-weight: 500; }

.choice-group { display: grid; gap: 8px; }
.choice-group.choice-inline { grid-auto-flow: column; justify-content: start; gap: 18px; }
.choice { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 400; cursor: pointer; }
.choice input { width: 17px; height: 17px; accent-color: var(--brand-primary); }

.form-subheading { margin: 26px 0 4px; font-size: 16px; grid-column: 1 / -1; }

.screening-label { margin-top: 34px; }
.screening-list { display: grid; gap: 14px; }
.screening-item {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.screening-item .field label { font-weight: 600; }

.btn-submit {
  width: 100%; margin-top: 28px; padding: 15px 20px;
  background: linear-gradient(180deg, var(--brand-primary), var(--brand-secondary));
  color: var(--brand-on-primary);
  border: none; border-radius: calc(var(--radius) - 4px);
  font-size: 15.5px; font-weight: 700; font-family: inherit;
  cursor: pointer;
}
.btn-submit:hover { filter: brightness(1.06); }
.btn-submit:disabled { opacity: .6; cursor: progress; }

.privacy-note { margin: 12px 0 0; text-align: center; font-size: 12.5px; color: var(--ink-soft); }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 13px 16px; border-radius: 9px; font-size: 14px; margin-bottom: 18px; }
.alert-error { background: #fdeced; border: 1px solid #f5c2c7; color: #842029; }

/* ---------------- confirmation ---------------- */
.confirm-panel { text-align: center; padding: 42px 30px; }
.confirm-mark {
  width: 62px; height: 62px; margin: 0 auto 20px;
  display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--brand-primary) 12%, #fff);
  color: var(--brand-primary);
}
.confirm-panel h1 { margin: 0 0 10px; font-size: 24px; }
.reference-box {
  margin: 22px auto 0; max-width: 320px; padding: 16px;
  background: #f7f9fc; border: 1px dashed #c8d2e0; border-radius: 10px;
  display: grid; gap: 4px;
}
.reference-box span { font-size: 12.5px; color: var(--ink-soft); }
.reference-box strong { font-size: 19px; letter-spacing: .04em; color: var(--brand-primary); }
.confirm-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ---------------- footer ---------------- */
.site-footer { max-width: 1180px; margin: 40px auto 0; padding: 22px 20px 0; text-align: center; }
.site-footer p { margin: 0; color: #8a94a3; font-size: 13px; }
.site-footer a { color: #8a94a3; }

/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
  .job-grid { grid-template-columns: 1fr; gap: 18px; }
  .field-grid { grid-template-columns: 1fr; }
  .panel { padding: 22px 18px; }
  .careers-head { padding: 34px 18px 24px; }
  .job-header-inner { flex-direction: column; gap: 14px; }
  .job-page.narrow { padding-top: 40px; }
}

@media (max-width: 420px) {
  body { font-size: 14.5px; }
  .job-card { padding: 20px 18px; }
  .role-tab { padding: 14px 10px; font-size: 14px; }
  .btn-apply, .btn-ghost { width: 100%; justify-content: center; }
  .choice-group.choice-inline { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 600px) {
  .brand-logo {
    width: 220px;
    max-width: 75%;
  }

  .job-header-logo {
    width: 190px;
    max-width: 70%;
  }
}
