/* Exact legend design from integration/analysis-legend-development-ui
 * (8b515d167). The final Explorer-host block only places the original footer
 * module over the Explorer canvas. */
.analysis-feature-legend {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(25, 61, 102, 0.18);
    border-radius: 0.65rem;
    box-shadow: 0 0.5rem 1.5rem rgba(11, 39, 87, 0.12);
    box-sizing: border-box;
    color: #102c59;
    max-height: min(56vh, 36rem);
    overflow: auto;
}

.analysis-feature-legend__header {
    align-items: center;
    background: #102c59;
    color: #fff;
    cursor: pointer;
    display: flex;
    gap: 0.45rem;
    min-height: 2.35rem;
    padding: 0.4rem 0.55rem;
    position: sticky;
    top: 0;
    z-index: 2;
}

.analysis-feature-legend__header:focus-visible {
    outline: 0.2rem solid #d4146b;
    outline-offset: -0.2rem;
}

.analysis-feature-legend__icon {
    color: #9de7f7;
    font-style: normal;
}

.analysis-feature-legend__title {
    font-weight: 700;
}

.analysis-feature-legend__count {
    color: #c6edff;
    font-size: 0.72rem;
    white-space: nowrap;
}

.analysis-feature-legend__reset {
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    border-radius: 0.35rem;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    margin-left: auto;
    padding: 0.28rem 0.45rem;
}

.analysis-feature-legend__library {
    width: 1.42rem;
    height: 1.42rem;
    margin-left: auto;
    border: 1px solid rgba(157, 231, 247, 0.6);
    border-radius: 0.38rem;
    background: rgba(157, 231, 247, 0.16);
    color: #fff;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
}

.analysis-feature-legend__library:hover {
    background: #d4146b;
    border-color: #d4146b;
}

.analysis-feature-legend__reset:hover {
    background: #d4146b;
}

.analysis-feature-legend__arrow {
    font-size: 1.15rem;
    line-height: 1;
    margin-left: auto;
}

.analysis-feature-legend__reset:not([hidden]) + .analysis-feature-legend__arrow {
    margin-left: 0;
}

.analysis-feature-legend__library + .analysis-feature-legend__reset:not([hidden]) {
    margin-left: 0.15rem;
}

.analysis-feature-legend__library ~ .analysis-feature-legend__arrow {
    margin-left: 0.3rem;
}

.analysis-feature-legend .chartHeadlineLegend {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    align-items: center;
    column-gap: 0.4rem;
    width: 100%;
    min-height: 2.2rem;
    padding: 0.18rem 0.45rem;
    border-radius: 0.35rem;
    box-sizing: border-box;
    text-align: left;
    transition: background-color 120ms ease, opacity 120ms ease;
}

.analysis-feature-legend .chartHeadlineContent2nd {
    width: 100%;
    margin: 0;
    padding: 0.25rem 0.4rem 0.35rem;
    box-sizing: border-box;
    font-size: 0.92rem;
    line-height: 1.2;
    white-space: normal;
}

.analysis-feature-legend .chartHeadlineContent2nd table {
    width: 100%;
    border-collapse: collapse;
}

.analysis-feature-legend .chartHeadlineContent2nd tbody {
    display: grid;
    gap: 0.12rem;
}

.analysis-feature-legend .chartHeadlineLegend .leftTD {
    display: grid;
    place-items: center;
    width: 2rem;
    min-width: 0;
    padding: 0;
}

.analysis-feature-legend .chartHeadlineLegend .leftTD2 {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    justify-self: start;
    text-align: left !important;
}

.analysis-feature-legend .chartHeadlineLegendImg {
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    padding: 0;
    border-radius: 0.4rem;
    background: rgba(157, 231, 247, 0.22);
    font-size: 1rem;
}

.analysis-feature-legend .leftTD2Settings {
    margin-left: 0.45rem;
}

.chartHeadlineLegendInfoBoxToggle {
    margin-left: 0.45em;
    padding: 0.2em;
    border: 0;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    opacity: 0.9;
}

.chartHeadlineLegendInfoBoxToggle.deactive {
    opacity: 0.3;
}

.chartHeadlineLegendInfoBoxMaster td {
    padding: 0.2rem 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.chartHeadlineLegendInfoBoxMasterButton {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    width: 100%;
    padding: 0.35em 0.5em;
    border: 1px solid rgba(157, 231, 247, 0.45);
    border-radius: 0.4rem;
    background: rgba(157, 231, 247, 0.18);
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.chartHeadlineLegendInfoBoxMasterButton.deactive {
    opacity: 0.48;
}

.chartHeadlineLegendInfoBoxSizeButton {
    flex: 0 0 auto;
    padding: 0.35em;
    border: 1px solid rgba(157, 231, 247, 0.45);
    border-radius: 0.4rem;
    background: rgba(157, 231, 247, 0.18);
    color: inherit;
    cursor: pointer;
}

.analysis-feature-legend .chartHeadlineLegend:hover {
    background: rgba(157, 231, 247, 0.25);
}

.analysis-feature-legend .chartHeadlineLegend.deactiveLegend {
    opacity: 0.46;
}

.analysis-feature-legend--collapsed {
    max-height: none;
    min-width: 0;
    overflow: hidden;
}

.analysis-feature-legend--collapsed > :not(.analysis-feature-legend__header) {
    display: none !important;
}

.analysis-feature-legend--collapsed .analysis-feature-legend__header {
    border-radius: 0.55rem;
    position: static;
}

.analysis-feature-legend--collapsed .analysis-feature-legend__count,
.analysis-feature-legend--collapsed .analysis-feature-legend__reset {
    display: none;
}

.analysis-feature-legend__companion--collapsed {
    display: none !important;
}

/* Keep the original holder in the foreground for the graph toolbar. The
 * actual legend footer is moved into the Explorer-owned host below. */
.fluFooterInfo_div_holder.analysis-feature-legend-host--explorer {
    position: fixed !important;
    z-index: 2147482000 !important;
    opacity: 1 !important;
    pointer-events: none;
}

.analysis-feature-legend-host--explorer > .fluFooterInfo_div {
    display: none !important;
}

.analysis-feature-legend-explorer-host {
    position: fixed;
    z-index: 2147482200;
    right: auto;
    bottom: clamp(0.7rem, 1.5vh, 1.1rem);
    left: calc(10% + clamp(0.65rem, 1vw, 1.15rem));
    display: grid;
    align-items: end;
    gap: 0.28rem 0.45rem;
    grid-template-columns: auto minmax(0, auto);
    grid-template-rows: auto auto;
    width: auto;
    max-width: calc(90vw - clamp(1.3rem, 2vw, 2.3rem));
    pointer-events: none;
}

.analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--has-complexity {
    grid-template-columns: clamp(9.5rem, 11vw, 12rem) auto minmax(0, auto);
}

.analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--has-complexity .analysis-feature-legend,
.analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--has-complexity .analysis-feature-legend__reference-actions,
.analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--has-complexity .analysis-feature-legend__external-add-metric {
    grid-column: 2;
}

.analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--has-complexity > #SkalaDivHolder.analysis-feature-legend__scales {
    grid-column: 3;
}

.analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--hidden {
    display: none !important;
    pointer-events: none !important;
}

.analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--collapsed {
    grid-template-columns: auto;
    max-width: max-content;
}

.analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--collapsed > :not(.analysis-feature-legend) {
    display: none !important;
}

.analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--collapsed .analysis-feature-legend {
    grid-column: 1;
}

#analysis-reference-line-control {
    /* Fallback until the Explorer legend has been mounted. The scoped rule
       below changes this to a normal legend action immediately afterwards. */
    position: fixed;
    left: 50%;
    z-index: 8500;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.5rem 0.78rem;
    border: 1px solid rgba(84, 168, 70, 0.55);
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 0.45rem 1.25rem rgba(7, 24, 60, 0.16);
    color: #367c2d;
    cursor: pointer;
    font: 700 0.76rem/1 Ubuntu, sans-serif;
    transform: translateX(-50%);
}

#analysis-reference-line-control:hover,
#analysis-reference-line-control:focus-visible {
    background: #54a846;
    color: #fff;
    outline: none;
}

#analysis-reference-line-control[hidden] {
    display: none !important;
}

#analysis-distance-export-control {
    position: fixed;
    left: 50%;
    z-index: 8500;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.5rem 0.78rem;
    border: 1px solid rgba(36, 86, 149, 0.28);
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 0.45rem 1.25rem rgba(7, 24, 60, 0.16);
    color: #173f75;
    cursor: pointer;
    font: 700 0.76rem/1 Ubuntu, sans-serif;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__reference-actions {
    display: grid;
    width: clamp(11.5rem, 14vw, 15rem);
    gap: 0.28rem;
    grid-column: 1;
    grid-row: 2;
    pointer-events: auto;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__reference-actions #analysis-reference-line-control,
.analysis-feature-legend-explorer-host .analysis-feature-legend__reference-actions #analysis-distance-export-control {
    position: static;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    transform: none;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__reference-actions #analysis-distance-export-control {
    color: #367c2d;
    border-color: rgba(84, 168, 70, 0.38);
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__reference-actions #analysis-distance-export-control:hover,
.analysis-feature-legend-explorer-host .analysis-feature-legend__reference-actions #analysis-distance-export-control:focus-visible {
    background: #54a846;
    color: #fff;
}

#analysis-distance-export-control:hover,
#analysis-distance-export-control:focus-visible {
    background: #173f75;
    color: #fff;
    outline: none;
}

#analysis-distance-export-control[hidden] {
    display: none !important;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend {
    display: block !important;
    width: clamp(11.5rem, 14vw, 15rem);
    min-width: 11.5rem;
    margin: 0;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
    grid-column: 1;
    grid-row: 1;
}

/* The floating legend uses opaque cards without backdrop filters so moving
 * the canvas does not re-filter its pixels separately for every legend row. */

/* Explorer legend: dense, scan-friendly list.  The legacy application uses
 * a large root font size, so these values deliberately use a small viewport
 * cap instead of inheriting its generous table-row rhythm. */
.analysis-feature-legend-explorer-host .analysis-feature-legend__content {
    padding: 0.2rem 0;
    gap: 0.16rem;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__header {
    width: fit-content;
    min-height: 2rem;
    padding: 0.28rem 0.48rem;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 0.7rem;
    background: #fff;
    box-shadow: 0 0.28rem 0.9rem rgba(7, 24, 60, 0.1);
    color: #173864;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__header:active {
    cursor: grabbing;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__header .analysis-feature-legend__icon,
.analysis-feature-legend-explorer-host .analysis-feature-legend__header .analysis-feature-legend__arrow {
    color: #173864;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__shared-row {
    width: 100%;
    min-height: clamp(1.5rem, 2.2vmin, 2rem);
    padding: 0.16rem 0.28rem;
    align-items: center;
    justify-items: start;
    gap: 0.38rem;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 0.7rem;
    background: #fff;
    box-shadow: 0 0.24rem 0.72rem rgba(7, 24, 60, 0.08);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    cursor: pointer !important;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__map-toggle {
    appearance: none;
    color: #173864;
    font: inherit;
    text-align: left;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__map-toggle:hover,
.analysis-feature-legend-explorer-host .analysis-feature-legend__map-toggle:focus-visible {
    border-color: rgba(47, 111, 159, 0.56);
    background: rgba(176, 222, 237, 0.72);
    outline: none;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__shared-row.deactiveLegend {
    border-color: rgba(212, 20, 107, 0.48);
    background: rgba(255, 234, 243, 0.62);
    color: #c20f5f;
    opacity: 1;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__shared-row.deactiveLegend .analysis-feature-legend__shared-copy strong,
.analysis-feature-legend-explorer-host .analysis-feature-legend__shared-row.deactiveLegend .analysis-feature-legend__shared-copy small {
    color: #c20f5f;
    text-decoration: line-through;
    text-decoration-thickness: 0.1em;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__shared-row.deactiveLegend .analysis-feature-legend__shared-symbol {
    background: rgba(255, 213, 231, 0.76);
    color: #c20f5f !important;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__shared-row--unloaded {
    cursor: pointer !important;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__shared-row--unloaded {
    grid-template-columns: 1.5rem minmax(0, 1fr) auto;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__shared-row--resizable {
    grid-template-columns: 1.5rem minmax(0, 1fr) auto auto;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__shared-row--resizable.analysis-feature-legend__shared-row--navigable {
    grid-template-columns: 1.5rem minmax(0, 1fr) auto auto auto;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__submenu {
    position: relative;
    display: block;
    width: 100%;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__submenu-summary {
    display: grid;
    width: 100%;
    min-height: clamp(1.7rem, 2.5vmin, 2.2rem);
    padding: 0.2rem 0.38rem;
    align-items: center;
    gap: 0.42rem;
    grid-template-columns: 1.5rem minmax(0, 1fr) auto 0.8rem;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.68);
    color: #173864;
    box-shadow: 0 0.24rem 0.72rem rgba(7, 24, 60, 0.08);
    cursor: pointer;
    font: inherit;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__submenu-summary:hover,
.analysis-feature-legend-explorer-host .analysis-feature-legend__submenu-summary:focus-visible {
    border-color: rgba(47, 111, 159, 0.56);
    background: rgba(176, 222, 237, 0.72);
    outline: none;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__submenu-icon {
    display: grid;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.42rem;
    background: rgba(157, 231, 247, 0.3);
    color: #173864;
    place-items: center;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__submenu-summary strong {
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__submenu-count {
    min-width: 1.35rem;
    padding: 0.08rem 0.3rem;
    border-radius: 999px;
    background: rgba(23, 56, 100, 0.08);
    font-size: 0.62rem;
    font-weight: 700;
    text-align: center;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__submenu-arrow {
    font-size: 1.1rem;
    line-height: 1;
    text-align: center;
    transition: transform 160ms ease;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__submenu:is(:hover, .is-open) .analysis-feature-legend__submenu-arrow {
    transform: translateX(0.12rem);
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__submenu-items {
    position: absolute;
    z-index: 4;
    left: calc(100% - 0.05rem);
    bottom: 0;
    display: none;
    width: clamp(16rem, 20vw, 22rem);
    max-height: min(78vh, 52rem);
    padding: 0.35rem;
    overflow-y: auto;
    gap: 0.18rem;
    box-sizing: border-box;
    border: 1px solid rgba(189, 211, 229, 0.92);
    border-radius: 0.8rem;
    background: rgba(244, 251, 253, 0.98);
    box-shadow: 0 0.75rem 1.8rem rgba(7, 24, 60, 0.2);
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__submenu:is(:hover, .is-open) .analysis-feature-legend__submenu-items {
    display: grid;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__submenu-items .analysis-feature-legend__reference-actions {
    width: 100%;
    grid-column: auto;
    grid-row: auto;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__circle-size,
.analysis-feature-legend-explorer-host .analysis-feature-legend__info-boxes,
.analysis-feature-legend-explorer-host .analysis-feature-legend__circle-navigation,
.analysis-feature-legend-explorer-host .analysis-feature-legend__info-size-button {
    display: grid;
    width: 1.42rem;
    height: 1.42rem;
    padding: 0;
    border: 0;
    border-radius: 0.42rem;
    background: rgba(157, 231, 247, 0.36);
    color: #173864;
    cursor: pointer;
    font-size: 0.78rem;
    place-items: center;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__circle-size:hover,
.analysis-feature-legend-explorer-host .analysis-feature-legend__circle-size:focus-visible,
.analysis-feature-legend-explorer-host .analysis-feature-legend__info-boxes:hover,
.analysis-feature-legend-explorer-host .analysis-feature-legend__info-boxes:focus-visible,
.analysis-feature-legend-explorer-host .analysis-feature-legend__circle-navigation:hover,
.analysis-feature-legend-explorer-host .analysis-feature-legend__circle-navigation:focus-visible,
.analysis-feature-legend-explorer-host .analysis-feature-legend__info-size-button:hover,
.analysis-feature-legend-explorer-host .analysis-feature-legend__info-size-button:focus-visible {
    background: #d4146b;
    color: #fff;
    outline: 0;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__circle-navigation {
    font-family: system-ui, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
}

.analysis-feature-circle-navigation-status {
    position: fixed;
    z-index: 2147483000;
    top: clamp(0.65rem, 1.5vh, 1.2rem);
    left: 50%;
    max-width: min(34rem, calc(100vw - 2rem));
    padding: 0.58rem 0.9rem;
    border: 1px solid rgba(80, 170, 207, 0.5);
    border-radius: 999px;
    background: rgba(247, 252, 255, 0.96);
    box-shadow: 0 0.55rem 1.4rem rgba(7, 24, 60, 0.18);
    color: #173864;
    font: 700 0.78rem/1.25 system-ui, sans-serif;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -0.65rem);
    transition: opacity 140ms ease, transform 140ms ease;
}

.analysis-feature-circle-navigation-status.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.analysis-feature-circle-navigation-status--empty {
    border-color: rgba(194, 15, 95, 0.4);
    background: rgba(255, 244, 249, 0.97);
    color: #9f104f;
}

@media (prefers-reduced-motion: reduce) {
    .analysis-feature-circle-navigation-status {
        transition: none;
    }
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__info-boxes.deactive {
    opacity: 0.34;
}

.analysis-feature-legend__info-master {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-height: clamp(1.5rem, 2.2vmin, 2rem);
    margin: 0 0.1rem 0.12rem;
    padding: 0.16rem 0.28rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.57);
    box-shadow: 0 0.24rem 0.72rem rgba(7, 24, 60, 0.08);
    box-sizing: border-box;
}

.analysis-feature-legend__info-master .analysis-feature-legend__info-master-button {
    flex: 1 1 auto;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__info-size-button {
    flex: 0 0 auto;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__info-master-button {
    min-height: 1.42rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #173864;
    font-size: 0.66rem;
    font-weight: 700;
}

.analysis-feature-legend__info-loading {
    display: inline-block;
    width: 0.72rem;
    height: 0.72rem;
    margin-left: 0.38rem;
    border: 0.12rem solid rgba(23, 56, 100, 0.25);
    border-top-color: currentColor;
    border-radius: 50%;
    vertical-align: -0.12rem;
    animation: analysis-info-box-loading-spin 0.8s linear infinite;
}

.analysis-feature-legend__info-master-button.has-load-error {
    color: #b64b20;
}

@keyframes analysis-info-box-loading-spin {
    to { transform: rotate(360deg); }
}

.analysis-feature-legend__size-slider {
    position: fixed;
    z-index: 2147483000;
    display: grid;
    top: 50%;
    left: 50%;
    width: min(21rem, calc(100vw - 2rem));
    gap: 0.7rem;
    padding: 1rem;
    border: 1px solid rgba(112, 151, 190, 0.52);
    border-radius: 0.78rem;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 0.65rem 1.8rem rgba(7, 24, 60, 0.22);
    color: #173864;
    font: 700 0.76rem/1.2 "Ubuntu", sans-serif;
    transform: translate(-50%, -50%);
}

.analysis-feature-legend__size-backdrop {
    position: fixed;
    z-index: 2147482999;
    inset: 0;
    background: rgba(4, 20, 48, 0.18);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.analysis-feature-legend__size-slider label {
    display: flex;
    justify-content: space-between;
}

.analysis-feature-legend__size-slider output { color: #c20f5f; }

.analysis-feature-legend__size-slider input {
    width: 100%;
    accent-color: #d4146b;
}

.analysis-feature-legend__size-preview {
    display: grid;
    min-height: 11rem;
    align-content: center;
    justify-items: center;
    gap: 0.34rem;
    border: 1px solid rgba(157, 231, 247, 0.7);
    border-radius: 0.72rem;
    background: linear-gradient(145deg, rgba(224, 242, 247, 0.84), rgba(255, 255, 255, 0.96));
}

.analysis-feature-legend__size-preview > span {
    width: var(--analysis-circle-size-preview, 64px);
    height: var(--analysis-circle-size-preview, 64px);
    max-width: 9.75rem;
    max-height: 9.75rem;
    border: 3px solid #d4146b;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 28%, #f8bfd9, #d4146b 64%, #a90c4d);
    box-shadow: 0 0.5rem 1.2rem rgba(212, 20, 107, 0.26);
    transition: width 65ms linear, height 65ms linear;
}

.analysis-feature-legend__size-preview strong { color: #102c59; font-size: 0.82rem; }
.analysis-feature-legend__size-preview small { color: #66809d; font-size: 0.66rem; }

.analysis-feature-legend__size-slider small {
    color: #66809d;
    font-size: 0.62rem;
    font-weight: 600;
}

.analysis-feature-legend__size-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.analysis-feature-legend__size-actions button {
    min-width: 7rem;
    padding: 0.58rem 0.9rem;
    border: 0;
    border-radius: 0.62rem;
    background: linear-gradient(145deg, #d4146b, #ee2f83);
    box-shadow: 0 0.35rem 0.8rem rgba(212, 20, 107, 0.22);
    color: #fff;
    cursor: pointer;
    font: 750 0.72rem/1 "Ubuntu", sans-serif;
}

.analysis-feature-legend__size-actions button:hover,
.analysis-feature-legend__size-actions button:focus-visible {
    background: linear-gradient(145deg, #bd0f5e, #d4146b);
    outline: 2px solid #77cce1;
    outline-offset: 2px;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__shared-symbol {
    width: 1.5rem;
    height: 1.5rem;
    padding-left: 0 !important;
    font-size: 0.76rem;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__shared-copy {
    width: 100%;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__shared-copy strong {
    width: 100%;
    font-size: 0.7rem;
    line-height: 1.1;
    text-align: left;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__shared-copy small {
    font-size: 0.55rem;
    line-height: 1.05;
    text-align: left;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__count {
    display: none;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__empty {
    padding: 0.38rem 0.48rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.57);
    box-shadow: 0 0.24rem 0.72rem rgba(7, 24, 60, 0.08);
    text-align: left;
}

/* Existing Skala.js controls are intentionally kept intact.  Only their
 * legacy footer positioning is neutralised while the Explorer is visible. */
.analysis-feature-legend-explorer-host > #SkalaDivHolder.analysis-feature-legend__scales {
    display: flex;
    width: auto;
    max-width: min(44rem, calc(90vw - 23rem));
    min-height: 0;
    align-items: flex-end;
    align-self: end;
    gap: 0.32rem;
    grid-column: 2;
    grid-row: 1 / span 2;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
}

.analysis-feature-legend-explorer-host > #SkalaDivHolder.analysis-feature-legend__scales .SkalaDiv {
    position: relative;
    width: clamp(9.5rem, 11vw, 12rem);
    height: auto;
    min-height: 8.5rem;
    padding: 0.55rem 0.65rem 1.45rem;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 0.7rem;
    background: #fff;
    box-shadow: 0 0.28rem 0.9rem rgba(7, 24, 60, 0.1);
    box-sizing: border-box;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.analysis-feature-legend-explorer-host > #SkalaDivHolder.analysis-feature-legend__scales .SkalaDivHeader,
.analysis-feature-legend-explorer-host .analysis-feature-legend__complexity #lineComplexDiv {
    cursor: pointer;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__complexity #lineComplexDiv {
    cursor: default;
}

.analysis-feature-legend-explorer-host > .analysis-feature-legend__complexity {
    display: flex;
    width: clamp(9.5rem, 11vw, 12rem);
    min-height: 8.5rem;
    padding: 0.55rem 0.65rem 1.45rem;
    margin: 0;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: flex-start;
    align-self: end;
    grid-column: 1;
    grid-row: 1 / span 2;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 0.7rem;
    background: #fff;
    box-shadow: 0 0.28rem 0.9rem rgba(7, 24, 60, 0.1);
    box-sizing: border-box;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    pointer-events: auto;
    grid-column: 1;
    grid-row: 1 / span 2;
}

.analysis-feature-legend-explorer-host [data-distribution-hint]::after {
    position: absolute;
    right: 0.55rem;
    bottom: 0.35rem;
    content: attr(data-distribution-hint);
    color: #65809e;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    opacity: 0.72;
    pointer-events: none;
}

.analysis-feature-metric-distribution-menu {
    position: fixed;
    z-index: 2147482700;
    display: grid;
    width: min(19rem, calc(100vw - 1rem));
    padding: 0.4rem;
    gap: 0.18rem;
    border: 1px solid rgba(169, 201, 224, 0.9);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 0.9rem 2.2rem rgba(7, 24, 60, 0.22);
    color: #173864;
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
}

.analysis-feature-metric-distribution-menu > header {
    display: flex;
    padding: 0.45rem 0.55rem 0.5rem;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid #dbe9f2;
}

.analysis-feature-metric-distribution-menu > header small {
    color: #66809d;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.analysis-feature-metric-distribution-menu > header strong {
    font-size: 0.78rem;
}

.analysis-feature-metric-distribution-menu > button {
    display: grid;
    width: 100%;
    padding: 0.48rem 0.55rem;
    grid-template-columns: 1.1rem 1fr;
    gap: 0.45rem;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: #173864;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.analysis-feature-metric-distribution-menu > button:hover,
.analysis-feature-metric-distribution-menu > button.is-active {
    background: #e0f2f7;
}

.analysis-feature-metric-distribution-menu > .analysis-feature-metric-distribution-menu__download {
    position: sticky;
    top: 0;
    margin-bottom: 0.2rem;
    border: 1px solid rgba(212, 20, 107, 0.32);
    background: rgba(212, 20, 107, 0.08);
}

.analysis-feature-metric-distribution-menu > .analysis-feature-metric-distribution-menu__download:hover {
    background: #d4146b;
    color: #fff;
}

.analysis-feature-metric-distribution-menu > .analysis-feature-metric-distribution-menu__download:hover small {
    color: #fff;
}

.analysis-feature-metric-distribution-menu > .analysis-feature-metric-distribution-menu__download > i {
    display: grid;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    place-items: center;
    border: 0;
    border-radius: 0;
    color: #d4146b;
}

.analysis-feature-metric-distribution-menu > .analysis-feature-metric-distribution-menu__download:hover > i {
    color: #fff;
}

.analysis-feature-metric-distribution-menu > button i {
    width: 0.72rem;
    height: 0.72rem;
    margin-top: 0.22rem;
    border: 1px solid #7898b4;
    border-radius: 50%;
}

.analysis-feature-metric-distribution-menu > button.is-active i {
    border: 0.22rem solid #d4146b;
}

.analysis-feature-metric-distribution-menu > button span {
    display: grid;
    gap: 0.08rem;
}

.analysis-feature-metric-distribution-menu > button strong {
    font-size: 0.76rem;
}

.analysis-feature-metric-distribution-menu > button small {
    color: #66809d;
    font-size: 0.64rem;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__complexity #lineComplexDiv,
.analysis-feature-legend-explorer-host .analysis-feature-legend__complexity #contentComplexSlide {
    width: 100%;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__complexity #lineComplexTitleLabel,
.analysis-feature-legend-explorer-host .analysis-feature-legend__complexity #lineComplexTitle {
    position: static;
    width: 100%;
    margin: 0 0 0.2rem;
    font-size: 0.86rem;
    line-height: 1.15;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__complexity .metricPanel_ComplexSlider {
    width: calc(100% - 0.6rem);
    margin: 1.1rem 0.3rem 0.65rem;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__complexity--no-data {
    background: rgba(242, 246, 250, 0.76);
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__complexity--no-data #lineComplexTitle {
    color: #718198;
    font-size: 0.72rem;
}

.analysis-feature-legend-explorer-host > #SkalaDivHolder.analysis-feature-legend__scales .SkalaDiv:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.76);
}

.analysis-feature-legend-explorer-host > #SkalaDivHolder.analysis-feature-legend__scales .SkalaDiv table {
    position: static;
    width: 100%;
    margin-top: 0.7rem;
    line-height: normal;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__metric-slider--aligned {
    position: absolute;
    z-index: 2;
    top: var(--analysis-metric-slider-top);
    left: var(--analysis-metric-slider-left);
    width: 0.42rem;
    height: var(--analysis-metric-slider-height) !important;
    margin: 0;
    border: 1px solid rgba(16, 44, 89, 0.22);
    background: rgba(255, 255, 255, 0.76);
    cursor: ns-resize;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__metric-slider--aligned .noUi-handle {
    top: -0.3rem !important;
    left: 0.48rem !important;
    width: 1rem !important;
    height: 0.6rem !important;
    border: 0 !important;
    border-radius: 0.12rem;
    background: #071b4a !important;
    box-shadow: 0 0.12rem 0.3rem rgba(7, 27, 74, 0.2);
    clip-path: polygon(0 50%, 100% 0, 100% 100%);
    cursor: ns-resize;
    transform: none !important;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__metric-slider--aligned .noUi-handle::after {
    position: absolute;
    display: block;
    inset: -0.45rem;
    content: "";
}

.analysis-feature-legend-explorer-host > #SkalaDivHolder.analysis-feature-legend__scales .SkalaLabel {
    width: 100%;
    margin-top: 0;
    font-size: 0.86rem;
    white-space: normal;
}

.analysis-feature-legend__external-add-metric {
    position: relative;
    z-index: 1;
    display: inline-flex;
    min-height: 2.5rem;
    margin-bottom: 0.15rem;
    padding: 0.45rem 0.7rem;
    align-items: center;
    gap: 0.32rem;
    border: 1px dashed #5f88aa;
    border-radius: 0.48rem;
    background: rgba(238, 249, 253, 0.9);
    color: #244f78;
    cursor: pointer;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    pointer-events: auto;
    transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
    white-space: nowrap;
}

.analysis-feature-legend-explorer-host .analysis-feature-legend__external-add-metric {
    width: 100%;
    min-height: 2rem;
    margin: 0;
    justify-content: center;
    border-style: solid;
    background: #fff;
    box-shadow: 0 0.24rem 0.72rem rgba(7, 24, 60, 0.08);
    box-sizing: border-box;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    grid-column: 1;
    grid-row: 3;
}

.analysis-feature-legend__external-add-metric b {
    color: #d4146b;
    font-size: 1rem;
}

.analysis-feature-legend__external-add-metric:hover,
.analysis-feature-legend__external-add-metric:focus-visible,
.analysis-feature-legend__external-add-metric--pointer-hover {
    border-color: #c01466;
    background: #c01466 !important;
    box-shadow: 0 0.42rem 1rem rgba(212, 20, 107, 0.3);
    color: #fff !important;
    outline: 0;
    transform: translateY(-1px);
}

.analysis-feature-legend__external-add-metric:hover b,
.analysis-feature-legend__external-add-metric:hover span,
.analysis-feature-legend__external-add-metric:focus-visible b,
.analysis-feature-legend__external-add-metric:focus-visible span,
.analysis-feature-legend__external-add-metric--pointer-hover b,
.analysis-feature-legend__external-add-metric--pointer-hover span {
    color: #fff !important;
    opacity: 1;
    -webkit-text-fill-color: #fff;
}

.analysis-feature-legend__content {
    display: flex;
    padding: 0.38rem;
    flex-direction: column;
    gap: 0.18rem;
}

.analysis-feature-legend__shared-row {
    display: grid !important;
    min-height: 2.65rem;
    padding: 0.32rem 0.42rem;
    align-items: center;
    border-radius: 0.42rem;
    cursor: default !important;
    gap: 0.55rem;
    grid-template-columns: 1.85rem minmax(0, 1fr);
}

.analysis-feature-legend__shared-row--unloaded {
    grid-template-columns: 1.85rem minmax(0, 1fr) auto;
    border-left: 0.22rem solid rgba(212, 20, 107, 0.45);
}

.analysis-feature-legend__line-load {
    border: 0;
    background: transparent;
    color: #d4146b;
    cursor: pointer;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: lowercase;
}

.analysis-feature-legend__line-load:hover,
.analysis-feature-legend__line-load:focus-visible {
    color: #9d0c4e;
    text-decoration: underline;
}

.analysis-feature-legend__shared-symbol {
    display: grid;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.42rem;
    background: rgba(157, 231, 247, 0.22);
    color: #173864;
    font-size: 0.95rem;
    place-items: center;
}

.analysis-feature-legend__shared-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.08rem;
}

.analysis-feature-legend__shared-copy strong {
    overflow: hidden;
    color: #102c59;
    font-size: 0.78rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analysis-feature-legend__shared-copy small {
    color: #6f829a;
    font-size: 0.64rem;
}

.analysis-feature-legend__empty {
    padding: 0.85rem 0.7rem;
    color: #6f829a;
    font-size: 0.74rem;
    line-height: 1.35;
    text-align: center;
}

.analysis-feature-legend__actions {
    display: grid;
    gap: 0.28rem;
    margin-top: 0.18rem;
    padding: 0.28rem 0.05rem 0.05rem;
    border-top: 1px solid rgba(25, 61, 102, 0.12);
}

.analysis-feature-legend__actions button {
    display: flex;
    min-height: 2rem;
    align-items: center;
    justify-content: center;
    gap: 0.36rem;
    border: 1px dashed rgba(25, 61, 102, 0.3);
    border-radius: 0.4rem;
    background: rgba(157, 231, 247, 0.11);
    color: #173864;
    cursor: pointer;
    font: inherit;
    font-size: 0.73rem;
    font-weight: 700;
}

.analysis-feature-legend__actions button:hover {
    border-color: #d4146b;
    background: rgba(212, 20, 107, 0.1);
    color: #b10e58;
}

.analysis-feature-legend__actions b,
.analysis-feature-legend__actions i {
    font-size: 1rem;
    font-style: normal;
}

.analysis-feature-legend-dialog {
    position: fixed;
    z-index: 2147482500;
    inset: 0;
    display: grid;
    padding: 1rem;
    background: rgba(5, 20, 48, 0.36);
    place-items: center;
}

.analysis-feature-legend-dialog__card {
    width: min(42rem, calc(100vw - 2rem));
    max-height: min(44rem, calc(100vh - 2rem));
    overflow: hidden;
    border: 1px solid rgba(157, 231, 247, 0.55);
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 1.25rem 3.5rem rgba(5, 20, 48, 0.35);
    color: #102c59;
}

.analysis-feature-legend-dialog__card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: #102c59;
    color: #fff;
}

.analysis-feature-legend-dialog__card header small,
.analysis-feature-legend-dialog__card header p {
    display: block;
    margin: 0;
    color: #b9e8f7;
    font-size: 0.73rem;
}

.analysis-feature-legend-dialog__card header strong {
    display: block;
    margin: 0.08rem 0;
    font-size: 1.06rem;
}

.analysis-feature-legend-dialog__card .icon-close {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 1.05rem;
}

.analysis-feature-legend-dialog__body {
    display: grid;
    max-height: calc(min(44rem, 100vh - 2rem) - 5.2rem);
    padding: 0.9rem;
    gap: 0.7rem;
    overflow: auto;
}

.analysis-feature-metric-library {
    padding: 1rem;
    background: rgba(16, 44, 89, 0.18);
}

.analysis-feature-metric-library .analysis-feature-legend-dialog__card {
    position: relative;
    width: clamp(42rem, 56vw, 68rem);
    height: min(78vh, 48rem);
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    border-color: #a9c9e0;
    background: rgba(248, 252, 255, 0.97);
    box-shadow: 0 1.4rem 4rem rgba(5, 20, 48, 0.32);
}

.analysis-feature-metric-library .analysis-feature-legend-dialog__card > header {
    min-height: 4rem;
    box-sizing: border-box;
    align-items: center;
    padding: 0.55rem 0.85rem;
    background: transparent;
    color: #102c59;
}

.analysis-feature-metric-library .analysis-feature-legend-dialog__card > header small,
.analysis-feature-metric-library .analysis-feature-legend-dialog__card > header p { color: #5f789b; }
.analysis-feature-metric-library .analysis-feature-legend-dialog__card > header strong { font-size: 1.45rem; }
.analysis-feature-metric-library .analysis-feature-legend-dialog__card > header p { display: none; }
.analysis-feature-metric-library .analysis-feature-legend-dialog__card > header .icon-close {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #e5f1f8;
    color: #102c59;
    font-size: 1.4rem;
}

.analysis-feature-metric-library__documentation {
    min-height: 2.4rem;
    margin-left: auto;
    padding: 0.4rem 1rem;
    border: 1px solid #91b9d7;
    border-radius: 0.5rem;
    background: #fff;
    color: #173864;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
}

.analysis-feature-metric-library .analysis-feature-legend-dialog__body {
    height: calc(100% - 4rem);
    max-height: calc(100% - 4rem);
    box-sizing: border-box;
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    padding: 0.55rem 0.7rem 0.75rem;
    gap: 0.5rem;
    overflow: hidden;
}

.analysis-feature-metric-library__targets {
    display: flex;
    min-height: 5.5rem;
    padding: 0.55rem;
    align-content: flex-start;
    align-items: flex-end;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 0.35rem;
    border: 1px solid #a9c9e0;
    border-radius: 0.55rem;
    background: rgba(222, 242, 249, 0.62);
}

.analysis-feature-metric-library__target-lead {
    display: flex;
    flex: 1 0 100%;
    align-items: center;
    justify-content: space-between;
    color: #173864;
    font-size: 0.75rem;
}

.analysis-feature-metric-library__target-lead span { margin: auto; font-weight: 650; }

.analysis-feature-metric-library__targets button,
.analysis-feature-metric-library__groups button {
    display: inline-flex;
    min-height: 2.35rem;
    padding: 0.35rem 0.75rem;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid #a9c9e0;
    border-radius: 0.48rem;
    background: #fff;
    color: #173864;
    cursor: pointer;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
}

.analysis-feature-metric-library__targets button i,
.analysis-feature-metric-library__groups button i { font-size: 0.95rem; font-style: normal; }
.analysis-feature-metric-library__targets button:hover,
.analysis-feature-metric-library__targets button.is-active,
.analysis-feature-metric-library__groups button:hover,
.analysis-feature-metric-library__groups button.is-active { background: #102c59; border-color: #102c59; color: #fff; }

.analysis-feature-metric-library input {
    width: 100%;
    min-height: 2.9rem;
    box-sizing: border-box;
    border: 1px solid #a9c9e0;
    border-radius: 0.55rem;
    padding: 0.5rem 0.75rem;
    color: #102c59;
    font: inherit;
    font-size: 1rem;
}

.analysis-feature-metric-library__groups { display: flex; gap: 0.35rem; }
.analysis-feature-metric-library__meta { display: flex; align-items: center; gap: 1rem; }
.analysis-feature-metric-library__group-hint { margin: 0; color: #5f789b; font-size: 0.76rem; }
.analysis-feature-metric-library__ai-hint {
    margin-left: auto;
    padding: 0.28rem 0.6rem;
    border-radius: 0.35rem;
    background: #f9d4e6;
    color: #b10e58;
    font-size: 0.68rem;
}

.analysis-feature-metric-library__table-wrap {
    min-height: 0;
    overflow: auto;
    border: 1px solid #a9c9e0;
    border-radius: 0.55rem;
    background: #fff;
}

.analysis-feature-metric-library__table-wrap table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.analysis-feature-metric-library__table-wrap col.metric-name { width: 34%; }
.analysis-feature-metric-library__table-wrap col.metric-abstract { width: 38%; }
.analysis-feature-metric-library__table-wrap col.metric-unit { width: 10%; }
.analysis-feature-metric-library__table-wrap col.metric-action { width: 4.5%; }
.analysis-feature-metric-library__table-wrap thead { position: sticky; top: 0; z-index: 2; }
.analysis-feature-metric-library__table-wrap th {
    height: 2.25rem;
    padding: 0.35rem 0.55rem;
    background: #123568;
    color: #fff;
    font-size: 0.75rem;
    text-align: left;
}
.analysis-feature-metric-library__table-wrap th[data-sort] { cursor: pointer; }
.analysis-feature-metric-library__metric { display: table-row; background: #fff; color: #173864; }
.analysis-feature-metric-library__metric:nth-child(odd) { background: rgba(222, 242, 249, 0.26); }
.analysis-feature-metric-library__metric:hover { background: #d8f0f7; }
.analysis-feature-metric-library__metric.is-active {
    background: #cceaf5;
    box-shadow: inset 0.24rem 0 #d4146b;
}

.analysis-feature-metric-library__metric.is-active td:first-child strong::after {
    content: "Aktiv";
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.38rem;
    border-radius: 999px;
    background: #d4146b;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    vertical-align: middle;
}
.analysis-feature-metric-library__metric td {
    height: 2.55rem;
    padding: 0.28rem 0.55rem;
    overflow: hidden;
    border-bottom: 1px solid #c8ddea;
    box-sizing: border-box;
    color: #5f789b;
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analysis-feature-metric-library__metric td:first-child { color: #173864; }
.analysis-feature-metric-library__metric td:first-child i {
    display: inline-grid;
    width: 1.7rem;
    height: 1.7rem;
    margin-right: 0.38rem;
    border-radius: 0.4rem;
    background: #e2f4f8;
    place-items: center;
    vertical-align: middle;
}
.analysis-feature-metric-library__metric td:first-child strong { font-size: 0.84rem; }
.analysis-feature-metric-library__metric td:first-child em {
    display: inline-block;
    width: 0.82rem;
    height: 0.82rem;
    margin-left: 0.35rem;
    border-radius: 50%;
    background: #f6cfe3;
    vertical-align: middle;
}
.analysis-feature-metric-library__metric td:nth-child(n+4) { padding-inline: 0.15rem; text-align: center; }
.analysis-feature-metric-library__metric button {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #123568;
    cursor: pointer;
    font-size: 0.78rem;
}
.analysis-feature-metric-library__metric .analysis-feature-metric-library__load { background: #123568; color: #fff; }
.analysis-feature-metric-library__metric button:hover { background: #c6edff; }
.analysis-feature-metric-library__metric .analysis-feature-metric-library__load:hover { background: #d4146b; }
.analysis-feature-metric-library__json { font-family: monospace; font-weight: 700; }

.analysis-feature-metric-info {
    position: absolute;
    z-index: 5;
    inset: 0;
    overflow: auto;
    background: #fff;
    color: #102c59;
}
.analysis-feature-metric-info > header { display: flex; justify-content: space-between; padding: 0.8rem; background: #102c59; }
.analysis-feature-metric-info > header button { border: 0; background: transparent; color: #fff; cursor: pointer; font: inherit; }
.analysis-feature-metric-info > div { max-width: 58rem; margin: 2rem auto; padding: 1rem; }
.analysis-feature-metric-info h2 { font-size: 1.7rem; }
.analysis-feature-metric-info__abstract { padding: 1rem; border-radius: 0.6rem; background: #e8f6fa; line-height: 1.5; }
.analysis-feature-metric-info dl { display: grid; grid-template-columns: 10rem 1fr; gap: 0.5rem; }
.analysis-feature-metric-info dt { font-weight: 700; }

.analysis-feature-line-library__list { display: grid; gap: 0.35rem; }
.analysis-feature-line-library__list button {
    display: grid;
    min-height: 3rem;
    padding: 0.45rem 0.6rem;
    align-items: center;
    grid-template-columns: 1.5rem minmax(0, 1fr) 1.3rem;
    gap: 0.45rem;
    border: 1px solid rgba(25, 61, 102, 0.14);
    border-radius: 0.5rem;
    background: #fff;
    color: #102c59;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.analysis-feature-line-library__list button:hover { border-color: #d4146b; background: #fff4f9; }
.analysis-feature-line-library__list span { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.analysis-feature-line-library__list b { color: #d4146b; font-size: 1.15rem; text-align: center; }
.analysis-feature-line-library__list i { color: #173864; font-size: 1rem; font-style: normal; }
.analysis-feature-legend-dialog__empty { margin: 0; padding: 1.25rem 0.5rem; color: #6f829a; text-align: center; }

@media (max-width: 560px) {
    .analysis-feature-metric-library {
        padding: 0.45rem;
    }

    .analysis-feature-metric-library .analysis-feature-legend-dialog__card {
        width: calc(100vw - 0.9rem);
        height: calc(100vh - 0.9rem);
        max-width: none;
        max-height: none;
    }

    .analysis-feature-metric-library__target-lead span { display: none; }
    .analysis-feature-metric-library__table-wrap col.metric-abstract { width: 0; }
    .analysis-feature-metric-library__metric td:nth-child(2),
    .analysis-feature-metric-library__table-wrap th:nth-child(2) { display: none; }
}

@media (max-width: 900px) {
    .analysis-feature-legend__count {
        display: none;
    }

    .analysis-feature-legend-explorer-host {
        left: calc(10% + 0.45rem);
        max-width: calc(90vw - 0.9rem);
        align-items: flex-start;
        grid-template-columns: minmax(11.5rem, 15rem);
        grid-template-rows: auto auto auto auto;
    }

    .analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--has-complexity {
        grid-template-columns: minmax(11.5rem, 15rem);
    }

    .analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--has-complexity .analysis-feature-legend,
    .analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--has-complexity .analysis-feature-legend__reference-actions,
    .analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--has-complexity .analysis-feature-legend__external-add-metric,
    .analysis-feature-legend-explorer-host.analysis-feature-legend-explorer-host--has-complexity > #SkalaDivHolder.analysis-feature-legend__scales {
        grid-column: 1;
    }

    .analysis-feature-legend-explorer-host > #SkalaDivHolder.analysis-feature-legend__scales {
        max-width: calc(90vw - 0.9rem);
        grid-column: 1;
        grid-row: 4;
        overflow-x: auto;
    }

    .analysis-feature-legend-explorer-host > .analysis-feature-legend__complexity {
        grid-column: 1;
        grid-row: 3;
    }
}
