/* careers.css — /careers/: the values, the benefits and the open roles.

   Loaded after site.css and only by /careers/. It builds on the site's design
   system: the roles' search and location controls are its `.webform-`
   controls, the team filter is the catalog's chip row, and the closing band is
   the site's. `careers.js` reads the roles from `/api/public/careers/roles`;
   the rest of the page is static.

   A file of its own so the page's first publish is served fresh: nginx keys its
   cache on the path alone (`proxy_cache_key` in the chart's nginx config), so a
   `?v=` reaches only browsers, and a path nothing has cached is the one
   guarantee every layer honours. */

.careers-index {
  display: block;
  margin-bottom: 22px;
  color: var(--violet-deep);
}

/* The values, one open at a time: native disclosures sharing a `name`. A
   browser without exclusive `<details>` lets several stay open, which costs
   nothing. */
.careers-values {
  margin-top: clamp(44px, 5vw, 64px);
  border-top: 1px solid var(--ink);
}
.careers-value { border-bottom: 1px solid var(--line); }
.careers-value > summary {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 104px;
  padding: 26px 0;
  list-style: none;
  cursor: pointer;
  transition: color 0.18s ease;
}
.careers-value > summary::-webkit-details-marker { display: none; }
.careers-value > summary:hover { color: var(--violet-deep); }
.careers-value-num {
  font-family: var(--font-system);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--violet);
}
.careers-value-name {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.16;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}
/* A plus drawn from two bars, so opening turns it into a cross about its own
   centre. */
.careers-plus {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.careers-plus::before,
.careers-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.careers-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.careers-value[open] .careers-plus {
  background: var(--mist);
  transform: rotate(45deg);
}
.careers-value > p {
  max-width: 794px;
  padding: 0 48px 28px 74px;
  font-size: 16px;
  line-height: 1.68;
  color: var(--muted);
}

/* One row per benefit: its icon, its name, then what it covers, between
   rules. Every row takes the tallest one's height, so the rules fall at an
   even spacing, and each row's text is centred between its rules. */
.careers-benefits {
  display: grid;
  grid-auto-rows: 1fr;
  margin-top: clamp(44px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.careers-benefit {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) minmax(0, 2fr);
  align-items: start;
  align-content: center;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.careers-benefit-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(93, 61, 167, 0.24);
  border-radius: 50%;
  background: #fff;
  color: var(--violet-deep);
}
.careers-benefit-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.careers-benefit h3 {
  padding: 8px clamp(10px, 3vw, 40px) 0 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.careers-benefit p {
  max-width: 72ch;
  padding-top: 6px;
  font-size: 15px;
  line-height: 1.62;
  color: var(--muted);
}

.careers-roles { margin-top: clamp(40px, 5vw, 56px); }
.careers-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px) auto;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.careers-tools .careers-query,
.careers-tools .careers-location { border-radius: 999px; }
/* WebKit draws a search field natively and ignores author padding on it, which
   would put the icon over the placeholder. */
.careers-tools .careers-query {
  -webkit-appearance: none;
  appearance: none;
}
.careers-search { position: relative; }
.careers-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.careers-search .careers-query { padding-left: 42px; }
.careers-tools .btn { justify-content: center; }
.careers-teams { margin-top: 14px; }
.careers-list { margin-top: 10px; }
.careers-role {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, 0.55fr) minmax(150px, 0.65fr) auto;
  align-items: center;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: color 0.18s ease;
}
.careers-role:hover { color: var(--violet-deep); }
.careers-role-title {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.018em;
  font-weight: 800;
}
.careers-role-meta {
  font-family: var(--font-system);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.careers-role .arrow { font-size: 21px; transition: transform 0.18s ease; }
.careers-role:hover .arrow { transform: translateX(4px); }
.careers-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  padding-top: 22px;
}
.careers-more .cat-count { margin: 0; }

.careers-notice {
  margin-top: clamp(40px, 5vw, 56px);
  padding: 22px 24px;
  background: var(--mist);
  border-left: 3px solid var(--violet);
  border-radius: 4px;
}
.careers-notice h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 800;
}
.careers-notice p {
  font-size: 14px;
  line-height: 1.62;
  color: var(--muted);
}
.careers-notice strong { color: var(--ink); }
/* Links in running text: the deep violet, about 7.5:1 on paper, and an
   underline, so they do not rely on colour alone. */
.careers-fallback a,
.careers-notice a {
  color: var(--violet-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.careers-card {
  margin-top: 24px;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.careers-card h3 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.careers-card p {
  margin-bottom: 22px;
  font-size: 15px;
  line-height: 1.58;
  color: var(--muted);
}

/* The closing statement's second half, quieter than its first. At 0.78 over
   the violet band it measures about 3.4:1, above the 3:1 large text needs. */
.closing .careers-soft { color: rgba(255, 255, 255, 0.78); }

@media (max-width: 700px) {
  .careers-value > summary {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 82px;
    padding: 20px 0;
  }
  .careers-value-name { font-size: 21px; line-height: 1.2; }
  .careers-plus { width: 30px; height: 30px; }
  .careers-value > p { padding: 0 0 24px 48px; }
  /* The description moves under the name, beside the icon. Stacked, the
     descriptions differ by lines, so each row takes its own height and keeps
     even padding above its rule. */
  .careers-benefits { grid-auto-rows: auto; }
  .careers-benefit {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px 14px;
    padding: 20px 0;
  }
  .careers-benefit h3 { align-self: center; padding: 0; }
  .careers-benefit p { grid-column: 2; padding: 0; }
  .careers-tools { grid-template-columns: 1fr; }
  .careers-role {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 14px;
    padding: 20px 0;
  }
  .careers-role-meta { grid-column: 1; }
  .careers-role .arrow { grid-column: 2; grid-row: 1 / span 3; }
  .careers-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .careers-value > summary,
  .careers-plus,
  .careers-role,
  .careers-role .arrow { transition: none; }
}
