/* ==========================================================================
   Careers — /careers and /careers/j/{token}
   Tokens come from styles.css :root. No raw hex here.
   ========================================================================== */

/* ---------------------------------------------------------------- hero --- */
/* The top padding clears the fixed navbar — roughly 73px of bar plus a gap,
   which is all the room the banner needs now that the search and the counts
   have moved down to the listing. */
.careers-hero {
    background: var(--ep-mkt-grad-hero);
    color: #fff;
    padding: 112px 0 44px;
}

.careers-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ep-brand-cyan);
}

/* color must be set here, not left to inherit from .careers-hero: styles.css
   gives h1–h6 a direct `color: var(--ep-ink)` rule, and direct element styling
   beats inheritance regardless of specificity. */
.careers-hero h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 12px 0 12px;
    max-width: 22ch;
    text-wrap: pretty;
}

.careers-hero p {
    max-width: 62ch;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.65;
    opacity: 0.85;
}

/* Heads the results column. Full width of that column rather than capped:
   it filters the rows beneath it, so it reads as their control. */
.careers-search {
    position: relative;
    margin-bottom: 14px;
}

.careers-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--ep-text-subtle);
}

.careers-search input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--ep-line);
    border-radius: var(--ep-radius-md);
    background: var(--ep-surface);
    padding: 0 16px 0 44px;
    font-size: 0.95rem;
    color: var(--ep-ink);
    outline: none;
    box-shadow: var(--ep-shadow-sm);
}

.careers-search input:focus {
    border-color: var(--ep-brand-cyan-dark);
    box-shadow: var(--ep-shadow-sm), var(--ep-shadow-focus-blue);
}

/* ------------------------------------------------------------- listing --- */
.careers-list-section { padding: 36px 0 80px; }

.careers-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 28px;
    align-items: start;
}

/* ---- filters sidebar ---- */
.careers-side {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.careers-filter-card {
    background: var(--ep-surface);
    border: 1px solid var(--ep-line);
    border-radius: var(--ep-radius-md);
    box-shadow: var(--ep-shadow-sm);
    padding: 18px;
}

.careers-filter-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}

.careers-filter-head span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ep-text-subtle);
}

.careers-filter-head button {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ep-brand-blue);
    cursor: pointer;
}

.careers-filter-group { margin-bottom: 20px; }
.careers-filter-group:last-child { margin-bottom: 0; }

.careers-filter-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ep-ink);
    margin-bottom: 10px;
}

.careers-filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0 0 9px;
}

.careers-filter-option:last-child { margin-bottom: 0; }

.careers-filter-option input {
    width: 16px;
    height: 16px;
    accent-color: var(--ep-brand-blue);
    cursor: pointer;
    flex: none;
}

.careers-filter-label { font-size: 0.85rem; color: var(--ep-text); margin-right: auto; }
.careers-filter-count { font-size: 0.78rem; color: var(--ep-text-subtle); font-variant-numeric: tabular-nums; }

.careers-employer-card {
    background: var(--ep-surface);
    border: 1px solid var(--ep-line);
    border-radius: var(--ep-radius-md);
    box-shadow: var(--ep-shadow-sm);
    overflow: hidden;
}

.careers-employer-strip { height: 3px; background: var(--ep-gradient-active); }
.careers-employer-body { padding: 18px; }

.careers-employer-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ep-ink);
    margin-bottom: 6px;
}

.careers-employer-body p {
    margin: 0 0 14px;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--ep-text-muted);
}

.careers-employer-body a {
    display: block;
    text-align: center;
    height: 38px;
    line-height: 36px;
    border: 1px solid var(--ep-line);
    border-radius: var(--ep-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ep-text);
    text-decoration: none;
    transition: background var(--ep-motion-fast), color var(--ep-motion-fast);
}

.careers-employer-body a:hover { background: var(--ep-line-3); color: var(--ep-ink); }

/* ---- toolbar ---- */
.careers-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.careers-result-count { font-size: 0.9rem; color: var(--ep-text-muted); }
.careers-result-count strong { color: var(--ep-ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.careers-sort { display: flex; align-items: center; gap: 9px; margin: 0; }
.careers-sort span { font-size: 0.85rem; color: var(--ep-text-subtle); }

.careers-sort select {
    height: 38px;
    border: 1px solid var(--ep-line);
    border-radius: var(--ep-radius-sm);
    background: var(--ep-surface);
    padding: 0 11px;
    font-size: 0.85rem;
    color: var(--ep-ink);
    outline: none;
    cursor: pointer;
}

/* ---- job rows ---- */
.careers-rows { display: flex; flex-direction: column; gap: 12px; }

.careers-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--ep-surface);
    border: 1px solid var(--ep-line);
    border-radius: var(--ep-radius-md);
    box-shadow: var(--ep-shadow-sm);
    padding: 20px 22px;
    text-decoration: none;
    color: inherit;
    transition: transform var(--ep-motion-card), box-shadow var(--ep-motion-card), border-color var(--ep-motion-card);
}

@media (hover: hover) {
    .careers-row:hover {
        transform: translateY(-2px);
        border-color: var(--ep-text-dim);
        box-shadow: var(--ep-shadow-hover);
    }
}

.careers-row-mark {
    width: 48px;
    height: 48px;
    border-radius: var(--ep-radius-md);
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-line);
    display: grid;
    place-items: center;
    color: var(--ep-text-subtle);
    font-size: 0.85rem;
    font-weight: 600;
    flex: none;
}

.careers-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.careers-row-titleline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.careers-row-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--ep-ink);
    letter-spacing: -0.01em;
}

.careers-badge {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-radius: 6px;
    padding: 3px 7px;
}

.careers-badge--new { color: var(--ep-info-soft-fg); background: var(--ep-info-soft-bg); }
.careers-badge--closing { color: var(--ep-warning-soft-fg); background: var(--ep-warning-soft-bg); }

.careers-row-company {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--ep-text);
    margin-bottom: 13px;
}

.careers-row-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.careers-chip {
    font-size: 0.79rem;
    font-weight: 600;
    color: var(--ep-text);
    background: var(--ep-line-3);
    border-radius: var(--ep-radius-sm);
    padding: 6px 10px;
    font-variant-numeric: tabular-nums;
}

.careers-chip--type { color: var(--ep-info-soft-fg); background: var(--ep-info-soft-bg); }
.careers-chip--pay { color: var(--ep-success-soft-fg); background: var(--ep-success-soft-bg); }

.careers-row-aside {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    align-self: stretch;
}

.careers-row-posted { font-size: 0.79rem; color: var(--ep-text-subtle); white-space: nowrap; }

.careers-row-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border-radius: var(--ep-radius-sm);
    background: var(--ep-gradient-active);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--ep-shadow-sm);
}

/* The theme's grey-icon default wins over inherited color on glyphs sitting on
   the gradient — target the icon directly, per the design-system rule. */
.careers-row-cta > i { color: #fff; font-size: 0.75rem; }

/* ---- filtered-empty ---- */
.careers-noresults {
    text-align: center;
    padding: 44px 24px;
    background: var(--ep-surface-2);
    border: 1px dashed var(--ep-line);
    border-radius: var(--ep-radius-md);
}

.careers-noresults p { margin: 0 0 14px; color: var(--ep-text-muted); }

.careers-noresults button {
    border: 1px solid var(--ep-line);
    background: var(--ep-surface);
    border-radius: var(--ep-radius-sm);
    height: 38px;
    padding: 0 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ep-text);
    cursor: pointer;
}

/* --------------------------------------------------------------- empty --- */
.careers-empty {
    text-align: center;
    padding: 56px 24px;
    background: var(--ep-surface-2);
    border: 1px dashed var(--ep-line);
    border-radius: var(--ep-radius-lg);
}

.careers-empty i { font-size: 2.2rem; color: var(--ep-text-subtle); }
.careers-empty h2 { font-size: 1.25rem; font-weight: 700; color: var(--ep-ink); margin: 16px 0 8px; }
.careers-empty p { max-width: 46ch; margin: 0 auto; color: var(--ep-text-muted); }

/* ------------------------------------------------------------ job page --- */
.job-page { padding: 130px 0 72px; }
.job-container { max-width: 780px; }

.job-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ep-brand-cyan-dark);
    text-decoration: none;
    margin-bottom: 24px;
}

.job-back:hover { text-decoration: underline; }

.job-closed-banner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    margin-bottom: 26px;
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-line);
    border-left: 3px solid var(--ep-text-subtle);
    border-radius: var(--ep-radius-md);
}

.job-closed-banner i { color: var(--ep-text-subtle); font-size: 1.1rem; margin-top: 2px; }
.job-closed-banner div { display: flex; flex-direction: column; gap: 4px; }
.job-closed-banner strong { color: var(--ep-ink); }
.job-closed-banner span { font-size: 0.9rem; color: var(--ep-text-muted); }

.job-header { margin-bottom: 30px; }

.job-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--ep-ink);
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin: 12px 0 6px;
    text-wrap: balance;
}

.job-employer { font-size: 1.05rem; font-weight: 600; color: var(--ep-brand-cyan-dark); margin: 0 0 18px; }

.job-meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.job-meta li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-line);
    border-radius: var(--ep-radius-pill);
    font-size: 0.85rem;
    color: var(--ep-text);
}

.job-meta i { color: var(--ep-brand-cyan-dark); font-size: 0.85em; }

/* Employer-authored rich text. Keep selectors scoped so a stray tag in the
   description cannot restyle the page around it. */
.job-body { font-size: 1rem; line-height: 1.7; color: var(--ep-text); }
.job-body h1, .job-body h2, .job-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ep-ink);
    letter-spacing: -0.02em;
    margin: 30px 0 10px;
}
.job-body p { margin: 0 0 14px; }
.job-body ul, .job-body ol { margin: 0 0 16px; padding-left: 1.3em; }
.job-body li { margin-bottom: 6px; }
.job-body a { color: var(--ep-brand-cyan-dark); }
.job-body img { max-width: 100%; height: auto; }

.job-apply {
    margin: 38px 0 0;
    padding: 26px;
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-line);
    border-radius: var(--ep-radius-lg);
    text-align: center;
}

.job-apply h2 { font-size: 1.2rem; font-weight: 700; color: var(--ep-ink); margin: 0 0 8px; }
.job-apply p { color: var(--ep-text-muted); margin: 0 0 18px; font-size: 0.95rem; }

/* --------------------------------------------------- other openings rail --- */
.job-others { margin-top: 46px; }

.job-others h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ep-ink);
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}

/* Horizontal rail: swipeable on touch, snapping so cards land square. */
.job-others-rail {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
}

.job-other-card {
    flex: 0 0 min(74vw, 260px);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    background: var(--ep-surface);
    border: 1px solid var(--ep-line);
    border-radius: var(--ep-radius-md);
    text-decoration: none;
    transition: border-color var(--ep-motion-base);
}

@media (hover: hover) {
    .job-other-card:hover { border-color: var(--ep-brand-cyan); }
}

.job-other-title { font-weight: 700; color: var(--ep-ink); font-size: 0.98rem; }
.job-other-meta { font-size: 0.82rem; color: var(--ep-text-muted); }

.job-powered {
    margin: 46px 0 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--ep-text-subtle);
}

.job-powered a { color: var(--ep-brand-cyan-dark); font-weight: 600; }

/* ---------------------------------------------------------- responsive --- */
@media (max-width: 991px) {
    .careers-layout { grid-template-columns: 1fr; }
    .careers-side { position: static; }
}

@media (max-width: 576px) {
    .careers-hero { padding: 98px 0 34px; }
    .job-page { padding: 110px 0 56px; }
    .careers-row { flex-wrap: wrap; padding: 18px; }
    .careers-row-aside {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 10px;
    }
    .careers-row-cta { margin-top: 0; }
}
