:root {
    --proto-explorer-map-h: clamp(24rem, 52vh, 42rem);
    --proto-map-min: clamp(14rem, 40vh, 22rem);
    --proto-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Shared scoped ecosystem map explorer (landing + hub) */

.proto-explorer-panel {
    --proto-scope-accent: var(--color-primary-500, #4169E9);
    width: 100%;
    max-width: none;
}

.proto-explorer-body {
    display: flex;
    flex-direction: column;
    gap: clamp(0.85rem, 2vw, 1.1rem);
    width: 100%;
    max-width: none;
}

@media (min-width: 992px) {
    .proto-explorer-body {
        flex-direction: row;
        align-items: stretch;
        gap: clamp(0.5rem, 1vw, 0.85rem);
    }
}

.proto-explorer-nav {
    min-width: 0;
}

@media (min-width: 992px) {
    .proto-explorer-nav {
        flex: 0 0 13rem;
        width: 13rem;
        padding-top: 0.35rem;
    }
}

/* Opened scope container: copy left, map right */
.proto-explorer-stage {
    --proto-scope-accent: var(--color-primary-500, #4169E9);
    flex: 1 1 0%;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-radius: 1.1rem;
    border: 2px solid color-mix(in srgb, var(--proto-scope-accent) 28%, #e8ecf7);
    background: #fff;
    box-shadow:
        0 4px 6px rgba(17, 32, 77, 0.04),
        0 20px 48px rgba(17, 32, 77, 0.08);
    overflow: hidden;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.proto-explorer-stage--pulse {
    animation: proto-stage-scope-pulse 0.55s var(--proto-ease);
}

@keyframes proto-stage-scope-pulse {
    0% {
        box-shadow:
            0 4px 6px rgba(17, 32, 77, 0.04),
            0 20px 48px rgba(17, 32, 77, 0.08),
            inset 0 0 0 0 color-mix(in srgb, var(--proto-scope-accent) 0%, transparent);
    }

    35% {
        box-shadow:
            0 4px 6px rgba(17, 32, 77, 0.04),
            0 20px 48px rgba(17, 32, 77, 0.08),
            inset 0 0 0 3px color-mix(in srgb, var(--proto-scope-accent) 40%, transparent);
    }

    100% {
        box-shadow:
            0 4px 6px rgba(17, 32, 77, 0.04),
            0 20px 48px rgba(17, 32, 77, 0.08);
    }
}

.proto-explorer-stage__split {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
}

@media (min-width: 992px) {
    .proto-explorer-stage__split {
        display: grid;
        grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
        grid-template-rows: 1fr;
        align-items: stretch;
        min-height: var(--proto-explorer-map-h);
    }
}

.proto-explorer-aside {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

@media (min-width: 992px) {
    .proto-explorer-aside {
        border-right: 1px solid rgba(65, 105, 233, 0.1);
    }
}

.proto-explorer-copy {
    min-width: 0;
    padding: clamp(1rem, 2vw, 1.25rem);
    flex: 0 0 auto;
}

.proto-explorer-aside .proto-scope-stats {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.65rem clamp(1rem, 2vw, 1.25rem);
    border-top: 1px solid var(--color-neutral-200, #eee);
}

.proto-explorer-cta {
    flex: 0 0 auto;
    padding: 0.85rem clamp(1rem, 2vw, 1.25rem) clamp(1rem, 2vw, 1.15rem);
    border-top: 1px solid rgba(65, 105, 233, 0.1);
    background: linear-gradient(180deg, rgba(248, 250, 255, 0.35) 0%, #fff 100%);
}

.proto-explorer-map-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

@media (min-width: 992px) {
    .proto-explorer-map-col {
        height: 100%;
    }
}

.proto-explorer-map-stage {
    flex: 1 1 auto;
    min-height: clamp(16rem, 40vh, 22rem);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

@media (min-width: 992px) {
    .proto-explorer-map-stage {
        min-height: 0;
        height: 100%;
    }

    .proto-explorer-map-stage .proto-scope-map-shell {
        flex: 1 1 auto;
        min-height: 0;
        height: 100%;
        border: 0;
        border-radius: 0;
    }
}

.proto-landing-explorer__intro h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.45rem;
}

.proto-landing-explorer__intro-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--proto-audience-accent, var(--color-primary-600, #2f55cf));
}

.proto-landing-explorer__intro p,
.proto-landing-explorer__intro-body {
    color: var(--color-text-secondary, #616161);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.proto-landing-explorer__intro--linked {
    animation: proto-explorer-intro-linked 0.75s var(--proto-ease);
}

@keyframes proto-explorer-intro-linked {
    0% {
        box-shadow: inset 0 0 0 0 color-mix(in srgb, var(--proto-audience-accent, #4169E9) 0%, transparent);
    }

    40% {
        box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--proto-audience-accent, #4169E9) 35%, transparent);
    }

    100% {
        box-shadow: inset 0 0 0 0 transparent;
    }
}

@media (min-width: 992px) {
    .proto-landing-explorer__intro {
        margin-bottom: 0.25rem;
        max-width: none;
    }
}

.proto-landing-explorer__intro {
    border-radius: 0.75rem;
    padding: 0.35rem 0.25rem;
    margin-inline: -0.25rem;
}

/* Scope nav */
.proto-scope-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (max-width: 991.98px) {
    .proto-scope-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.35rem;
        padding-inline: 0;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
}

.proto-scope-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 1.1rem;
    text-align: left;
    border: 2px solid rgba(65, 105, 233, 0.12);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease, background 0.2s ease;
    scroll-snap-align: start;
    --proto-scope-accent: var(--color-primary-500, #4169E9);
}

/* ~90% card + ~10% peek of next — makes horizontal scroll discoverable */
@media (max-width: 991.98px) {
    .proto-scope-card {
        flex: 0 0 90%;
        width: 90%;
        min-width: 90%;
        max-width: 90%;
    }
}

.proto-scope-card:hover {
    border-color: var(--color-primary-300, #8fa6f6);
    background: #fff;
}

.proto-scope-card.is-active {
    border-color: var(--proto-scope-accent);
    background: linear-gradient(90deg,
            color-mix(in srgb, var(--proto-scope-accent) 12%, #fff) 0%,
            #fff 55%);
    box-shadow:
        0 10px 32px color-mix(in srgb, var(--proto-scope-accent) 22%, transparent),
        inset 4px 0 0 var(--proto-scope-accent);
    transform: translateY(-1px);
}

.proto-scope-card.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65rem;
    bottom: 0.65rem;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--proto-scope-accent);
}

@media (min-width: 992px) {
    .proto-scope-card.is-active::after {
        content: "";
        position: absolute;
        right: -0.65rem;
        top: 50%;
        width: 0.65rem;
        height: 3px;
        border-radius: 999px;
        background: var(--proto-scope-accent);
        transform: translateY(-50%);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--proto-scope-accent) 25%, transparent);
        z-index: 1;
    }

    .proto-explorer-nav .proto-scope-card {
        width: 100%;
    }
}

.proto-scope-card__icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    font-size: 1.15rem;
    background: var(--color-neutral-100, #f5f5f5);
    color: var(--color-primary-600, #2f55cf);
}

.proto-scope-card.is-active .proto-scope-card__icon {
    background: var(--proto-scope-accent);
    color: #fff;
}

.proto-scope-card > span:not(.proto-scope-card__icon) {
    flex: 1 1 0;
    min-width: 0;
}

.proto-scope-card__label {
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.25;
    overflow-wrap: break-word;
    hyphens: auto;
}

.proto-scope-card__hint {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: var(--color-text-secondary, #757575);
    line-height: 1.35;
}

/* Explorer panel + map */
.proto-scope-panel {
    width: 100%;
}

.proto-explorer-panel.proto-scope-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.proto-scope-panel__mission {
    min-width: 0;
    padding: 0;
    margin-bottom: 0;
}

.proto-scope-panel__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--proto-scope-accent, var(--color-primary-600, #2f55cf));
}

@media (min-width: 992px) {
    .proto-scope-panel {
        padding: 0;
    }
}

.proto-scope-panel__title {
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.proto-scope-panel__body {
    font-size: 0.9875rem;
    line-height: 1.6;
    color: var(--color-text-secondary, #616161);
    margin: 0 0 0.65rem;
}

.proto-scope-panel__placeholder {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--color-text-secondary, #616161);
    margin: 0;
    padding: 0.7rem 0.85rem;
    border-radius: 0.65rem;
    background: var(--color-neutral-50, #fafafa);
    border-left: 3px solid var(--proto-scope-accent, var(--color-primary-500, #4169E9));
}

.proto-scope-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin: 0;
    padding: 0.65rem 0 0;
    border-top: 1px solid var(--color-neutral-200, #eee);
}

.proto-scope-panel__cta {
    margin-top: 0;
    padding-top: 0;
}

.proto-scope-stat {
    min-width: 5.5rem;
}

.proto-scope-stat--line {
    min-width: 0;
    flex: 1 1 100%;
}

.proto-scope-stat__line {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-primary-800, #1e3a8a);
}

.proto-scope-stat__value {
    display: block;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 800;
    line-height: 1.05;
    color: var(--color-primary-700, #2543a3);
    font-variant-numeric: tabular-nums;
}

.proto-scope-stat__label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-secondary, #757575);
    margin-top: 0.2rem;
}

.proto-scope-map-shell {
    position: relative;
    min-height: var(--proto-map-min);
    border-radius: 0.9rem;
    overflow: hidden;
    border: 2px solid color-mix(in srgb, var(--proto-scope-accent, #4169E9) 35%, #eef2f7);
    background: var(--color-neutral-100, #eef2f7);
    --proto-scope-accent: var(--color-primary-500, #4169E9);
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.proto-scope-map-shell--pulse {
    animation: proto-map-scope-pulse 0.55s var(--proto-ease);
}

@keyframes proto-map-scope-pulse {
    0% {
        box-shadow: inset 0 0 0 0 color-mix(in srgb, var(--proto-scope-accent) 0%, transparent);
    }

    35% {
        box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--proto-scope-accent) 45%, transparent);
    }

    100% {
        box-shadow: inset 0 0 0 0 transparent;
    }
}

/* Active scope chip on map (above Leaflet controls, clear of zoom top-left) */
.proto-map-scope-chip {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    left: auto;
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    max-width: calc(100% - 1.7rem);
    padding: 0.5rem 0.85rem 0.5rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 2px solid var(--proto-scope-accent, #4169E9);
    box-shadow: 0 8px 28px rgba(17, 32, 77, 0.14);
    pointer-events: none;
    --proto-scope-accent: var(--color-primary-500, #4169E9);
}

.proto-map-scope-chip__icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--proto-scope-accent);
    color: #fff;
    font-size: 0.95rem;
}

.proto-map-scope-chip__text {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
}

.proto-map-scope-chip__label {
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--color-text-primary, #212529);
}

.proto-map-scope-chip__count {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--proto-scope-accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proto-scope-map {
    width: 100%;
    height: 100%;
    min-height: var(--proto-map-min);
}

.proto-explorer-map-stage .proto-scope-map {
    min-height: 0;
}

.proto-scope-map-empty {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 0.65rem;
    padding: 0.65rem 0.9rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(17, 32, 77, 0.1);
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(17, 32, 77, 0.1);
    z-index: 500;
    pointer-events: none;
}

.proto-scope-map-empty.is-visible {
    display: flex;
}

.proto-scope-map-empty p {
    margin: 0;
    color: var(--color-text-secondary, #6c757d);
    font-size: 0.875rem;
    line-height: 1.35;
}

.proto-scope-map-empty > i {
    flex-shrink: 0;
    font-size: 1.15rem;
    opacity: 0.85;
}

/* Materials market scope — categories left, detail right */
@media (min-width: 992px) {
    .proto-explorer-stage--materials .proto-explorer-stage__split {
        grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr);
    }
}

.proto-explorer-stage--materials .proto-explorer-aside {
    min-height: clamp(20rem, 48vh, 36rem);
}

.proto-explorer-stage--materials .proto-explorer-map-col {
    min-height: clamp(20rem, 48vh, 36rem);
}

.proto-explorer-materials-categories,
.proto-explorer-materials-detail {
    width: 100%;
    min-height: 0;
}

.proto-explorer-materials-categories[hidden],
.proto-explorer-materials-detail[hidden] {
    display: none !important;
}

.proto-explorer-materials-categories {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0.75rem;
}

.proto-explorer-materials-detail {
    height: 100%;
    min-height: clamp(18rem, 44vh, 34rem);
}

.proto-scope-map-shell[hidden] {
    display: none !important;
}

.eco-mm-categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.eco-mm-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.eco-mm-search-icon {
    color: var(--color-text-secondary, #6c757d);
    flex-shrink: 0;
}

.eco-mm-legend-available,
.eco-mm-stat-supply,
.eco-mm-line-supply {
    color: #198754;
    font-weight: 600;
}

.eco-mm-stat-demand,
.eco-mm-line-demand {
    color: #b45309;
    font-weight: 600;
}

.eco-mm-panel__grid {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding-right: 0.15rem;
}

.eco-mm-detail {
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.eco-mm-offerings {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

.eco-mm-category {
    border: 1px solid var(--surface-card-border, rgba(65, 105, 233, 0.18));
    background: var(--color-bg-secondary, #fff);
    overflow: hidden;
}

.eco-mm-category--has-supply {
    border-left: 4px solid #198754;
}

.eco-mm-category-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 600;
}

.eco-mm-category-summary::-webkit-details-marker {
    display: none;
}

.eco-mm-category[open] .eco-mm-category-chevron {
    transform: rotate(180deg);
}

.eco-mm-category-chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
    color: var(--color-text-secondary, #6c757d);
}

.eco-mm-category-icon {
    font-size: 1.25rem;
    color: var(--color-primary-500, #415fe9);
    width: 2rem;
    text-align: center;
}

.eco-mm-category--has-supply .eco-mm-category-icon {
    color: #198754;
}

.eco-mm-category-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.eco-mm-category-body {
    padding: 0 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border-top: 1px solid var(--color-border, #e9ecef);
    padding-top: 0.6rem;
}

.eco-mm-hit-card {
    border: 1px solid var(--color-border, #e9ecef);
    border-radius: var(--radius-md, 0.5rem);
    padding: 0.55rem 0.7rem;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    background: var(--color-bg-primary, #fff);
}

.eco-mm-material--selectable.eco-mm-material--has-supply {
    border-left: 3px solid #198754;
    background: rgba(25, 135, 84, 0.06);
}

.eco-mm-material--selectable.eco-mm-material--demand-only {
    border-left: 3px solid #b45309;
    background: rgba(180, 83, 9, 0.06);
}

.eco-mm-material--unavailable {
    border: 1px dashed #ced4da;
    background: #f8f9fa;
    cursor: default;
    opacity: 0.92;
}

.eco-mm-material-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.eco-mm-material--selectable.is-selected {
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.25);
}

.eco-mm-offering {
    display: block;
    text-decoration: none;
    color: inherit;
}

.eco-mm-offering--demand {
    border-left: 3px solid rgba(180, 83, 9, 0.45);
}

.eco-mm-offering-title {
    font-weight: 600;
    font-size: 0.85rem;
}

.eco-mm-disclaimer {
    max-width: 52rem;
}

/* Logged-in catalog / supplier / beacon lists in explorer aside */
.proto-explorer-catalog-mount[hidden],
.proto-explorer-supplier-list-mount[hidden],
.proto-explorer-beacon-list-mount[hidden] {
    display: none !important;
}

.proto-explorer-copy[hidden] {
    display: none !important;
}

.proto-explorer-aside .eco-catalog-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

.proto-explorer-aside .eco-catalog-panel__search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.proto-explorer-aside .eco-catalog-panel__search .bi {
    color: var(--color-text-secondary, #6c757d);
    flex-shrink: 0;
}

.proto-explorer-aside .eco-catalog-panel__list {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: min(42vh, 22rem);
    min-height: 8rem;
}

.proto-explorer-aside .eco-catalog-panel .list-card-inner {
    gap: 0.5rem;
}

.proto-explorer-aside .eco-catalog-panel a.list-card,
.proto-explorer-aside .eco-catalog-panel a.product-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.proto-explorer-aside .eco-catalog-panel .list-card-image {
    width: 56px;
    height: 56px;
}

.proto-explorer-aside .eco-catalog-panel .list-card-title {
    font-size: 0.85rem;
}

.proto-explorer-aside .eco-catalog-auction-badge {
    font-size: 0.62rem;
    font-weight: 700;
    flex-shrink: 0;
}

.proto-explorer-aside .eco-catalog-panel__pager {
    display: flex;
    align-items: center;
    justify-content: center;
}

.proto-explorer-aside .eco-aside-list-badge {
    font-size: 0.62rem;
    font-weight: 700;
    flex-shrink: 0;
}

.proto-explorer-aside .eco-aside-list-row {
    cursor: pointer;
}

/* Guest / landing materials — copy left, flat categories right */
.proto-explorer-materials-guest[hidden] {
    display: none !important;
}

.proto-explorer-materials-guest {
    width: 100%;
    min-height: clamp(18rem, 44vh, 34rem);
    overflow-y: auto;
}

.eco-mm-guest {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.15rem 0.25rem;
}

.eco-mm-guest-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
}

@media (min-width: 576px) {
    .eco-mm-guest-categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.eco-mm-guest-cat {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--surface-card-border, rgba(65, 105, 233, 0.18));
}

.eco-mm-guest-cat--has-supply {
    border-left: 3px solid #198754;
}

.eco-mm-guest-cat__icon {
    font-size: 1.2rem;
    color: var(--color-primary-500, #415fe9);
    flex-shrink: 0;
}

.eco-mm-guest-cat--has-supply .eco-mm-guest-cat__icon {
    color: #198754;
}

.eco-mm-guest-cat__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.eco-mm-guest-cat__title {
    font-weight: 600;
    font-size: 0.9rem;
}

#prototype-hub .hub-ecosystem-explorer {
    /* Match landing-scale room; do not hard-cap at 480px */
    --proto-explorer-map-h: clamp(28rem, 70vh, 48rem);
    --proto-map-min: clamp(16rem, 42vh, 24rem);
}

#prototype-hub .hub-ecosystem-viewer,
#prototype-hub .hub-ecosystem-explorer-mount,
#prototype-hub .hub-ecosystem-viewer .hub-ecosystem-explorer {
    width: 100%;
    min-height: 0;
}

#prototype-hub .hub-ecosystem-viewer .proto-explorer-map-stage,
#prototype-hub .hub-ecosystem-viewer .proto-scope-map-shell,
#prototype-hub .hub-ecosystem-viewer .proto-scope-map {
    min-height: var(--proto-map-min);
}

/* Desktop: stage at least map-h; grow with scope aside so map fills the same height */
@media (min-width: 992px) {
    #prototype-hub .hub-ecosystem-viewer .hub-ecosystem-explorer {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        align-items: stretch;
    }

    #prototype-hub .hub-ecosystem-viewer .proto-explorer-body {
        display: flex;
        flex-direction: row;
        flex: 1 1 auto;
        min-height: 0;
        align-items: stretch;
    }

    #prototype-hub .hub-ecosystem-viewer .proto-explorer-stage {
        flex: 1 1 auto;
        min-height: var(--proto-explorer-map-h);
        height: auto;
        display: flex;
        flex-direction: column;
    }

    #prototype-hub .hub-ecosystem-viewer .proto-explorer-stage__split {
        flex: 1 1 auto;
        min-height: var(--proto-explorer-map-h);
        height: auto;
        align-items: stretch;
    }

    #prototype-hub .hub-ecosystem-viewer .proto-explorer-map-col,
    #prototype-hub .hub-ecosystem-viewer .proto-explorer-map-stage,
    #prototype-hub .hub-ecosystem-viewer .proto-scope-map-shell {
        min-height: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
    }

    #prototype-hub .hub-ecosystem-viewer .proto-explorer-aside {
        min-height: 0;
        height: auto;
        align-self: stretch;
        display: flex;
        flex-direction: column;
    }

    /*
     * Copy + stats must stay content-sized. Giving aside-body flex-grow left a
     * tall white gap and shoved catalog/list mounts to the bottom.
     */
    #prototype-hub .hub-ecosystem-viewer .proto-explorer-aside-body {
        flex: 0 0 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    #prototype-hub .hub-ecosystem-viewer .proto-explorer-copy,
    #prototype-hub .hub-ecosystem-viewer .proto-scope-stats {
        flex: 0 0 auto;
    }

    /* Element lists grow downward into the remaining aside height */
    #prototype-hub .hub-ecosystem-viewer .proto-explorer-catalog-mount:not([hidden]),
    #prototype-hub .hub-ecosystem-viewer .proto-explorer-supplier-list-mount:not([hidden]),
    #prototype-hub .hub-ecosystem-viewer .proto-explorer-beacon-list-mount:not([hidden]),
    #prototype-hub .hub-ecosystem-viewer .proto-explorer-materials-categories:not([hidden]),
    #prototype-hub .hub-ecosystem-viewer .proto-explorer-auctions-list:not([hidden]) {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 0.65rem clamp(1rem, 2vw, 1.25rem) clamp(1rem, 2vw, 1.15rem);
        border-top: 1px solid var(--color-neutral-200, #eee);
    }

    #prototype-hub .hub-ecosystem-viewer .proto-explorer-aside .eco-catalog-panel,
    #prototype-hub .hub-ecosystem-viewer .proto-explorer-aside .eco-aside-list-panel {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    #prototype-hub .hub-ecosystem-viewer .proto-explorer-aside .eco-catalog-panel__list {
        flex: 1 1 auto;
        min-height: 8rem;
        max-height: none;
        overflow-y: auto;
    }

    #prototype-hub .hub-ecosystem-viewer .proto-scope-map {
        flex: 1 1 auto;
        min-height: 0 !important;
        height: 100% !important;
        width: 100%;
    }
}

/* Phone: keep a concrete height so Leaflet can init in stacked layout */
@media (max-width: 991.98px) {
    #prototype-hub .hub-ecosystem-viewer .proto-scope-map {
        height: var(--proto-map-min);
    }
}

/* Narrow / short viewports (phone + DevTools device mode) */
@media (max-width: 575.98px) {
    :root {
        --proto-explorer-map-h: min(42vh, 18rem);
        --proto-map-min: min(32vh, 12rem);
    }

    .proto-explorer-map-stage {
        min-height: min(36vh, 14rem);
    }

    .proto-scope-map-shell {
        min-height: min(32vh, 12rem);
    }

    .proto-explorer-stage--auctions .proto-explorer-aside,
    .proto-explorer-stage--auctions .proto-explorer-map-col {
        min-height: min(40vh, 16rem);
    }

    .proto-map-scope-chip {
        top: 0.5rem;
        right: 0.5rem;
        max-width: calc(100% - 3.5rem);
        padding: 0.35rem 0.55rem 0.35rem 0.35rem;
        gap: 0.4rem;
    }
}

@media (max-height: 520px) {
    :root {
        --proto-explorer-map-h: min(48vh, 14rem);
        --proto-map-min: min(40vh, 10rem);
    }

    .proto-explorer-map-stage {
        min-height: min(44vh, 11rem);
    }

    .proto-scope-map-shell {
        min-height: min(40vh, 10rem);
    }
}

/* Auctions scope — list left, detail right */
@media (min-width: 992px) {
    .proto-explorer-stage--auctions .proto-explorer-stage__split {
        grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr);
    }
}

.proto-explorer-stage--auctions .proto-explorer-aside,
.proto-explorer-stage--auctions .proto-explorer-map-col {
    min-height: clamp(20rem, 48vh, 36rem);
}

.proto-explorer-auctions-list,
.proto-explorer-auctions-detail {
    width: 100%;
    min-height: 0;
}

.proto-explorer-auctions-list[hidden],
.proto-explorer-auctions-detail[hidden] {
    display: none !important;
}

.proto-explorer-auctions-list {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0.75rem;
}

.proto-explorer-auctions-detail {
    height: 100%;
    min-height: clamp(18rem, 44vh, 34rem);
    overflow-y: auto;
}

.proto-explorer-auctions-detail .eco-auctions-detail-panel {
    min-height: 0;
}

.proto-explorer-aside .proto-explorer-auctions-list.cards-panel,
.proto-explorer-aside .proto-explorer-auctions-list .cards-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

.proto-explorer-aside .proto-explorer-auctions-list .eco-catalog-panel__list {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: min(42vh, 22rem);
    min-height: 8rem;
}

.proto-explorer-aside .proto-explorer-auctions-list .list-card-inner {
    gap: 0.5rem;
}

.proto-explorer-aside .proto-explorer-auctions-list .list-card-image {
    width: 56px;
    height: 56px;
}

.proto-explorer-aside .proto-explorer-auctions-list .list-card-title {
    font-size: 0.85rem;
}

.proto-explorer-stage--auctions .dashboard-auction-reserve-notice {
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.35);
    border-radius: 0.75rem;
}

.proto-explorer-stage--auctions .detail-content .dashboard-auction-detail-hero {
    margin: 0;
}

.proto-explorer-stage--auctions .detail-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    margin: auto;
    border: 1px dashed rgba(0, 0, 0, 0.12);
    border-radius: 1rem;
    max-width: 22rem;
}

.eco-auction-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
    min-width: 280px;
    max-width: min(420px, calc(100vw - 2rem));
    padding: 0.75rem 2.25rem 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    font-size: 0.9rem;
    line-height: 1.35;
}

.eco-auction-toast--success { background: #d1e7dd; color: #0f5132; border: 1px solid #badbcc; }
.eco-auction-toast--danger { background: #f8d7da; color: #842029; border: 1px solid #f5c2c7; }
.eco-auction-toast--warning { background: #fff3cd; color: #664d03; border: 1px solid #ffecb5; }
.eco-auction-toast--info { background: #cff4fc; color: #055160; border: 1px solid #b6effb; }

.eco-auction-toast__close {
    position: absolute;
    top: 0.35rem;
    right: 0.5rem;
    border: 0;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.65;
}

.eco-auction-toast__close:hover { opacity: 1; }

#prototype-hub .hub-ecosystem-viewer .hub-ecosystem-explorer {
    width: 100%;
}

/* —— Mobile shell: scope peek, map-first, Karta|Lista, collapse copy —— */
.proto-explorer-mobile-view-toggle {
    display: none;
}

.proto-explorer-aside-toggle {
    display: none;
}

@media (max-width: 991.98px) {
    .proto-explorer-mobile-view-toggle {
        display: inline-flex;
        align-self: stretch;
        width: 100%;
        padding: 0.2rem;
        gap: 0.2rem;
        border-radius: 0.75rem;
        background: rgba(65, 105, 233, 0.08);
        border: 1px solid rgba(65, 105, 233, 0.14);
    }

    .proto-explorer-mobile-view-toggle__btn {
        flex: 1 1 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
        margin: 0;
        padding: 0.55rem 0.75rem;
        border: 0;
        border-radius: 0.6rem;
        background: transparent;
        color: var(--color-neutral-700, #444);
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    }

    .proto-explorer-mobile-view-toggle__btn.is-active {
        background: #fff;
        color: var(--color-primary-600, #3558d4);
        box-shadow: 0 1px 4px rgba(17, 32, 77, 0.1);
    }

    .proto-explorer-aside-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        width: 100%;
        margin: 0;
        padding: 0.75rem 1rem;
        border: 0;
        border-bottom: 1px solid rgba(65, 105, 233, 0.1);
        background: rgba(65, 105, 233, 0.04);
        text-align: left;
        cursor: pointer;
        color: inherit;
    }

    .proto-explorer-aside-toggle__label {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
        min-width: 0;
    }

    .proto-explorer-aside-toggle__eyebrow {
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--proto-scope-accent, var(--color-primary-500, #4169E9));
    }

    .proto-explorer-aside-toggle__hint {
        font-size: 0.78rem;
        color: var(--color-neutral-600, #666);
    }

    .proto-explorer-aside-toggle__chevron {
        flex-shrink: 0;
        transition: transform 0.2s var(--proto-ease, ease);
    }

    .proto-explorer-aside.is-aside-open .proto-explorer-aside-toggle__chevron {
        transform: rotate(180deg);
    }

    .proto-explorer-aside-body {
        display: none;
    }

    .proto-explorer-aside.is-aside-open .proto-explorer-aside-body {
        display: block;
    }

    .proto-explorer-stage__split {
        display: flex;
        flex-direction: column;
    }

    /* Map-first in kartläge */
    .proto-explorer-panel[data-eco-mobile-view="map"] .proto-explorer-map-col {
        order: -1;
    }

    .proto-explorer-panel[data-eco-mobile-view="map"] .proto-explorer-map-col {
        min-height: max(var(--proto-map-min), 42vh);
    }

    .proto-explorer-panel[data-eco-mobile-view="map"] .proto-scope-map,
    .proto-explorer-panel[data-eco-mobile-view="map"] .proto-scope-map-shell,
    .proto-explorer-panel[data-eco-mobile-view="map"] .proto-explorer-map-stage {
        min-height: max(var(--proto-map-min), 42vh);
        height: max(var(--proto-map-min), 42vh);
    }

    /* Lista: hide map, force aside content open */
    .proto-explorer-panel[data-eco-mobile-view="list"] .proto-explorer-map-col {
        display: none !important;
    }

    /* Materials / auktioner: list + detail need both columns when in Lista */
    .proto-explorer-panel[data-eco-mobile-view="list"] .proto-explorer-stage--materials .proto-explorer-map-col,
    .proto-explorer-panel[data-eco-mobile-view="list"] .proto-explorer-stage--auctions .proto-explorer-map-col {
        display: block !important;
        order: 1;
        min-height: auto;
        height: auto;
    }

    .proto-explorer-panel[data-eco-mobile-view="list"] .proto-explorer-aside-toggle {
        display: none;
    }

    .proto-explorer-panel[data-eco-mobile-view="list"] .proto-explorer-aside-body {
        display: block;
    }

    /* Kartläge: list mounts stay in Lista */
    .proto-explorer-panel[data-eco-mobile-view="map"] .proto-explorer-catalog-mount,
    .proto-explorer-panel[data-eco-mobile-view="map"] .proto-explorer-supplier-list-mount,
    .proto-explorer-panel[data-eco-mobile-view="map"] .proto-explorer-beacon-list-mount,
    .proto-explorer-panel[data-eco-mobile-view="map"] .proto-explorer-auctions-list,
    .proto-explorer-panel[data-eco-mobile-view="map"] .proto-explorer-materials-categories {
        display: none !important;
    }

    /* Map overlay chip (scope name + count) — desktop only */
    .proto-map-scope-chip {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .proto-explorer-mobile-view-toggle {
        display: none !important;
    }

    .proto-explorer-aside-toggle {
        display: none !important;
    }

    .proto-explorer-aside-body {
        display: block !important;
    }
}

