/*
    Careers board and role pages.

    Deliberately shares the tokens, radii and rhythm of community.css so the
    two sections read as one design system; the cr- prefix keeps the rules from
    colliding with it.
*/

.careers-wrap {
    --cr-line: #e7e7f0;
    --cr-ink: #000662;
    --cr-muted: #60616c;
    --cr-primary: var(--color-primary, #7476ff);
    --cr-soft: #f6f6fb;
    --cr-danger: #d6455d;
    --cr-warn: #9a6400;
}

/* ---------------------------------------------------------------- buttons */

.cr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.cr-btn--sm {
    padding: 10px 18px;
    font-size: 14px;
}

.cr-btn--block {
    width: 100%;
}

.cr-btn--solid {
    background: var(--cr-primary);
    color: #fff;
}

.cr-btn--solid:hover,
.cr-btn--solid:focus-visible {
    background: var(--cr-ink);
    color: #fff;
}

.cr-btn--ghost {
    border-color: var(--cr-line);
    background: #fff;
    color: var(--cr-ink);
}

.cr-btn--ghost:hover,
.cr-btn--ghost:focus-visible {
    border-color: var(--cr-primary);
    color: var(--cr-primary);
}

.cr-btn.is-loading {
    opacity: 0.75;
    pointer-events: none;
}

/* ------------------------------------------------------------------- hero */

.careers-hero {
    padding: 0 0 44px;
}

.careers-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 48px;
    align-items: end;
}

.careers-hero h2 {
    font-size: 40px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}

.careers-hero p {
    margin: 0;
    max-width: 58ch;
    color: var(--cr-muted);
}

.careers-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.careers-stats {
    display: flex;
    gap: 14px;
}

.careers-stat {
    flex: 1 1 0;
    border: 1px solid var(--cr-line);
    border-radius: 16px;
    padding: 20px 18px;
    background: #fff;
}

.careers-stat strong {
    display: block;
    font-family: var(--font-heading, 'Sora', sans-serif);
    font-size: 30px;
    line-height: 1;
    color: var(--cr-ink);
}

.careers-stat span {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--cr-muted);
}

/* ---------------------------------------------------------------- filters */

.careers-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 0 22px;
    border-top: 1px solid var(--cr-line);
}

.careers-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.careers-filters a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid var(--cr-line);
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    color: var(--cr-muted);
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.careers-filters a:hover {
    border-color: var(--cr-primary);
    color: var(--cr-primary);
}

.careers-filters a[aria-current="true"] {
    background: var(--cr-ink);
    border-color: var(--cr-ink);
    color: #fff;
}

.careers-filters em {
    font-style: normal;
    opacity: 0.6;
    font-size: 12px;
}

.careers-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 260px;
    padding: 6px 6px 6px 16px;
    border: 1px solid var(--cr-line);
    border-radius: 999px;
    background: #fff;
}

.careers-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    font-size: 14px;
    background: transparent;
    color: var(--cr-ink);
    /* style.css sets a global min-height on inputs, which would make the pill tall. */
    min-height: 0;
}

.careers-search button {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--cr-soft);
    color: var(--cr-ink);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.careers-search button:hover {
    background: var(--cr-primary);
    color: #fff;
}

.careers-refine {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 34px;
    padding: 20px 22px;
    border: 1px solid var(--cr-line);
    border-radius: 16px;
    background: var(--cr-soft);
}

.careers-refine__field {
    flex: 1 1 180px;
    min-width: 0;
}

.careers-refine__field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cr-ink);
}

.careers-refine__field select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--cr-line);
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    color: var(--cr-ink);
}

.careers-refine__field select:focus {
    outline: 0;
    border-color: var(--cr-primary);
    box-shadow: 0 0 0 3px rgba(116, 118, 255, 0.16);
}

.careers-refine__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ------------------------------------------------------------- role cards */

.careers-list {
    display: grid;
    gap: 18px;
}

.role-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 28px;
    align-items: center;
    padding: 28px 30px;
    border: 1px solid var(--cr-line);
    border-radius: 18px;
    background: #fff;
    transition: border-color 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
}

.role-card:hover {
    border-color: #cfd0f5;
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(12, 8, 62, 0.08);
}

.role-card__dept {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--cr-soft);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--cr-ink);
}

.role-card__dept::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cr-primary);
}

.role-card h3 {
    margin: 14px 0 10px;
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.role-card h3 a {
    color: var(--cr-ink);
    text-decoration: none;
}

.role-card h3 a:hover {
    color: var(--cr-primary);
}

.role-card p {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--cr-muted);
}

.role-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--cr-muted);
}

.role-card__tags li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.role-card__tags i {
    color: var(--cr-primary);
    font-size: 12px;
}

.role-card__side {
    display: grid;
    gap: 10px;
    justify-items: stretch;
    text-align: center;
}

.role-card__deadline {
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--cr-soft);
    font-size: 13px;
    font-weight: 600;
    color: var(--cr-ink);
}

.role-card__deadline.is-urgent {
    background: #fdf3f5;
    color: #8c2337;
}

.role-card__positions {
    font-size: 12px;
    color: var(--cr-muted);
}

.careers-empty {
    padding: 56px 32px;
    border: 1px dashed var(--cr-line);
    border-radius: 18px;
    text-align: center;
    background: #fff;
}

.careers-empty h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.careers-empty p {
    margin: 0 auto 22px;
    max-width: 52ch;
    color: var(--cr-muted);
}

/* ------------------------------------------------------------- how hiring */

.careers-process {
    margin-top: 64px;
    padding-top: 44px;
    border-top: 1px solid var(--cr-line);
}

.careers-process h2 {
    margin: 0 0 26px;
    font-size: 26px;
}

.careers-process__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.process-step {
    padding: 24px 22px;
    border: 1px solid var(--cr-line);
    border-radius: 16px;
    background: #fff;
}

.process-step strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    color: var(--cr-ink);
}

.process-step p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--cr-muted);
}

/* ----------------------------------------------------------- role details */

.role-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 56px;
    align-items: start;
    padding-top: 12px;
}

.role-detail__head h2 {
    margin: 16px 0 16px;
    font-size: 36px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.role-detail__head .role-card__tags {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--cr-line);
    font-size: 14px;
}

.role-lede {
    margin: 24px 0 0;
    font-size: 19px;
    line-height: 1.65;
    color: var(--cr-ink);
}

.role-body {
    margin-top: 24px;
    font-size: 16px;
    line-height: 1.8;
    color: #3c3d4d;
}

.role-body h3 {
    margin: 36px 0 14px;
    font-size: 22px;
    color: var(--cr-ink);
}

.role-body p {
    margin: 0 0 18px;
}

/* style.css removes the marker from every list on the site, so the role body,
   which is administrator-written HTML, puts it back. */
.role-body ul,
.role-body ol {
    margin: 0 0 18px;
    padding-left: 22px;
}

.role-body ul {
    list-style: disc outside;
}

.role-body ol {
    list-style: decimal outside;
}

.role-body li {
    list-style: inherit;
}

.role-body li {
    margin-bottom: 10px;
}

.role-aside {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 20px;
}

.aside-card {
    padding: 24px 24px 26px;
    border: 1px solid var(--cr-line);
    border-radius: 18px;
    background: #fff;
}

.aside-card h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.aside-card > p {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--cr-muted);
}

.aside-card--facts {
    background: var(--cr-soft);
}

.role-facts {
    margin: 16px 0 22px;
    display: grid;
    gap: 0;
}

.role-facts > div {
    display: grid;
    grid-template-columns: minmax(0, 96px) minmax(0, 1fr);
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid var(--cr-line);
}

.role-facts > div:last-child {
    border-bottom: 0;
}

.role-facts dt {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    color: var(--cr-muted);
}

.role-facts dd {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--cr-ink);
}

.role-facts__note {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    color: var(--cr-muted);
}

.role-aside__closed {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--cr-warn);
}

.share-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.role-aside .share-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--cr-line);
    background: #fff;
    color: var(--cr-ink);
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.role-aside .share-btn:hover,
.role-aside .share-btn:focus-visible {
    transform: translateY(-2px);
    color: #fff;
}

.role-aside .share-btn .social-icon {
    display: block;
    fill: currentColor;
}

.role-aside .share-btn[data-share="whatsapp"]:hover { background: #25d366; border-color: #25d366; }
.role-aside .share-btn[data-share="facebook"]:hover { background: #1877f2; border-color: #1877f2; }
.role-aside .share-btn[data-share="x"]:hover { background: #000; border-color: #000; }
.role-aside .share-btn[data-share="linkedin"]:hover { background: #0a66c2; border-color: #0a66c2; }

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

.related-list a {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--cr-ink);
    text-decoration: none;
}

.related-list a:hover {
    color: var(--cr-primary);
}

.related-list span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 400;
    color: var(--cr-muted);
}

/* ------------------------------------------------------------- apply form */

.apply-panel {
    margin-top: 48px;
    padding: 34px 34px 36px;
    border: 1px solid var(--cr-line);
    border-radius: 20px;
    background: var(--cr-soft);
    scroll-margin-top: 110px;
}

.apply-panel h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.apply-panel__lede {
    margin: 0 0 26px;
    max-width: 62ch;
    font-size: 15px;
    line-height: 1.7;
    color: var(--cr-muted);
}

.apply-closed {
    text-align: center;
    padding: 12px 0 4px;
}

.apply-closed h2 {
    margin-bottom: 10px;
}

.apply-closed p {
    margin: 0 auto;
    max-width: 48ch;
    color: var(--cr-muted);
}

.apply-closed .careers-hero__actions {
    justify-content: center;
}

.cr-form {
    display: grid;
    gap: 26px;
}

.cr-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 18px;
}

.cr-fieldset legend {
    width: 100%;
    margin: 0 0 4px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--cr-line);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cr-muted);
}

.cr-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.cr-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cr-ink);
}

.cr-req {
    color: var(--cr-danger);
}

.cr-field input[type="text"],
.cr-field input[type="email"],
.cr-field input[type="tel"],
.cr-field input[type="url"],
.cr-field input[type="number"],
.cr-field select,
.cr-field textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--cr-line);
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    color: var(--cr-ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cr-field textarea {
    min-height: 170px;
    resize: vertical;
    line-height: 1.65;
}

.cr-field input:focus,
.cr-field select:focus,
.cr-field textarea:focus {
    outline: 0;
    border-color: var(--cr-primary);
    box-shadow: 0 0 0 3px rgba(116, 118, 255, 0.16);
}

.cr-field input[aria-invalid="true"],
.cr-field select[aria-invalid="true"],
.cr-field textarea[aria-invalid="true"] {
    border-color: var(--cr-danger);
}

.cr-field .cr-help {
    margin: 7px 0 0;
    font-size: 13px;
    color: var(--cr-muted);
}

.cr-field .cr-error {
    margin: 7px 0 0;
    font-size: 13px;
    color: var(--cr-danger);
}

/* The native file control is replaced by its own label, which doubles as the
   drop target. The input stays in the DOM and keeps working without the JS. */
.cr-field label.cr-file {
    display: grid;
    place-items: center;
    gap: 6px;
    padding: 28px 22px;
    border: 1px dashed #c9cadf;
    border-radius: 14px;
    background: #fff;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.cr-file:hover,
.cr-file.is-dragging {
    border-color: var(--cr-primary);
    background: #fbfbff;
}

.cr-file > i {
    font-size: 22px;
    color: var(--cr-primary);
}

.cr-file__label {
    font-size: 15px;
    font-weight: 600;
    color: var(--cr-ink);
}

.cr-file__hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--cr-muted);
}

.cr-file.has-file {
    border-style: solid;
    border-color: #9fd9b9;
    background: #f5fcf8;
}

.cr-file.has-error {
    border-color: var(--cr-danger);
    background: #fdf3f5;
}

.cr-file input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cr-file input[type="file"]:focus-visible + .cr-file__label {
    text-decoration: underline;
}

.cr-field label.cr-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--cr-muted);
}

.cr-check input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    /* style.css sets a global min-height of 50px on every input. */
    min-height: 0;
    margin-top: 2px;
    accent-color: var(--cr-primary);
}

.cr-check a {
    color: var(--cr-primary);
    text-decoration: underline;
}

.cr-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cr-form__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

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

/* ------------------------------------------------------------ responsive */

@media (max-width: 1199px) {
    .role-detail {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 36px;
    }

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

@media (max-width: 991px) {
    .careers-hero__inner,
    .role-detail {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .careers-hero h2 {
        font-size: 32px;
    }

    .role-detail__head h2 {
        font-size: 30px;
    }

    .role-aside {
        position: static;
    }

    .role-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .role-card__side {
        justify-items: start;
        text-align: left;
    }

    .role-card__side .cr-btn {
        width: auto;
    }
}

@media (max-width: 767px) {
    .careers-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .careers-search {
        min-width: 0;
    }

    .careers-stats {
        flex-direction: column;
    }

    .cr-form__grid,
    .careers-process__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .apply-panel {
        padding: 26px 20px 28px;
        border-radius: 16px;
    }

    .role-card {
        padding: 24px 22px;
    }

    .role-facts > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cr-btn,
    .role-card,
    .cr-file,
    .role-aside .share-btn {
        transition: none;
    }

    .role-card:hover,
    .role-aside .share-btn:hover {
        transform: none;
    }
}
