.kmh-marketplace {
    --kmh-marketplace-ink: #17333a;
    --kmh-marketplace-muted: #52666b;
    --kmh-marketplace-accent: #147168;
    --kmh-marketplace-line: #d5dfdf;
    color: var(--kmh-marketplace-ink);
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.kmh-marketplace label {
    display: block;
    margin: 0 0 1rem;
    font-weight: 600;
}

.kmh-marketplace input:not([type="file"]),
.kmh-marketplace textarea,
.kmh-marketplace select {
    box-sizing: border-box;
    display: block;
    width: 100%;
    margin-top: .35rem;
    padding: .7rem;
    border: 1px solid #849698;
    border-radius: .35rem;
    color: inherit;
    background: #fff;
    font: inherit;
}

.kmh-marketplace button,
.kmh-marketplace-button,
.kmh-marketplace-filters button {
    display: inline-block;
    border: 0;
    border-radius: .35rem;
    padding: .7rem 1rem;
    color: #fff;
    background: var(--kmh-marketplace-accent);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.kmh-marketplace button:hover,
.kmh-marketplace-button:hover,
.kmh-marketplace-filters button:hover {
    background: #0e554e;
    color: #fff;
}

.kmh-marketplace-grid,
.kmh-marketplace-filters,
.kmh-marketplace-listings,
.kmh-marketplace-image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.kmh-marketplace-listings {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1.5rem;
}

.kmh-marketplace-image-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 1rem 0;
}

.kmh-marketplace-image-grid img,
.kmh-marketplace-card img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 340px;
    object-fit: cover;
    border-radius: .5rem;
}

.kmh-marketplace-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--kmh-marketplace-line);
    border-radius: .5rem;
    background: #fff;
}

.kmh-marketplace-price {
    color: var(--kmh-marketplace-accent);
    font-size: 1.35rem;
    font-weight: 800;
}

.kmh-marketplace-notice {
    padding: .9rem 1rem;
    border-left: 4px solid var(--kmh-marketplace-accent);
    background: #edf6f4;
}

.kmh-marketplace-description,
.kmh-marketplace-contact {
    margin-top: 2rem;
}

.kmh-marketplace-table-wrap {
    overflow-x: auto;
}

.kmh-marketplace-table {
    width: 100%;
    border-collapse: collapse;
}

.kmh-marketplace-table th,
.kmh-marketplace-table td {
    padding: .8rem;
    border-bottom: 1px solid var(--kmh-marketplace-line);
    text-align: left;
    vertical-align: top;
}

.kmh-marketplace-actions form {
    display: inline-block;
    margin: .4rem .25rem .2rem 0;
}

.kmh-marketplace-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 760px) {
    .kmh-marketplace-listings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .kmh-marketplace-listings,
    .kmh-marketplace-grid,
    .kmh-marketplace-filters,
    .kmh-marketplace-image-grid {
        grid-template-columns: 1fr;
    }

}

.kmh-marketplace .kmh-marketplace-status {
    display: inline-block;
    margin: .3rem 0;
    padding: .25rem .55rem;
    border-radius: .3rem;
    color: #17333a;
    background: #e7f2f1;
    font-weight: 700;
}

.kmh-marketplace-seller-label {
    color: var(--kmh-marketplace-muted);
    font-weight: 700;
}
.kmh-marketplace-unified-dashboard {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 1100px;
}

.kmh-marketplace-unified-dashboard > .kmh-marketplace-workspace {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.kmh-marketplace-workspace .kmh-command-centre-head > div {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}

.kmh-marketplace-workspace .kmh-command-centre-grid,
.kmh-marketplace-workspace .kmh-command-card,
.kmh-marketplace-workspace .kmh-marketplace-context-nav,
.kmh-marketplace-workspace .kmh-marketplace-filter-nav {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

.kmh-marketplace-context-nav a,
.kmh-marketplace-filter-nav a {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.kmh-marketplace-workspace { margin: 0 0 1.5rem; }
.kmh-marketplace-context-nav, .kmh-marketplace-filter-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.kmh-marketplace-context-nav a, .kmh-marketplace-filter-nav a { display: inline-flex; align-items: center; gap: .35rem; padding: .55rem .8rem; border: 1px solid #d5dfdf; border-radius: .4rem; color: var(--kmh-marketplace-ink); background: #fff; font-weight: 700; text-decoration: none; }
.kmh-marketplace-context-nav a.is-current, .kmh-marketplace-filter-nav a.is-current { border-color: #147168; color: #fff; background: #147168; }
.kmh-marketplace-filter-nav span { font-variant-numeric: tabular-nums; opacity: .8; }
.kmh-marketplace-workspace .kmh-command-centre-head h1, .kmh-marketplace-workspace .kmh-command-centre-head h2, .kmh-marketplace-workspace .kmh-command-centre-head h3 { margin-top: 3px; color: #0c3355; font-size: clamp(25px, 3vw, 38px); }
.kmh-marketplace-workspace .kmh-command-card.is-static:hover { border-color: #d8e3ef; outline: none; transform: none; }

.kmh-marketplace-commercial {
    --kmh-marketplace-ink: #17333a;
    --kmh-marketplace-muted: #52666b;
    --kmh-marketplace-line: #d5dfdf;
    color: var(--kmh-marketplace-ink);
}

.kmh-marketplace-commercial-list {
    display: grid;
    gap: .75rem;
    margin: 1rem 0;
}

.kmh-marketplace-commercial-row.kmh-marketplace-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    min-height: 0;
}

.kmh-marketplace-commercial-row h3 {
    margin: .2rem 0 .4rem;
    color: var(--kmh-marketplace-ink);
}

.kmh-marketplace-commercial-row p {
    margin: .35rem 0;
}

.kmh-marketplace-commercial-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    max-width: 100%;
}

.kmh-marketplace-commercial-actions form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: .45rem;
    margin: 0;
}

.kmh-marketplace-commercial-actions label {
    display: block;
    margin: 0;
    font-weight: 600;
}

.kmh-marketplace-commercial-actions input:not([type="hidden"]) {
    box-sizing: border-box;
    max-width: 18rem;
    padding: .55rem;
    border: 1px solid #849698;
    border-radius: .35rem;
    font: inherit;
}

@media (max-width: 760px) {
    .kmh-marketplace-commercial-row.kmh-marketplace-card {
        flex-direction: column;
    }

    .kmh-marketplace-commercial-actions {
        justify-content: flex-start;
    }
}

.kmh-marketplace-dashboard .kmh-marketplace-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.kmh-marketplace-dashboard .kmh-marketplace-dashboard-card {
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--kmh-marketplace-line);
    border-radius: .5rem;
    background: #fff;
}

.kmh-marketplace-dashboard .kmh-marketplace-dashboard-card > img {
    display: block;
    width: 100%;
    height: 210px;
    max-height: 220px;
    object-fit: cover;
}

.kmh-marketplace-dashboard .kmh-marketplace-dashboard-card__body {
    min-width: 0;
    padding: .85rem;
    overflow-wrap: anywhere;
}

.kmh-marketplace-dashboard .kmh-marketplace-dashboard-card__body h2 {
    margin: .2rem 0 .4rem;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.kmh-marketplace-dashboard .kmh-marketplace-dashboard-card__body p {
    margin: .4rem 0;
}

.kmh-marketplace-dashboard .kmh-marketplace-dashboard-card__body .kmh-marketplace-price {
    margin: .35rem 0;
    font-size: 1.2rem;
}

.kmh-marketplace-dashboard .kmh-marketplace-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.kmh-marketplace-dashboard .kmh-marketplace-card-actions form {
    max-width: 100%;
    margin: 0;
}

.kmh-marketplace-dashboard .kmh-marketplace-card-actions button,
.kmh-marketplace-dashboard .kmh-marketplace-card-actions a {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.kmh-marketplace-dashboard .kmh-marketplace-card-actions > a.kmh-marketplace-button,
.kmh-marketplace-dashboard .kmh-marketplace-card-actions button {
    color: #fff !important;
    text-align: center;
    line-height: 1.3;
    white-space: normal;
}

.kmh-marketplace-dashboard .kmh-marketplace-advert-status-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: .5rem;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
}

.kmh-marketplace-dashboard .kmh-marketplace-advert-status-form label {
    grid-column: 1 / -1;
    margin: 0;
}

.kmh-marketplace-dashboard .kmh-marketplace-advert-status-form select {
    min-width: 0;
    margin: 0;
}

.kmh-marketplace-dashboard .kmh-marketplace-advert-status-form button {
    min-height: 2.9rem;
}

@media (max-width: 560px) {
    .kmh-marketplace-dashboard .kmh-marketplace-dashboard-cards,
    .kmh-marketplace-dashboard .kmh-marketplace-advert-status-form {
        grid-template-columns: 1fr;
    }

    .kmh-marketplace-dashboard .kmh-marketplace-advert-status-form button {
        width: 100%;
    }
}

/* Public sales archive and detail views */
.kmh-marketplace.kmh-marketplace-archive,
.kmh-marketplace.kmh-marketplace-detail {
    box-sizing: border-box;
    width: min(100% - 2rem, 1240px);
    max-width: 1240px;
    padding: 0;
    color: #17333a;
}
.kmh-marketplace-sales-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin: 1.5rem 0 1.25rem;
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: .8rem;
    color: #fff;
    background: linear-gradient(120deg, #0c3355, #176a83);
}
.kmh-marketplace-sales-hero h1,
.kmh-marketplace-sales-hero p {
    color: inherit;
}
.kmh-marketplace-sales-hero h1 {
    margin: .2rem 0 .65rem;
    font-size: clamp(2rem, 5vw, 3.4rem);
}
.kmh-marketplace-sales-hero p {
    max-width: 42rem;
    margin: .3rem 0;
}
.kmh-marketplace-eyebrow {
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.kmh-marketplace-sales-hero .kmh-marketplace-button {
    flex: 0 0 auto;
    color: #0c3355;
    background: #fff;
}
.kmh-marketplace-sales-hero .kmh-marketplace-button:hover {
    color: #0c3355;
    background: #e8f3f6;
}
.kmh-marketplace-search-panel {
    margin: 1.25rem 0 1.5rem;
    padding: clamp(1rem, 2.5vw, 1.75rem);
    border: 1px solid #d5dfdf;
    border-radius: .75rem;
    background: #f4f8f9;
}
.kmh-marketplace-search-panel h2 {
    margin: 0 0 1rem;
    color: #0c3355;
}
.kmh-marketplace.kmh-marketplace-archive .kmh-marketplace-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem 1rem;
    align-items: end;
}
.kmh-marketplace.kmh-marketplace-archive .kmh-marketplace-filters label {
    min-width: 0;
    margin-bottom: 0;
}
.kmh-marketplace-search-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .85rem;
}
.kmh-marketplace-search-actions a {
    font-weight: 700;
}
.kmh-marketplace-distance-note {
    padding: .8rem 1rem;
    border-left: 4px solid #176a83;
    background: #edf6f8;
}
.kmh-marketplace.kmh-marketplace-archive .kmh-marketplace-listings {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}
.kmh-marketplace.kmh-marketplace-archive .kmh-marketplace-card {
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
    padding: 0 0 1rem;
    border-radius: .75rem;
    box-shadow: 0 3px 14px rgb(12 51 85 / 8%);
}
.kmh-marketplace.kmh-marketplace-archive .kmh-marketplace-card > :not(.kmh-marketplace-card-image) {
    margin-right: 1rem;
    margin-left: 1rem;
}
.kmh-marketplace-card-image {
    display: block;
    overflow: hidden;
    background: #e9eff1;
    aspect-ratio: 4 / 3;
}
.kmh-marketplace.kmh-marketplace-archive .kmh-marketplace-card-image img {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    object-fit: cover;
}
.kmh-marketplace.kmh-marketplace-archive .kmh-marketplace-card h2 {
    margin-top: .9rem;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    line-height: 1.25;
}
.kmh-marketplace-card h2 a {
    color: #0c3355;
    text-decoration: none;
}
.kmh-marketplace-card h2 a:hover {
    text-decoration: underline;
}
.kmh-marketplace-type {
    color: #52666b;
}
.kmh-marketplace.kmh-marketplace-archive .kmh-marketplace-advert-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    margin-top: .8rem;
}
.kmh-marketplace-advert-facts > div {
    min-width: 0;
    padding: .55rem;
    border-radius: .35rem;
    background: #f4f8f9;
}
.kmh-marketplace-advert-facts dt {
    color: #52666b;
    font-size: .82rem;
}
.kmh-marketplace-advert-facts dd {
    margin: .1rem 0 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.kmh-marketplace-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
    margin: 2rem 0;
}
.kmh-marketplace-pagination a,
.kmh-marketplace-pagination span {
    display: inline-flex;
    min-width: 2.5rem;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    padding: .45rem .7rem;
    border: 1px solid #d5dfdf;
    border-radius: .4rem;
    color: #0c3355;
    background: #fff;
    font-weight: 700;
    text-decoration: none;
}
.kmh-marketplace-pagination [aria-current="page"] {
    border-color: #0c3355;
    color: #fff;
    background: #0c3355;
}
.kmh-marketplace.kmh-marketplace-detail > h1 {
    color: #0c3355;
    font-size: clamp(2rem, 4vw, 3rem);
}
.kmh-marketplace-public-gallery {
    margin: 1.25rem 0 2rem;
}
.kmh-marketplace-public-gallery__main {
    margin: 0;
}
.kmh-marketplace-public-gallery__main a,
.kmh-marketplace-public-gallery__thumbs a {
    display: block;
    overflow: hidden;
    border-radius: .65rem;
    background: #e9eff1;
}
.kmh-marketplace-public-gallery__main a {
    aspect-ratio: 16 / 9;
}
.kmh-marketplace-public-gallery__main img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 680px;
    object-fit: contain;
}
.kmh-marketplace-public-gallery__main figcaption {
    margin-top: .4rem;
    color: #52666b;
    font-size: .9rem;
}
.kmh-marketplace-public-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .7rem;
    margin-top: .8rem;
}
.kmh-marketplace-public-gallery__thumbs a {
    aspect-ratio: 4 / 3;
}
.kmh-marketplace-public-gallery__thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.kmh-marketplace.kmh-marketplace-detail .kmh-marketplace-advert-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin: 1.25rem 0;
}
.kmh-marketplace.kmh-marketplace-detail .kmh-marketplace-description,
.kmh-marketplace.kmh-marketplace-detail .kmh-marketplace-advert-notes,
.kmh-marketplace.kmh-marketplace-detail .kmh-marketplace-public-contact,
.kmh-marketplace.kmh-marketplace-detail .kmh-marketplace-contact {
    max-width: 58rem;
}
.kmh-marketplace.kmh-marketplace-detail .kmh-marketplace-contact,
.kmh-marketplace.kmh-marketplace-detail .kmh-marketplace-public-contact {
    padding: 1.25rem;
    border: 1px solid #d5dfdf;
    border-radius: .7rem;
    background: #f4f8f9;
}
@media (max-width: 900px) {
    .kmh-marketplace.kmh-marketplace-archive .kmh-marketplace-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .kmh-marketplace.kmh-marketplace-archive .kmh-marketplace-listings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .kmh-marketplace-public-gallery__thumbs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (max-width: 600px) {
    .kmh-marketplace.kmh-marketplace-archive,
    .kmh-marketplace.kmh-marketplace-detail {
        width: min(100% - 1.25rem, 1240px);
    }
    .kmh-marketplace-sales-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }
    .kmh-marketplace.kmh-marketplace-archive .kmh-marketplace-filters,
    .kmh-marketplace.kmh-marketplace-archive .kmh-marketplace-listings,
    .kmh-marketplace.kmh-marketplace-detail .kmh-marketplace-advert-facts {
        grid-template-columns: 1fr;
    }
    .kmh-marketplace-public-gallery__thumbs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.kmh-marketplace.kmh-marketplace-archive .kmh-marketplace-sales-hero h1 {
    color: #fff !important;
}

/* Sales workspaces reuse the managed-owner portal width and command-centre frame. */
.kmh-portal-wrap.kmh-admin-wrap.kmh-marketplace-portal {
    box-sizing: border-box;
    display: block;
    width: calc(100vw - 40px);
    max-width: 1600px;
    margin: 24px auto 40px;
}
.kmh-portal-wrap.kmh-admin-wrap.kmh-marketplace-portal > .kmh-portal-main {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.kmh-marketplace-portal .kmh-marketplace-dashboard {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.kmh-marketplace-portal .kmh-marketplace-workspace { margin: 0; }
.kmh-marketplace-portal .kmh-marketplace-form,
.kmh-marketplace-portal .kmh-marketplace-receipt {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0 0 24px;
}

.kmh-marketplace-portal .kmh-marketplace-context-select {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 12px;
}
.kmh-marketplace-portal .kmh-marketplace-context-select label { margin: 0; }
.kmh-marketplace-portal .kmh-marketplace-context-select select {
    box-sizing: border-box;
    width: auto;
    min-width: 220px;
    max-width: min(480px, 100%);
    margin: 0;
}
.kmh-marketplace-portal {
    --kmh-sales-line: #c8d8e7;
    --kmh-sales-muted: #60758a;
}
.kmh-marketplace-portal .kmh-marketplace-portal-heading h1 {
    margin: 0;
}
.kmh-marketplace-portal .kmh-marketplace-portal-heading > .kmh-muted {
    margin: 5px 0 0;
}
.kmh-marketplace-portal .kmh-business-selling-status {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: baseline;
    margin-top: 12px;
    padding: 10px 13px;
    border: 1px solid var(--kmh-sales-line);
    border-radius: 9px;
    background: #f4f9fd;
    color: #173653;
}
.kmh-marketplace-portal .kmh-business-selling-status span {
    color: var(--kmh-sales-muted);
}
.kmh-marketplace-portal .kmh-marketplace-section-title {
    margin: 0 0 14px;
    color: #173653;
    font-size: clamp(23px, 2.4vw, 30px);
}
.kmh-marketplace-portal .kmh-marketplace-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.kmh-marketplace-portal .kmh-marketplace-overview-grid > .kmh-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--kmh-sales-line);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(24, 54, 82, .05);
}
.kmh-marketplace-portal .kmh-owner-card-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.kmh-marketplace-portal .kmh-owner-card-heading h3 {
    margin: 0 0 6px;
    color: #173653;
}
.kmh-marketplace-portal .kmh-marketplace-overview-grid .kmh-card > p {
    margin: 0 0 15px;
    color: var(--kmh-sales-muted);
}
.kmh-marketplace-portal .kmh-marketplace-overview-grid .kmh-card > .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 42px;
    margin-top: auto;
    padding: 9px 16px;
    border: 1px solid #9db3c7;
    border-radius: 8px;
    background: #fff;
    color: #173653;
    text-decoration: none;
    font-weight: 800;
}
.kmh-marketplace-portal .kmh-marketplace-overview-grid .kmh-card > .button:hover,
.kmh-marketplace-portal .kmh-marketplace-overview-grid .kmh-card > .button:focus-visible {
    border-color: #176fa9;
    color: #176fa9;
}
.kmh-marketplace-portal .kmh-pill {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e7f0f8;
    color: #255376;
    font-size: 12px;
    font-weight: 800;
}
.kmh-marketplace-portal .kmh-pill.ready {
    background: #e5f6eb;
    color: #16643c;
}
.kmh-marketplace-portal .kmh-pill.draft {
    background: #fff1cb;
    color: #735200;
}
@media (max-width: 1050px) {
    .kmh-marketplace-portal .kmh-marketplace-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 600px) {
    .kmh-marketplace-portal .kmh-marketplace-overview-grid {
        grid-template-columns: 1fr;
    }
    .kmh-marketplace-portal .kmh-owner-card-heading {
        flex-direction: column;
    }
    .kmh-marketplace-portal .kmh-marketplace-overview-grid .kmh-card > .button {
        align-self: stretch;
    }
}
@media (max-width: 900px) {
    .kmh-portal-wrap.kmh-admin-wrap.kmh-marketplace-portal {
        width: calc(100vw - 16px) !important;
        max-width: none !important;
        margin-left: 8px !important;
        margin-right: 8px !important;
    }
}
@media (max-width: 600px) {
    .kmh-marketplace-portal .kmh-marketplace-context-select select { width: 100%; max-width: 100%; }
}
/* Purchase and renewal details remain within the shared sales card on narrow screens. */
.kmh-sales-terms {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dce5ec;
    min-width: 0;
    overflow-wrap: anywhere;
}
.kmh-sales-terms h3 { font-size: 1.1rem; }
.kmh-sales-terms summary { cursor: pointer; font-weight: 700; color: #125e91; padding: .65rem 0; }
.kmh-sales-terms summary:focus-visible { outline: 3px solid #173653; outline-offset: 3px; }
.kmh-sales-terms-form { display: grid; gap: .75rem; margin: .75rem 0; min-width: 0; }
.kmh-sales-terms-form label { display: grid; gap: .4rem; }
.kmh-sales-terms-form input { width: 100%; min-width: 0; box-sizing: border-box; }
.kmh-sales-terms-form button.kmh-marketplace-button {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
    background: #0b6eaa !important;
    color: #fff !important;
    border-color: #0b6eaa !important;
    min-height: 44px;
}
@media (max-width: 600px) {
    .kmh-sales-terms-form button.kmh-marketplace-button { width: 100%; }
}

/* Commercial Sales adverts keep their facts and current terms across the full card. */
.kmh-marketplace-commercial-row--advert.kmh-marketplace-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: .85rem; }
.kmh-marketplace-commercial-row--advert .kmh-marketplace-commercial-advert-detail { min-width: 0; overflow-wrap: anywhere; }
.kmh-marketplace-commercial-row--advert .kmh-marketplace-commercial-actions { flex: 1 1 auto; justify-content: flex-start; min-width: 0; }
.kmh-marketplace-commercial-row--advert .kmh-marketplace-commercial-actions > a.button { white-space: normal; text-align: center; }
.kmh-marketplace-commercial-row--advert .kmh-sales-terms { max-width: 100%; margin: .7rem 0 0; }
.kmh-marketplace-commercial-row--advert .kmh-sales-terms h3 { font-size: 1rem; }
.kmh-marketplace-commercial-row--advert .kmh-marketplace-moderation { flex: 1 1 100%; max-width: 35rem; }
.kmh-marketplace-commercial-row--advert .kmh-marketplace-moderation summary { cursor: pointer; font-weight: 700; }
.kmh-marketplace-commercial-row--advert .kmh-marketplace-moderation form { margin-top: .65rem; }
.kmh-marketplace-commercial-row--advert .kmh-marketplace-moderation label,
.kmh-marketplace-commercial-row--advert .kmh-marketplace-moderation input:not([type="hidden"]) { width: min(100%, 26rem); max-width: 100%; }
@media (max-width: 600px) {
    .kmh-marketplace-commercial-row--advert .kmh-marketplace-commercial-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
    .kmh-marketplace-commercial-row--advert .kmh-marketplace-commercial-actions > a.button { width: 100%; }
    .kmh-marketplace-commercial-row--advert .kmh-marketplace-moderation { min-width: 0; }
}

.kmh-marketplace-dashboard .kmh-marketplace-advert-explanation {
    padding: .55rem .7rem;
    border-left: 3px solid #2459a6;
    background: #f4f8fc;
    color: #173653;
    overflow-wrap: anywhere;
}

/* Shared Sales application coverage fields, in both create and saved-draft forms. */
.kmh-marketplace .kmh-sales-coverage-fields label.kmh-sales-park-choice {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: .35rem 1rem .75rem 0;
}
.kmh-marketplace .kmh-sales-coverage-fields .kmh-sales-park-choice input[type="checkbox"] {
    display: inline-block;
    flex: 0 0 auto;
    width: auto !important;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.kmh-marketplace .kmh-sales-coverage-fields textarea {
    height: 70px;
    min-height: 0 !important;
    line-height: 1.4;
    padding: .55rem .65rem;
    resize: vertical;
}
