/* ---------------------------------------------------------------------------
   Job List.

   The page a job seeker lands on, and until now three dark charcoal cards on a
   white page - the same mismatch Check Status had, and the same fix: the site's
   own light card, with the closing date treated as the thing that actually
   decides whether somebody reads any further.

   Open vacancies and closed ones are separated by a heading rather than by a
   difference in opacity. Somebody who missed a post should be able to see that
   they missed it, not squint at a slightly paler card.
   --------------------------------------------------------------------------- */

.job-list-page {
    --line: #e7e5e1;
    --muted: #6f6b66;
    --ink: #1b1a19;
    background: #f6f5f3;
    padding: 70px 0 90px;
}

/* ---- the count line at the top ---- */

.jl-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
}

.jl-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 15px 6px 12px;
    border: 1px solid var(--line);
    border-radius: 40px;
    background: #fff;
    font-size: 13.5px;
    color: var(--muted);
}

    .jl-chip b {
        color: var(--ink);
        font-weight: 700;
    }

    .jl-chip::before {
        content: '';
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #1f7a3d;
        box-shadow: 0 0 0 3px rgba(31, 122, 61, .15);
    }

    .jl-chip.is-quiet::before {
        background: #c9c5c0;
        box-shadow: none;
    }

/* A vacancy somebody followed a dead link to. */
.jl-notice {
    margin-bottom: 22px;
    padding: 13px 18px;
    border: 1px solid #f6cfcd;
    border-radius: 12px;
    background: #fdeceb;
    color: #9d2b25;
    font-size: 14px;
    font-weight: 600;
}

/* ---- group headings ---- */

.jl-group {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 34px 0 18px;
}

    .jl-group:first-of-type {
        margin-top: 0;
    }

    .jl-group h2 {
        margin: 0;
        font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
        font-size: 11.5px;
        font-weight: 500;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        color: var(--muted);
        white-space: nowrap;
    }

    .jl-group::after {
        content: '';
        flex: 1 1 auto;
        height: 1px;
        background: var(--line);
    }

/* ---- the card ---- */

.jl-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 26px 24px 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

    .jl-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--primary-color, #eb1c24);
        transition: height .2s ease;
    }

    .jl-card:hover,
    .jl-card:focus-within {
        transform: translateY(-4px);
        box-shadow: 0 18px 40px rgba(20, 19, 18, .10);
        border-color: #cfccc7;
    }

        .jl-card:hover::before,
        .jl-card:focus-within::before {
            height: 6px;
        }

/* Closed: still readable, because people do come looking for what they missed,
   but it never competes with something they can still apply for. */
.jl-card.is-closed {
    background: #fbfaf9;
}

    .jl-card.is-closed::before {
        background: #cfcac4;
    }

/* ---- the closing date, which is the whole decision ---- */

.jl-status {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    border-radius: 40px;
    padding: 5px 14px;
    font-size: 12.5px;
    font-weight: 700;
}

    .jl-status::before {
        content: '';
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: currentColor;
    }

    .jl-status.open { background: #e8f4ec; color: #1f6b38; }
    .jl-status.urgent { background: #fdeceb; color: #9d2b25; }
    .jl-status.closed { background: #f1efed; color: #6f6b66; }

.jl-dept {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--ink);
}

.jl-title {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

/* ---- what a job seeker asks next ---- */

.jl-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    margin: 0 0 20px;
    padding-top: 16px;
    border-top: 1px solid #f0eeec;
}

    .jl-facts span {
        display: block;
        font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
        font-size: 9.5px;
        font-weight: 500;
        letter-spacing: 1.1px;
        text-transform: uppercase;
        color: #9a948c;
        margin-bottom: 3px;
    }

    .jl-facts b {
        font-size: 13.5px;
        font-weight: 700;
        color: var(--ink);
    }

/* ---- the button ---- */

.jl-action {
    margin-top: auto;
}

.jl-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 700;
    background: var(--primary-color, #eb1c24);
    color: #fff;
    border: 1px solid transparent;
    transition: filter .15s ease;
}

    .jl-btn:hover,
    .jl-btn:focus-visible {
        color: #fff;
        filter: brightness(.92);
    }

    .jl-btn i {
        font-size: 11px;
        transition: transform .15s ease;
    }

    .jl-btn:hover i {
        transform: translateX(3px);
    }

.jl-btn.is-quiet {
    background: #fff;
    border-color: var(--line);
    color: #57534e;
}

    .jl-btn.is-quiet:hover,
    .jl-btn.is-quiet:focus-visible {
        background: #f2f0ed;
        color: var(--ink);
        filter: none;
    }

/* ---- nothing listed ---- */

.jl-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px dashed #cfcac4;
    border-radius: 16px;
}

    .jl-empty h2 {
        margin: 0 0 8px;
        font-size: 20px;
        font-weight: 700;
        color: var(--ink);
    }

    .jl-empty p {
        margin: 0 auto 18px;
        max-width: 46ch;
        font-size: 14.5px;
        line-height: 1.7;
        color: var(--muted);
    }

/* ---- keyboard ---- */

.job-list-page a:focus-visible {
    outline: 2px solid var(--primary-color, #eb1c24);
    outline-offset: 3px;
}

/* ---- motion ---- */

@media (prefers-reduced-motion: reduce) {
    .jl-card,
    .jl-card::before,
    .jl-btn,
    .jl-btn i {
        transition: none;
    }

        .jl-card:hover {
            transform: none;
        }
}

/* ---- narrow screens ---- */

@media (max-width: 575px) {
    .job-list-page {
        padding: 44px 0 60px;
    }

    .jl-card {
        padding: 22px 20px 18px;
    }

    .jl-btn {
        width: 100%;
        justify-content: center;
    }
}
