/* City listings (/inwestycje/{slug}/, /domy/{slug}/) and full lists (/nowe-mieszkania/, /nowe-domy/, /nieruchomosci/):
   values of the old theme, css/listing.css in its order.
   Old names: .hn-list-head → .listing-head, .hn-filter-wrap → .filter-panel, .hn-filter-bar → .filter-bar,
   .fb-* → .filter-bar__*, .hn-list-toolbar → .listing-toolbar, .hn-sort-* → .listing-sort__*,
   .hn-cta-card* → .offer-card--cta/.offer-card__cta-*, .hn-opinie-band* → .reviews-band*, .hn-archival → .archival,
   .hn-seo* → .listing-seo*, .fsheet-* → .sheet__*, .hn-sort-sheet → .sort-sheet. Works with offers.css. */

.listing {
    background: var(--bg);
}

.listing-head {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 30px 0 36px;
}

.listing .listing-head h1 {
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.12;
    color: var(--ink);
    text-align: left;
    margin: 0;
}

.listing .breadcrumbs {
    margin: 0 0 22px;
    padding: 0;
    max-width: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--muted);
    text-align: left;
}

.listing .breadcrumbs a {
    color: var(--muted);
    transition: color 0.15s ease;
}

.listing .breadcrumbs a:hover {
    color: var(--red);
}

.listing .breadcrumbs__last,
.listing .breadcrumbs strong {
    color: var(--ink);
    font-weight: 700;
}

/* The breadcrumbs carried these rules of the old main.css as well; the ones above win where they meet. */
.breadcrumbs span > span {
    color: #fd3543;
}

.breadcrumbs span > span * {
    margin-right: 5px;
}

.breadcrumbs span > span :not(:first-child) {
    margin-left: 5px;
}

.breadcrumbs span > span a,
.breadcrumbs span > span strong {
    color: #000;
    font-weight: 400;
}

.breadcrumbs span > span a:hover {
    color: #fd3543;
}

/* ---------- Filter bar ---------- */

.filter-panel {
    position: relative;
    margin: 28px 0 0;
}

.listing .filter-bar {
    display: grid;
    grid-template-columns: 1.1fr 1.9fr 1.4fr 1.4fr auto;
    gap: 26px;
    align-items: end;
    padding-top: 6px;
}

.listing .filter-bar__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.listing .filter-bar__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 14px;
}

.listing .filter-bar__label label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

.listing .filter-bar__clear {
    display: none;
    border: 0;
    background: none;
    margin: 0;
    padding: 0;
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.15s ease;
}

.listing .filter-bar__clear:hover {
    color: var(--red);
}

.listing .filter-bar__control,
.listing .filter-bar__select {
    height: 48px;
    width: 100%;
    min-width: 0;
    border: 0;
    border-bottom: 2px solid var(--line);
    border-radius: 0;
    background-color: transparent;
    padding: 0 2px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
    outline: none;
    box-shadow: none;
    transition: border-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.listing .filter-bar__control:focus,
.listing .filter-bar__select:focus {
    border-bottom-color: var(--red);
}

.listing .filter-bar__control::placeholder {
    color: var(--muted-2);
    font-weight: 600;
}

.listing .filter-bar__control.area_min::placeholder,
.listing .filter-bar__control.area_max::placeholder {
    color: var(--ink);
    font-weight: 700;
}

.listing .filter-bar__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236A6D75' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    padding-right: 24px;
    cursor: pointer;
}

.listing .filter-bar__control::-webkit-outer-spin-button,
.listing .filter-bar__control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.listing input.filter-bar__control[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.listing .filter-bar__range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.listing .filter-bar__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 48px;
    padding: 0 30px;
    border: 1.5px solid var(--red);
    border-radius: var(--radius);
    background: transparent;
    color: var(--red);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.listing .filter-bar__submit:hover {
    background: var(--red);
    color: #fff;
}

.listing .filter-bar__submit span {
    color: inherit;
    font-weight: inherit;
}

.filter-bar__submit .filter-bar__submit-mobile {
    display: none;
}

.listing .filter-bar__location {
    position: relative;
}

/* The spinner over the field while the list of locations is loading (the old style.css of the theme). */
.filter-bar__spinner {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    overflow: hidden;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
}

.filter-bar__spinner-ring {
    width: 100%;
    height: 100%;
}

.filter-bar__spinner-ring div {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    width: 18px;
    height: 18px;
    margin: 0 auto;
    border: 2px solid #000;
    border-top-color: transparent;
    border-radius: 50%;
    transform: scale(0.2);
    animation: listing-rolling 1s linear infinite;
}

@keyframes listing-rolling {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.listing .filter-bar__location .filter-bar__spinner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 48px;
    border-radius: 0;
    background-color: transparent;
}

.listing .filter-bar__location .filter-bar__spinner-ring div {
    left: 50%;
    right: auto;
    margin: 0;
}

/* The list of locations under the field (the old #dynamic-search of the theme). */
.listing #dynamic-search {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    bottom: auto;
    transform: none;
    padding: 0;
    left: 0;
    right: auto;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 48px -16px rgba(13, 14, 17, 0.25);
    max-height: 380px;
    overflow-y: auto;
    z-index: 60;
}

.listing #dynamic-search.is-open {
    display: block;
}

.listing #dynamic-search-inner {
    max-height: none;
    overflow: visible;
}

.listing #dynamic-search-inner a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}

.listing #dynamic-search-inner a:last-child {
    border-bottom: 0;
}

.listing #dynamic-search-inner a:hover {
    background: var(--red-soft);
}

.listing #dynamic-search-inner a p {
    margin: 0;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
}

.listing #dynamic-search-inner a p:last-child {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.listing #dynamic-search-inner > p {
    margin: 0;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--muted);
    text-align: left;
}

@media (max-width: 620px) {
    .listing #dynamic-search {
        right: 0;
        width: auto;
    }
}

.listing .filter-panel__spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius);
    z-index: 5;
}

.listing .filter-panel__dot {
    border: 8px solid rgba(0, 0, 0, 0.3);
    border-left-color: #e8132f;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: listing-spin 1s linear infinite;
}

@keyframes listing-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Offers ---------- */

.listing-section {
    background: var(--paper);
    padding: 0 0 96px;
}

.listing-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 36px 0 28px;
}

.listing .listing-toolbar__count {
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
}

.listing .listing-toolbar__count b {
    color: var(--ink);
    font-weight: 800;
}

.listing .listing-sort {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    margin: 0;
}

.listing .listing-sort__pills {
    display: flex;
    gap: 8px;
}

.listing .listing-sort__pill {
    display: inline-block;
    border: 1.5px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    padding: 10px 18px;
    border-radius: 999px;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.listing .listing-sort__pill:hover {
    border-color: var(--ink);
}

.listing .listing-sort__pill.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.listing .listing__empty {
    grid-column: 1 / -1;
    padding: 40px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
}

.listing .offer-card--cta {
    background: var(--ink);
    border-color: var(--ink);
}

.listing .offer-card--cta:hover {
    border-color: var(--ink);
}

.offer-card__cta-inner {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    padding: 38px 30px;
}

.offer-card__cta-kicker {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red);
}

.listing .offer-card__cta-title {
    font-size: 23px;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.01em;
    color: #fff;
    margin: 0;
    text-align: left;
    text-wrap: balance;
}

.offer-card__cta-text {
    font-size: 14.5px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.66);
    margin: 0;
}

.listing .offer-card__cta-button {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 26px;
    background: var(--red);
    color: #fff;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    transition: background 0.15s ease;
}

.listing .offer-card__cta-button:hover {
    background: var(--red-dark);
    color: #fff;
}

/* ---------- Pagination ---------- */

.listing .pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.listing .pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 46px;
    height: 46px;
    padding: 0 12px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.listing .pagination a.page-numbers:hover {
    border-color: var(--ink);
}

.listing .pagination .page-numbers.current {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.listing .pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    color: var(--muted-2);
}

.listing .pagination .page-numbers.prev,
.listing .pagination .page-numbers.next {
    font-size: 12.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.listing .pagination .pagination__status {
    display: none;
}

@media (max-width: 760px) {
    .listing .pagination {
        gap: 10px;
    }

    .listing .pagination .page-numbers:not(.prev):not(.next) {
        display: none;
    }

    .listing .pagination .pagination__status {
        display: block;
        order: -1;
        width: 100%;
        text-align: center;
        font-size: 13px;
        font-weight: 700;
        color: var(--muted);
        margin-bottom: 2px;
    }

    .listing .pagination .page-numbers.prev,
    .listing .pagination .page-numbers.next {
        flex: 1 1 0;
        height: 48px;
        min-width: 0;
    }
}

/* ---------- Reviews band ---------- */

.reviews-band {
    background: var(--ink);
    color: #fff;
}

.reviews-band__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding: 60px 0;
}

.reviews-band__text {
    max-width: 660px;
}

.reviews-band__text .listing__kicker {
    margin-bottom: 12px;
}

.listing .reviews-band h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: #fff;
    margin: 0;
    text-align: left;
    text-wrap: balance;
}

.reviews-band p {
    margin: 13px 0 0;
    font-size: 15.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.66);
}

.reviews-band__button {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 54px;
    padding: 0 30px;
    background: var(--red);
    color: #fff;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.15s ease, transform 0.15s ease;
}

.reviews-band__button:hover {
    background: var(--red-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* ---------- Archived offers ---------- */

.archival {
    background: var(--band);
    padding: 96px 0;
}

.listing .archival__title {
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--ink);
    text-align: left;
    margin: 0 0 40px;
}

.offer-card--archived .offer-card__media img {
    filter: grayscale(0.4);
    opacity: 0.92;
}

.listing .offer-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 8px 12px;
    border-radius: 4px;
    background: var(--ink);
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
}

/* ---------- Description of the location and the links under it ---------- */

.listing-seo {
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 88px 0;
}

.listing-seo .listing-seo__content.is-clamped {
    position: relative;
    overflow: hidden;
}

.listing-seo .listing-seo__content.is-clamped::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--paper));
    pointer-events: none;
}

.listing-seo .listing-seo__toggle {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    border: 0;
    padding: 0;
    background: none;
    color: var(--red);
    font: 800 13.5px/1 var(--font-body);
    letter-spacing: 0.04em;
    cursor: pointer;
}

.listing-seo .listing-seo__toggle:hover {
    color: var(--red-dark);
}

.listing .listing-seo__content h2 {
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: var(--ink);
    text-align: left;
    margin: 0 0 18px;
}

.listing .listing-seo__content h2:not(:first-child) {
    margin-top: 40px;
}

.listing .listing-seo__content h3,
.listing .listing-seo__content h4 {
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
    text-align: left;
    margin: 40px 0 14px;
}

.listing .listing-seo__content p {
    font-size: 15.5px;
    line-height: 1.8;
    color: var(--ink-2);
    text-align: left;
    margin: 0 0 16px;
    text-wrap: pretty;
}

.listing .listing-seo__content a {
    color: var(--red);
    font-weight: 600;
}

.listing .listing-seo__content ul {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.listing .listing-seo__content ul li {
    position: relative;
    padding-left: 22px;
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--ink-2);
    text-align: left;
}

.listing .listing-seo__content ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 7px;
    height: 7px;
    background: var(--red);
}

.listing .listing-seo__content ol {
    margin: 0 0 16px;
    padding-left: 20px;
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--ink-2);
}

.listing .listing-seo__content table {
    width: auto;
    min-width: 320px;
    max-width: 480px;
    border-collapse: collapse;
    margin: 8px 0 24px;
    font-size: 14.5px;
}

/* The twenty descriptions that hold a table carry a <style> of their own with this border. The portal keeps no
   style elements (CSP), and no description has a table without that style, so the rule lives here. */
.listing .listing-seo__content table {
    border: 1px solid black;
}

.listing .listing-seo__content th,
.listing .listing-seo__content td {
    text-align: left;
    padding: 13px 18px;
    border: 0;
    border-bottom: 1px solid var(--line);
}

.listing .listing-seo__content th {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--bg);
}

.listing .listing-seo__content td {
    font-weight: 600;
    color: var(--ink-2);
}

.listing .listing-seo__content td:last-child {
    font-weight: 800;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.listing .listing-seo__content tr:last-child td {
    border-bottom: 0;
}

.listing .listing-seo__links-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
    text-align: left;
    margin: 40px 0 4px;
}

.listing .listing-seo__links-title:first-child {
    margin-top: 0;
}

.listing .listing-seo__links {
    margin-top: 14px;
    columns: 3;
    column-gap: 44px;
}

.listing .listing-seo__links a {
    display: block;
    padding: 9px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink-2);
    border-bottom: 1px solid var(--line);
    break-inside: avoid;
    transition: color 0.15s ease;
}

.listing .listing-seo__links a:hover {
    color: var(--red);
}

@media (max-width: 1180px) {
    .listing .filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    .listing .filter-bar__submit {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

@media (max-width: 760px) {
    .listing .filter-bar {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .listing-toolbar {
        padding: 28px 0 22px;
    }

    .listing-section {
        padding: 0 0 64px;
    }

    .reviews-band__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 26px;
        padding: 48px 0;
    }

    .listing .reviews-band h2 {
        font-size: 23px;
    }

    .reviews-band__button {
        width: 100%;
    }

    .archival {
        padding: 64px 0;
    }

    .listing-seo {
        padding: 56px 0;
    }

    .listing .listing-seo__content h2 {
        font-size: 23px;
    }

    .listing .listing-seo__links {
        columns: 1;
    }
}

@media (max-width: 620px) {
    .listing .offer-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        overflow: visible;
        scroll-snap-type: none;
        padding: 0;
    }
}

/* ---------- Filters and sorting on a phone: bottom sheets ---------- */

.listing-toolbar__button,
.sheet__grab,
.sheet__head,
.sheet__clear,
.sort-sheet,
.sheet-backdrop {
    display: none;
}

.listing .sheet__foot {
    display: contents;
}

@media (max-width: 760px) {
    .listing-head {
        padding: 22px 0 24px;
    }

    .listing .listing-head .filter-panel {
        margin: 0;
    }

    .listing-toolbar {
        position: sticky;
        top: 64px;
        z-index: 40;
        background: var(--paper);
        margin: 0 -20px 10px;
        padding: 12px 20px;
        box-shadow: 0 1px 0 var(--line);
        flex-wrap: nowrap;
        align-items: center;
        column-gap: 10px;
    }

    .listing-toolbar .listing-toolbar__count {
        order: 1;
        flex: 1;
        min-width: 0;
        font-size: 13.5px;
    }

    .listing-toolbar .listing-sort {
        display: none;
    }

    .listing-toolbar__button {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        order: 2;
        border: 0;
        background: none;
        padding: 6px 2px;
        color: var(--ink);
        font: 700 13.5px/1 var(--font-body);
        cursor: pointer;
        text-decoration: underline;
        text-decoration-thickness: 1.5px;
        text-underline-offset: 4px;
        text-decoration-color: var(--line);
        transition: color 0.15s ease, text-decoration-color 0.15s ease;
    }

    .listing-toolbar__button svg {
        width: 15px;
        height: 15px;
        flex: none;
    }

    .listing-toolbar__button:hover {
        color: var(--red);
        text-decoration-color: var(--red);
    }

    .listing-toolbar__button--sort {
        order: 3;
        margin-left: 18px;
    }

    .sheet-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 80;
        background: rgba(13, 14, 17, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .sheet-backdrop.is-on {
        opacity: 1;
        pointer-events: auto;
    }

    .listing .filter-panel,
    .sort-sheet {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 81;
        margin: 0;
        max-height: 86vh;
        background: #fff;
        border-radius: 16px 16px 0 0;
        transform: translateY(102%);
        visibility: hidden;
        transition: transform 0.22s ease, visibility 0.22s;
    }

    .listing .filter-panel.is-open,
    .sort-sheet.is-open {
        transform: none;
        visibility: visible;
    }

    .sheet__grab {
        display: block;
        flex: none;
        width: 40px;
        height: 4px;
        border-radius: 2px;
        background: var(--line);
        margin: 10px auto 0;
        touch-action: none;
    }

    .sheet__head {
        display: flex;
        flex: none;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px 12px;
        border-bottom: 1px solid var(--line);
        touch-action: none;
    }

    .sheet__head strong {
        font: 700 16px/1.2 var(--font-body);
        color: var(--ink);
    }

    .sheet__close {
        border: 0;
        background: none;
        color: var(--muted);
        width: 32px;
        height: 32px;
        display: grid;
        place-items: center;
        cursor: pointer;
    }

    .sheet__close svg {
        width: 18px;
        height: 18px;
    }

    .listing .filter-panel .filter-bar {
        overflow-y: auto;
        padding: 18px 20px 0;
        gap: 18px;
    }

    .listing .filter-panel .filter-bar__field {
        gap: 2px;
    }

    .listing .filter-panel .filter-bar__label {
        min-height: 0;
    }

    .listing .filter-panel .filter-bar__label label {
        font-size: 12.5px;
        font-weight: 600;
        line-height: 1;
    }

    .listing .filter-panel .filter-bar__clear {
        color: var(--red);
    }

    .listing .sheet__foot {
        display: flex;
        align-items: center;
        gap: 14px;
        position: sticky;
        bottom: 0;
        margin: 4px -20px 0;
        padding: 14px 20px calc(18px + env(safe-area-inset-bottom));
        background: var(--paper);
        border-top: 1px solid var(--line);
    }

    .sheet__clear {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 52px;
        border: 0;
        border-radius: 8px;
        background: var(--bg);
        color: var(--ink);
        font: 700 14px/1 var(--font-body);
        letter-spacing: 0.06em;
        text-transform: uppercase;
        text-decoration: none;
        cursor: pointer;
        transition: background 0.15s ease;
    }

    .sheet__clear:hover {
        background: var(--line);
    }

    .listing .sheet__foot .filter-bar__submit {
        flex: 1;
        height: 52px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: var(--red);
        color: #fff;
        font-size: 14px;
        letter-spacing: 0.06em;
    }

    .listing .sheet__foot .filter-bar__submit:hover {
        background: var(--red-dark);
    }

    .listing .sheet__foot .filter-bar__submit-desktop {
        display: none;
    }

    .listing .sheet__foot .filter-bar__submit-mobile {
        display: inline;
    }

    .sort-sheet .sort-sheet__body {
        padding: 6px 20px calc(16px + env(safe-area-inset-bottom));
        overflow-y: auto;
    }

    .sort-sheet__row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 16px 2px;
        border-bottom: 1px solid var(--line);
        font: 700 15px/1.2 var(--font-body);
        color: var(--ink);
    }

    .sort-sheet__row:last-child {
        border-bottom: 0;
    }

    .sort-sheet__row span {
        opacity: 0;
        color: var(--red);
    }

    .sort-sheet__row.is-active {
        color: var(--red);
    }

    .sort-sheet__row.is-active span {
        opacity: 1;
    }

    body.sheet-open {
        overflow: hidden;
    }
}

/* "Brak nieruchomości wg szukanej frazy" under the field of /nieruchomosci/: the old line had this padding inline. */
.listing #dynamic-search-inner > p.filter-bar__none {
    padding-bottom: 25px;
}

/* City listings sit right on the footer (main.css of the old theme: body.tax-inwestycje, body.tax-domy .site-footer). */
.page-listing--city .site-footer {
    margin-top: 0;
}

/* Touch screens: 16px fields, so iOS Safari does not zoom in on focus (listing.css of the old theme, @media (pointer: coarse)). */
@media (pointer: coarse) {
    .listing .filter-bar__control,
    .listing .filter-bar__select {
        font-size: 16px;
    }
}
