@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./fonts/inter-latin-variable.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;
  --paper: #f5f3ee;
  --paper-deep: #eeece6;
  --ink: #141412;
  --muted: #696761;
  --line: #b9b7b0;
  --line-dark: #8e8c86;
  --focus-blue: #3b82f6;
  --white: #fffefa;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --serif: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --radius: 6px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  border-top: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.has-mobile-apply {
  padding-bottom: 0;
}

a {
  color: inherit;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell,
.detail-shell {
  width: min(68vw, 1392px);
  margin-inline: auto;
}

.detail-shell {
  width: min(50vw, 1040px);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 46px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(33px, 2.2vw, 44px);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1;
  text-decoration: none;
}

.listing-main {
  padding-bottom: 84px;
}

.listing-intro {
  margin-top: 48px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.listing-intro h1,
.not-found h1 {
  margin: 0;
  font-size: clamp(34px, 2.4vw, 48px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.alert-card {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  min-height: 110px;
  margin-top: 36px;
  padding: 20px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.alert-icon {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
}

.alert-icon svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.alert-copy {
  padding-top: 1px;
}

.alert-copy h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.25;
}

.alert-copy p {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.4;
}

.text-link,
.back-link {
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 650;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.text-link:hover,
.back-link:hover {
  text-decoration-thickness: 2px;
}

.text-link[aria-disabled="true"] {
  color: var(--muted);
  cursor: not-allowed;
}

.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 330px));
  gap: 16px;
  margin-top: 64px;
}

.filter-field {
  position: relative;
  min-height: 68px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  transition: border-color 150ms ease;
}

.filter-field:hover {
  border-color: var(--line-dark);
}

.filter-field:focus-within {
  border-color: var(--focus-blue);
  background: transparent;
  outline: none;
  box-shadow: none;
}

.filter-label {
  position: absolute;
  z-index: 1;
  top: 13px;
  left: 16px;
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.filter-field input,
.filter-field select {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  padding: 28px 16px 7px;
  border: 0;
  border-radius: var(--radius);
  outline: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.3;
}

.filter-field input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.filter-field input:not(:placeholder-shown),
.filter-field select:has(option:checked:not([value=""])) {
  color: var(--ink);
}

.filter-field input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

.filter-field input {
  cursor: text;
}

.filter-field select {
  appearance: none;
  cursor: pointer;
}

.results-section {
  margin-top: 48px;
}

.results-count {
  margin: 0;
  font-size: clamp(30px, 2.05vw, 42px);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.job-groups {
  margin-top: 50px;
}

.department-group + .department-group {
  margin-top: 50px;
}

.department-heading {
  margin: 0 0 22px;
  font-size: clamp(22px, 1.5vw, 30px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.jobs-list {
  border-top: 1px solid var(--line);
}

.job-row {
  display: block;
  min-height: 76px;
  align-items: center;
  padding: 14px 7px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition:
    background-color 160ms ease,
    padding 160ms ease;
}

.job-row:hover {
  padding-right: 14px;
  padding-left: 14px;
  background: var(--paper-deep);
}

.job-row:focus-visible {
  position: relative;
  z-index: 1;
  border-radius: 2px;
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.job-title {
  display: inline;
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
}

.job-row:hover .job-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.job-location {
  margin: 3px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.35;
}

.empty-state {
  max-width: 570px;
  margin-top: 54px;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.empty-kicker {
  margin: 0 0 10px !important;
  color: var(--muted);
  font-family: var(--sans) !important;
  font-size: 12px !important;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.empty-state h3 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.035em;
}

.empty-state p {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.primary-button:hover {
  background: transparent;
  color: var(--ink);
  transform: translateY(-1px);
}

.primary-button[aria-disabled="true"] {
  border-color: var(--line-dark);
  background: var(--line);
  color: #4e4c47;
  cursor: not-allowed;
  transform: none;
}

.secondary-button {
  margin-top: 22px;
  background: transparent;
  color: var(--ink);
}

.secondary-button:hover {
  background: var(--ink);
  color: var(--paper);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-link:focus-visible,
.back-link:focus-visible,
.wordmark:focus-visible {
  border-radius: 2px;
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.site-footer {
  display: flex;
  min-height: 118px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer .text-link {
  font-size: 14px;
}

.noscript-message {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 10;
  max-width: 620px;
  margin-inline: auto;
  padding: 16px 20px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--serif);
  text-align: center;
}

/* Job detail */
.detail-main {
  min-height: calc(100vh - 280px);
  padding-top: 40px;
  padding-bottom: 96px;
}

.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: 16px;
}

.job-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: start;
  margin-top: 34px;
}

.job-heading-copy h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(34px, 2.2vw, 46px);
  font-weight: 780;
  letter-spacing: -0.052em;
  line-height: 1.01;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin-top: 14px;
  color: #34332f;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.4;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.meta-item + .meta-item::before {
  margin-right: 8px;
  color: var(--line-dark);
  content: "•";
}

.location-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.hero-apply {
  min-width: 116px;
  margin-top: 22px;
}

.job-article {
  max-width: 920px;
  margin-top: 50px;
}

.prose-section {
  margin-top: 40px;
}

.prose-section:first-child {
  margin-top: 0;
}

.prose-section h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 1.65vw, 34px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.prose-section p,
.prose-section li {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.53;
}

.prose-section p {
  margin: 0;
}

.prose-section p + p {
  margin-top: 16px;
}

.prose-section ul {
  margin: 6px 0 0;
  padding-left: 29px;
}

.prose-section li {
  padding-left: 4px;
}

.prose-section li + li {
  margin-top: 9px;
}

.not-found {
  max-width: 680px;
  padding-top: 70px;
}

.not-found > p:not(.eyebrow) {
  margin: 24px 0 30px;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
}

.mobile-apply-bar {
  display: none;
}

@media (max-width: 900px) {
  .page-shell,
  .detail-shell {
    width: min(100% - 48px, 100%);
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-apply {
    width: fit-content;
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  body.has-mobile-apply {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .page-shell,
  .detail-shell {
    width: min(100% - 40px, 100%);
  }

  .site-header {
    padding-top: 28px;
  }

  .wordmark {
    min-height: 42px;
    font-size: 32px;
  }

  .listing-main {
    padding-bottom: 62px;
  }

  .listing-intro {
    margin-top: 42px;
  }

  .listing-intro h1,
  .not-found h1 {
    font-size: 34px;
  }

  .alert-card {
    gap: 13px;
    min-height: 0;
    margin-top: 30px;
    padding: 21px 18px;
  }

  .alert-icon {
    flex-basis: 30px;
    width: 30px;
  }

  .alert-copy h2 {
    font-size: 18px;
  }

  .alert-copy p,
  .text-link {
    font-size: 16px;
  }

  .filters {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 44px;
  }

  .results-section {
    margin-top: 42px;
  }

  .results-count {
    font-size: 30px;
  }

  .job-groups {
    margin-top: 42px;
  }

  .department-group + .department-group {
    margin-top: 48px;
  }

  .department-heading {
    margin-bottom: 18px;
    font-size: 24px;
  }

  .job-row {
    min-height: 82px;
    padding: 14px 2px;
  }

  .job-row:hover {
    padding-right: 7px;
    padding-left: 7px;
  }

  .job-title {
    font-size: 16.5px;
  }

  .job-location {
    font-size: 15px;
  }

  .empty-state {
    padding: 28px 22px;
  }

  .site-footer {
    min-height: 104px;
  }

  .detail-main {
    padding-top: 35px;
    padding-bottom: 68px;
  }

  .job-hero {
    margin-top: 32px;
  }

  .job-heading-copy h1 {
    font-size: 30px;
  }

  .job-meta {
    display: grid;
    gap: 5px;
    font-size: 16px;
  }

  .meta-item + .meta-item::before {
    display: none;
  }

  .hero-apply {
    display: none;
  }

  .job-article {
    margin-top: 44px;
  }

  .prose-section {
    margin-top: 36px;
  }

  .prose-section h2 {
    margin-bottom: 16px;
    font-size: 26px;
  }

  .prose-section p,
  .prose-section li {
    font-size: 16.5px;
    line-height: 1.55;
  }

  .mobile-apply-bar:not([hidden]) {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: block;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-dark);
    background: rgba(245, 243, 238, 0.96);
    backdrop-filter: blur(12px);
  }

  .mobile-apply-bar .primary-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .hero-apply,
  .mobile-apply-bar,
  .site-footer,
  .back-link {
    display: none !important;
  }

  .detail-shell {
    width: 100%;
  }
}
