.helsti-propstack-facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
    gap: var(--wp--preset--spacing--x-small) var(--wp--preset--spacing--medium);
    margin: 0;
}

/* Wraps the value under its label when the row is too narrow, instead of overflowing into the next column. */
.helsti-propstack-facts__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em var(--wp--preset--spacing--x-small);
    padding-block: var(--wp--preset--spacing--xx-small);
    border-bottom: 1px solid var(--wp--preset--color--outline);
}

/* The theme's neutral grey reached only 3.65:1 on the dark background; weight carries the difference instead. */
.helsti-propstack-facts dt {
    font-weight: 400;
}

.helsti-propstack-facts dd {
    min-width: 0;
    margin: 0 0 0 auto;
    font-weight: 600;
    text-align: end;
    overflow-wrap: anywhere;
}

.helsti-propstack-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.helsti-propstack-features__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--xx-small);
    padding: 0;
    list-style: none;
}

.helsti-propstack-features__list li {
    padding: 0.25em 0.75em;
    border: 1px solid var(--wp--preset--color--outline);
    border-radius: 999px;
}

.helsti-propstack-units__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: var(--wp--preset--spacing--medium);
    padding: 0;
    list-style: none;
}

.helsti-propstack-units__item a {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--xx-small);
    color: inherit;
    text-decoration: none;
}

.helsti-propstack-units__image {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.helsti-propstack-units__title {
    font-weight: 600;
}

.helsti-propstack-units__facts {
    font-size: 0.95em;
}

.helsti-propstack-inquiry {
    container-type: inline-size;
    scroll-margin-top: var(--wp--preset--spacing--x-large);
}

.helsti-propstack-inquiry__form {
    display: grid;
    gap: var(--wp--preset--spacing--small);
    max-width: 48rem;
}

.helsti-propstack-inquiry__form p {
    margin: 0;
}

.helsti-propstack-inquiry__hint {
    font-size: 0.9em;
}

.helsti-propstack-inquiry fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.helsti-propstack-inquiry__group > legend {
    margin-bottom: var(--wp--preset--spacing--x-small);
    font-weight: 600;
}

.helsti-propstack-inquiry__salutation {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--xx-small) var(--wp--preset--spacing--medium);
    margin-bottom: var(--wp--preset--spacing--small) !important;
}

.helsti-propstack-inquiry__salutation legend {
    width: 100%;
    margin-bottom: 0.25em;
}

.helsti-propstack-inquiry__salutation label {
    display: inline-flex;
    gap: 0.5em;
    align-items: center;
    min-height: 2.75rem;
    cursor: pointer;
}

.helsti-propstack-inquiry__fields {
    display: grid;
    gap: var(--wp--preset--spacing--small) var(--wp--preset--spacing--medium);
}

@container (min-width: 32rem) {
    .helsti-propstack-inquiry__fields {
        grid-template-columns: 1fr 1fr;
    }
}

.helsti-propstack-inquiry__field label {
    display: block;
    margin-bottom: 0.25em;
}

.helsti-propstack-inquiry__field :is(input, textarea) {
    box-sizing: border-box;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.6em 0.75em;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    font: inherit;
}

.helsti-propstack-inquiry :is(input, textarea, button, a):focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

.helsti-propstack-inquiry input:is([type="checkbox"], [type="radio"]) {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    accent-color: var(--wp--preset--color--primary);
}

.helsti-propstack-inquiry__consent,
.helsti-propstack-inquiry__callback {
    display: flex;
    gap: 0.75em;
    align-items: flex-start;
}

/* Beats the margin reset on form paragraphs. */
.helsti-propstack-inquiry__form .helsti-propstack-inquiry__callback {
    margin-top: var(--wp--preset--spacing--small);
}

/* The heading is a full sentence; at h2 size it would run over three lines. */
.helsti-propstack-inquiry #anfrage-titel {
    font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
}

.helsti-propstack-inquiry__consent input,
.helsti-propstack-inquiry__callback input {
    flex: none;
    margin-top: 0.2em;
}

/* Theme red on the dark background is about 3.3:1; text colour plus underline passes. */
.helsti-propstack-inquiry__consent a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

/* Dark text on the theme red is about 3.3:1, white about 5:1. */
.helsti-propstack-inquiry .helsti-propstack-inquiry__submit {
    color: #fff;
}

.helsti-propstack-inquiry__hp {
    position: absolute;
    left: -9999px;
}

.helsti-propstack-inquiry__notice {
    padding: var(--wp--preset--spacing--x-small) var(--wp--preset--spacing--small);
    border-left: 4px solid currentColor;
    scroll-margin-top: var(--wp--preset--spacing--x-large);
}

/* White on the theme primary #e20613 is 4.9:1; the brighter #f60c1a would fail at this size. */
.helsti-propstack-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
}

.helsti-propstack-badge {
    width: fit-content;
    padding: 0.2em 0.75em;
    border-radius: 999px;
    background: var(--wp--preset--color--primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.5;
}

/* Core sets the image link to height: 100%, which stretches it to the grid row and pushes the pills down. */
.helsti-propstack-card-image a {
    height: auto;
}

/* The pills sit a little apart from the image; the theme's block gap would put twice as much above the title. */
.wp-block-post .helsti-propstack-badges {
    margin-top: var(--wp--preset--spacing--small);
}

.wp-block-post .helsti-propstack-badges + .wp-block-post-title {
    margin-top: var(--wp--preset--spacing--x-small);
}

/* Listing titles are long and sometimes in capitals; at the theme's h1 size a phone split them mid-word without a hyphen. */
:is(.single-propstack_property, .single-propstack_project) h1.wp-block-post-title {
    font-size: clamp(1.75rem, 1.1rem + 3.5vw, 3rem);
    hyphens: auto;
    overflow-wrap: break-word;
}

.helsti-propstack-header-facts {
    font-size: 1.125rem;
    text-align: center;
}

.helsti-propstack-header-facts p {
    margin: 0;
}

.helsti-propstack-broker {
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--small);
    margin-bottom: var(--wp--preset--spacing--medium);
}

.helsti-propstack-broker__photo {
    width: 7rem;
    height: 7rem;
    border-radius: 50%;
    object-fit: cover;
}

.helsti-propstack-broker p {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.helsti-propstack-broker__label {
    font-size: 0.875rem;
}

.helsti-propstack-broker__name {
    font-size: 1.25rem;
}


.helsti-propstack-back a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.helsti-propstack-placeholder {
    padding: var(--wp--preset--spacing--small);
    border: 1px dashed var(--wp--preset--color--outline);
    text-align: center;
}
