/* Photos occupy space only when a public listing actually has a cover. */
.portal-listing-media {
    display: block;
    overflow: hidden;
    flex: none;
    border-radius: 8px;
    background: #eef1f3;
}
.portal-listing-media > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.portal-list-card .portal-listing-media {
    float: left;
    width: clamp(74px, 20vw, 96px);
    aspect-ratio: 4 / 3;
    margin: 0 14px 6px 0;
}
.portal-list-card::after { content: ""; display: block; clear: both; }
.portal-list-card { position: relative; }
.portal-list-card .portal-card-link { color: inherit; text-decoration: none; }
.portal-list-card .portal-card-link::after { content: ""; position: absolute; inset: 0; }
.portal-list-card .list-job-card__phone { position: relative; z-index: 1; }
.portal-list-card .list-job-card__phone button {
    border: 0; background: transparent; color: #526578;
    font: inherit; cursor: pointer; margin-left: auto;
}
.portal-list-card .new-job-card__title, .portal-list-card .list-job-card__title {
    min-width: 0; overflow-wrap: anywhere;
}
.portal-list-card .list-job-card__salary, .portal-list-card .new-job-card__salary {
    white-space: normal; overflow-wrap: anywhere; max-width: 36%;
}
.portal-list-card .list-job-card__meta, .portal-list-card .new-job-card__meta { flex-wrap: wrap; }
.portal-list-card .list-job-card__tags:empty, .portal-list-card .new-job-card__tag:empty { display: none; }

.company_list .job_list > li .portal-home-card {
    box-sizing: border-box; overflow: hidden; min-width: 0;
}
.portal-home-card > .portal-listing-media { margin-bottom: 12px; height: clamp(108px, 12vw, 168px); }
.portal-home-card > .portal-card-summary, .portal-jobs-row .portal-card-summary {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    overflow: hidden; overflow-wrap: anywhere; color: #546172;
    font-size: 14px; line-height: 1.5; margin: 8px 0;
}
.portal-home-card .portal-card-summary:empty, .portal-jobs-row .portal-card-summary:empty { display: none; }
.portal-home-card .line_1 { min-width: 0; }
.pl .portal-jobs-row .portal-listing-media {
    float: left; width: clamp(72px, 10vw, 104px); aspect-ratio: 4 / 3; margin: 0 15px 4px 0;
}
.pl .portal-jobs-row .info-primary { min-width: 0; }
.pl .portal-jobs-row .info-primary:has(.portal-listing-media) > .name { float: none; width: auto !important; }
.pl .portal-jobs-row .info-primary:has(.portal-listing-media) .jtitle {
    display: block; float: none; width: auto !important; white-space: normal; overflow-wrap: anywhere;
}
.pl .portal-jobs-row .res-tag { height: auto; }
.idle-grid .portal-market-card .portal-listing-media { border-radius: 0; width: 100%; aspect-ratio: 4 / 3; }
.idle-grid .portal-market-card { position: relative; align-self: start; min-width: 0; }
.idle-grid .portal-market-card .idle-card__badge { position: static; display: inline-block; border-radius: 4px; margin-right: 3px; padding: 0 4px; }
.idle-grid .portal-market-card .idle-card__title {
    height: auto; font-size: 14px; line-height: 1.5; font-weight: 550; overflow-wrap: anywhere; word-break: normal;
}
.tr-card .portal-listing-media { width: min(25vw, 100px); aspect-ratio: 1; align-self: flex-start; }
.business-item > .portal-listing-media {
    width: clamp(64px, 18vw, 90px); aspect-ratio: 1; align-self: flex-start;
}
.business-item > .portal-listing-media > img { object-fit: contain; }
@media (max-width: 360px) {
    .portal-list-card .portal-listing-media { width: 64px; margin-right: 9px; }
    .portal-list-card .new-job-card__top, .portal-list-card .list-job-card__top { flex-wrap: wrap; }
}

/* The legacy stylesheet assigns this container a fixed 1200px, even on tablets. */
body .plist:has(.portal-jobs-row) { display: flow-root; width: min(1200px, 100%); max-width: 100%; }
body .company_list .job_list > li:has(> .portal-home-card) { align-self: start; }
body .company_list .job_list > li .portal-home-card { height: auto; }
.job-tab-box .job_list li .portal-home-card .line_2 {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 6px;
}
.job-tab-box .job_list li .portal-home-card .line_2 .company_name,
.job-tab-box .job_list li .portal-home-card .line_2 .company_info {
    float: none; width: auto; max-width: 100%; height: auto; line-height: 1.5;
}
.portal-home-card .company_name:not(:has(a, button, span)),
.portal-home-card .line_3:not(:has(span)) { display: none; }
.job-tab-box .job_list li .portal-home-card .line_3 { height: auto; }
.pl .portal-jobs-row .info-primary:has(> .portal-listing-media) {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-content: start;
}
.pl .portal-jobs-row .info-primary > .portal-listing-media { grid-row: span 2; margin: 0; }
.pl .portal-jobs-row .info-primary:has(> .portal-listing-media) > .name,
.pl .portal-jobs-row .info-primary:has(> .portal-listing-media) > p { margin: 0; height: auto; }
.pl .portal-jobs-row .info-company h3:not(:has(span, a)) { display: none; }
/* Marketplace cards use the same reading order even when adjacent listings have no photos. */
.list-jobs.idle-grid:has(.portal-market-card) { grid-template-columns: minmax(0,1fr); }
.list-jobs.idle-grid .portal-market-card { display: flex; gap: 12px; padding: 12px; align-items: center; }
.idle-grid .portal-market-card .portal-listing-media { width: clamp(82px,23vw,110px); border-radius: 7px; }
.idle-grid .portal-market-card .idle-card__body { padding: 0; flex: 1; min-width: 0; }
.idle-grid .portal-market-card .idle-card__bottom { gap: 8px; flex-wrap: wrap; }

/* Keep the photograph beside the headline and summary on the portal's three-column grid. */
.company_list .job_list > li .portal-home-card:has(> .portal-listing-media) {
    display: grid; grid-template-columns: minmax(74px, 30%) minmax(0,1fr);
    column-gap: 12px; align-content: start;
}
.company_list .job_list > li .portal-home-card > .portal-listing-media {
    grid-row: 1 / 3; grid-column: 1; width: 100%; aspect-ratio: 4 / 3; height: auto; margin: 0 0 10px;
}
.company_list .job_list > li .portal-home-card:has(> .portal-listing-media) > .line_1,
.company_list .job_list > li .portal-home-card:has(> .portal-listing-media) > .portal-card-summary { grid-column: 2; min-width: 0; }
.company_list .job_list > li .portal-home-card:has(> .portal-listing-media) > :is(.line_2, .line_3, .line_4) { grid-column: 1 / -1; }
.company_list .job_list > li .portal-home-card .line_1 .job_name,
.company_list .job_list > li .portal-home-card .line_1 .job_name a {
    max-width: 100%; height: auto; white-space: normal; overflow-wrap: anywhere; line-height: 1.45;
}

