/* ==================================================================
   /careers — page layout (loaded only on /careers via $page['css'])
   Uses the site tokens from site.css. Small text never uses --brand
   (#e2208c is 4.36:1 on white): --brand-700 instead.
   ================================================================== */

/* ---------- Shared headings (replaces the inline font-size styles) ---------- */
.careers-h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin-bottom: 0; }
.careers-h3 { font-family: var(--font-heading); font-size: 1.3rem; color: var(--ink); }
.careers-side-note { color: var(--ink-50); margin: 14px 0 0; max-width: 34ch; }
.careers-side-note a { color: var(--brand-700); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 1. Hero ---------- */
.careers-title { margin-bottom: 18px; }
.careers-hero .quick-answer { max-width: 62ch; }
.careers-intro { color: var(--ink-50); max-width: 62ch; margin: 14px 0 0; line-height: 1.7; }

.careers-facts {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px; background: var(--line);
    border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
    max-width: 640px;
}
.careers-facts > div {
    display: flex; flex-direction: column-reverse; justify-content: flex-end;
    background: var(--surface); padding: 16px 18px;
}
.careers-facts dt { font-size: .78rem; font-weight: 600; color: var(--ink-50); line-height: 1.35; }
.careers-facts dd {
    font-family: var(--font-heading); font-size: 1.35rem; line-height: 1.15;
    color: var(--ink); margin: 0 0 4px;
}
@media (min-width: 576px) { .careers-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.careers-photo img {
    display: block; width: 100%; height: auto;
    border-radius: var(--r-xl);
    box-shadow: 0 24px 48px -28px rgba(8, 8, 8, .45);
}
.careers-photo figcaption { font-size: .85rem; color: var(--ink-50); margin-top: 12px; }

/* ---------- 2. Open roles ---------- */
/* The hero above already pads its bottom; a full .section top doubled the gap. */
.careers-roles { padding-top: clamp(24px, 3.5vw, 48px); }

.careers-head { display: grid; gap: 12px 40px; align-items: end; }
@media (min-width: 992px) { .careers-head { grid-template-columns: auto minmax(0, 46ch); justify-content: space-between; } }
.careers-head-note { color: var(--ink-50); }
.careers-count { color: var(--ink-50); }

.role-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }

.role-row {
    display: grid; gap: 20px;
    background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: clamp(20px, 2.6vw, 30px);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.role-row:hover, .role-row:focus-within { border-color: var(--line-strong); box-shadow: var(--sh-md); }
@media (min-width: 768px) {
    .role-row { grid-template-columns: minmax(0, 1fr) 230px; gap: 32px; }
}

.role-tags { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.role-tag {
    font-size: .76rem; font-weight: 600; line-height: 1.3;
    color: var(--ink-70); background: var(--surface-3);
    border-radius: 999px; padding: 5px 11px;
}
.role-tag.is-team { color: var(--brand-700); background: var(--brand-tint); }

.role-title { font-family: var(--font-heading); font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); line-height: 1.25; margin: 0 0 8px; }
.role-title a { color: var(--ink); text-decoration: none; }
.role-title a:hover { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }
.role-summary { color: var(--ink-70); margin: 0 0 14px; max-width: 70ch; line-height: 1.65; }

.role-facts { margin: 0; display: grid; gap: 6px; font-size: .9rem; }
.role-facts > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 12px; }
.role-facts dt { font-weight: 600; color: var(--ink); }
.role-facts dd { margin: 0; color: var(--ink-50); }

.role-side { display: flex; flex-direction: column; gap: 16px; justify-content: space-between; }
@media (min-width: 768px) {
    .role-side { border-left: 1px solid var(--line); padding-left: 28px; }
}
.role-dates { margin: 0; display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .role-dates { grid-template-columns: 1fr; } }
.role-dates dt { font-size: .74rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-50); }
.role-dates dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); font-size: .95rem; }

.role-cta { width: 100%; min-height: 48px; padding: 14px 20px; }

.careers-empty .s-card-title { font-size: 1.15rem; }

/* ---------- Hiring at a glance ---------- */
.careers-table-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.careers-table { font-size: .93rem; --bs-table-bg: transparent; }
.careers-table thead th {
    font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--ink-50); background: var(--surface-2);
    border-bottom: 1px solid var(--line); padding: 14px 18px; white-space: nowrap;
}
.careers-table th, .careers-table td { padding: 16px 18px; border-color: var(--line); vertical-align: top; color: var(--ink-70); }
.careers-table > :not(caption) > * > * { border-bottom: 1px solid var(--line); box-shadow: none; }
.careers-table tbody tr:last-child > * { border-bottom: 0; }
.careers-table tbody th { font-weight: 700; }
.careers-table tbody th a { color: var(--ink); text-decoration: none; }
.careers-table tbody th a:hover { color: var(--brand-700); text-decoration: underline; }
.careers-table .is-muted { color: var(--ink-50); font-style: italic; }
.careers-note { font-size: .88rem; color: var(--ink-50); }

/* Phones: each row becomes a labelled block, so no column is crushed. */
@media (max-width: 767.98px) {
    .careers-table-wrap { overflow: visible; }
    .careers-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .careers-table, .careers-table tbody, .careers-table tr, .careers-table th, .careers-table td { display: block; width: 100%; }
    .careers-table tr { padding: 14px 18px; border-bottom: 1px solid var(--line); }
    .careers-table tbody tr:last-child { border-bottom: 0; }
    .careers-table th, .careers-table td { border: 0; padding: 3px 0; }
    .careers-table tbody th { font-size: 1.02rem; padding-bottom: 6px; }
    .careers-table tbody th::before { content: none; }
    .careers-table td { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 10px; }
    .careers-table td::before { content: attr(data-label); font-weight: 600; color: var(--ink); font-style: normal; }
    .careers-table td.text-nowrap { white-space: normal !important; }
}

/* ---------- 3. How to apply ---------- */
.careers-steps { list-style: none; padding: 0; margin-bottom: 0; }
.careers-steps .step-num { background: var(--brand-700); font-size: 1.1rem; }
.careers-step-title { font-family: var(--font-heading); font-size: 1.1rem; color: var(--ink); margin: 0 0 8px; }

/* ---------- 4. What working here involves ---------- */
.careers-values {
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: 16px;
}
@media (min-width: 768px) { .careers-values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.careers-values > li {
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: clamp(20px, 2.4vw, 28px);
}
.careers-values h3 { font-family: var(--font-heading); font-size: 1.12rem; color: var(--ink); margin: 0 0 8px; }
.careers-values p { margin: 0; color: var(--ink-70); line-height: 1.65; font-size: .95rem; }
.careers-values a { color: var(--brand-700); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
    .role-row { transition: none; }
}

/* ==================================================================
   /careers/<role> — job pages (careers/apply.php)
   ================================================================== */

/* Sticky apply card. head.php wraps every page in .overflow-x-hidden
   (overflow-x:hidden !important), which makes that wrapper a scroll container
   and silently disables position:sticky. `clip` trims sideways overflow the
   same way without that side effect. Scoped to job pages, as blog posts do. */
body > .overflow-x-hidden:has(.job-aside) { overflow-x: clip !important; }
@media (min-width: 992px) {
    .job-apply { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- Hero ---------- */
.job-hero { padding-bottom: clamp(20px, 3vw, 36px); }
.job-title { margin-bottom: 16px; }
.job-hero .lede { max-width: 60ch; }
.job-tags { margin: 18px 0 0; }
.role-tag.is-closed { color: #8a2c0d; background: #fff1e8; }
.job-answer { color: var(--ink-50); font-size: .95rem; line-height: 1.65; max-width: 68ch; margin: 18px 0 0; }

/* ---------- Job at a glance ---------- */
.job-glance { padding: clamp(20px, 2.4vw, 28px); }
.job-glance .mp-panel-title { font-size: 1.25rem; margin-bottom: 6px; }
@media (max-width: 575.98px) {
    /* Phones: label above value instead of two squeezed columns. */
    .job-glance .mp-facts > div { grid-template-columns: 1fr; gap: 2px; }
    .job-glance .mp-facts dt { font-size: .8rem; }
}

/* ---------- Description ---------- */
.job-prose { max-width: 70ch; }
.job-prose > h2 { margin-top: 2.2em; }
.job-overview { font-size: 1.05rem; color: var(--ink-70); }

.job-work { display: grid; gap: 12px; margin: 0 0 1.4em; }
.job-work-item {
    border: 1px solid var(--line); border-left: 3px solid var(--brand-700);
    border-radius: var(--r-sm); padding: 16px 18px; background: var(--surface);
}
.job-prose .job-work-item h3 { font-size: 1.02rem; margin: 0 0 6px; }
.job-prose .job-work-item p { margin: 0; font-size: .95rem; }

.job-fit { display: grid; gap: 12px; margin: 0 0 1.4em; }
@media (min-width: 768px) { .job-fit { grid-template-columns: 1fr 1fr; } }
.job-fit-card { border-radius: var(--r-lg); padding: 18px 20px; border: 1px solid var(--line); }
.job-fit-card.is-yes { background: #f0fbf4; border-color: #c9ead5; }
.job-fit-card.is-no  { background: var(--surface-2); }
.job-prose .job-fit-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.job-fit-card.is-yes .job-fit-head svg { color: #15803d; }
.job-fit-card.is-no  .job-fit-head svg { color: var(--ink-50); }
.job-prose .job-fit-card ul { margin: 0; font-size: .95rem; }

.job-prose ol.job-steps { padding-left: 1.3em; }

/* ---------- Apply card ---------- */
.job-apply { box-shadow: var(--sh-md); }
.job-apply-title { font-size: 1.3rem; margin-bottom: 14px; }
.job-apply .btn-submit { width: 100%; }

/* ---------- Other openings ---------- */
.job-others { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 768px) { .job-others { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); } }
.job-others > li { display: flex; }
.job-other {
    display: flex; flex-direction: column; width: 100%;
    border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
    padding: clamp(18px, 2.2vw, 24px);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.job-other:hover, .job-other:focus-within { border-color: var(--line-strong); box-shadow: var(--sh-md); }
.job-other .role-tag { align-self: flex-start; }
.job-other-title { font-family: var(--font-heading); font-size: 1.15rem; line-height: 1.3; margin: 0 0 6px; }
.job-other-title a { color: var(--ink); text-decoration: none; }
.job-other-title a:hover { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }
.job-other-text { color: var(--ink-70); font-size: .93rem; line-height: 1.6; margin: 0 0 14px; }
.job-other-link { margin-top: auto; align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; color: var(--brand-700); }

@media (prefers-reduced-motion: reduce) { .job-other { transition: none; } }
