
/* Sources and Explore share one wide workspace slot; the map stays beside it. */
:root{--workspace-panel-width:496px}
main.workspace-overlay-open>.menu-rail{opacity:.55}
#analysis-panel[aria-hidden="true"],#map-info-panel[aria-hidden="true"]{visibility:hidden;pointer-events:none}
@media(min-width:801px){
  main,main.modal-open,main:has(>.workspace-overlay:not([hidden])),main:has(>#analysis-panel:not([hidden])):not(:has(>.workspace-overlay:not([hidden]))){grid-template-columns:var(--rail-width) 496px minmax(0,1fr)!important}
  main>#analysis-panel,main>#map-info-panel{grid-column:2;grid-row:1}
  main>.map{grid-column:3;grid-row:1;margin-left:0}
  /* Keep map overlays outside the shared left panel, including its buttons. */
  main.modal-open>.workspace-overlay,main:has(>.workspace-overlay:not([hidden]))>.workspace-overlay{position:absolute;grid-column:3;grid-row:1;inset:12px}
  main.modal-open>.workspace-overlay>.workspace-overlay-card,main:has(>.workspace-overlay:not([hidden]))>.workspace-overlay>.workspace-overlay-card{width:min(720px,100%)}
}
@media(max-width:800px){
  main>#map-info-panel{grid-column:1;grid-row:auto;order:2}
  main>.map{grid-column:1;grid-row:auto;order:3}
}
#legend-data .legend-winner-icons{grid-template-columns:repeat(3,minmax(0,1fr))}
#legend-data .legend-winner-method-control{background:#fff;color:var(--ink)}
#legend-data .legend-winner-method-control.is-selected{border-color:#006f73;background:#006f73;color:#fff}
.legend-winner-method-menu{min-width:250px;background:#fff;color:var(--ink)}
.legend-winner-method-menu button{background:#fff;color:var(--ink)}
.legend-winner-method-menu button:hover,.legend-winner-method-menu button:focus-visible{background:#e8f3f1;color:var(--ink);outline:1px solid #168083;outline-offset:0}
.legend-winner-method-menu button.is-active{background:#006f73;color:#fff;font-weight:700}
.legend-winner-method-menu [data-winner-comparison-method="difference-percentage"] .legend-popup-icon,.legend-winner-method-menu [data-winner-comparison-method="coefficient-variation"] .legend-popup-icon{color:#e67b3c}
.legend-winner-method-menu [data-winner-comparison-method="mean-comparison"] .legend-popup-icon,.legend-winner-method-menu [data-winner-comparison-method="percentiles"] .legend-popup-icon{color:#2aa9a1}
.legend-winner-method-menu [data-winner-comparison-method="standard-deviation"] .legend-popup-icon,.legend-winner-method-menu [data-winner-comparison-method="z-score"] .legend-popup-icon{color:#4e91bd}
.legend-winner-method-menu [data-winner-comparison-method="median-comparison"] .legend-popup-icon,.legend-winner-method-menu [data-winner-comparison-method="statistical-significance"] .legend-popup-icon{color:#e4b52f}
.legend-winner-method-menu [data-winner-comparison-method="effect-size"] .legend-popup-icon{color:#168083}

.map-view-popup{position:absolute;z-index:12;top:48px;left:100px;width:min(490px,calc(100% - 24px));max-height:calc(100% - 16px);overflow:auto;margin:0;padding:10px;border:1px solid #d8d3c84d;border-radius:10px;background:rgb(255 253 248 / .3);box-shadow:0 10px 28px #17252d14}
.map-view-popup[hidden]{display:none!important}
.map-view-popup .map-info-module-heading{margin:0 0 8px;padding:0 2px;border:0;cursor:grab;user-select:none;touch-action:none}
.map-view-popup .map-info-module-heading.is-dragging{cursor:grabbing}
.map-view-popup .map-info-module-heading h3{font-size:13px}
.map-view-popup .map-info-view-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.map-view-popup .map-info-view-choice{background:rgb(255 255 255 / .7)}
.map-view-popup .map-info-view-choice:hover,.map-view-popup .map-info-view-choice:focus-visible,.map-view-popup .map-info-view-choice.is-selected{background:rgb(217 238 235 / .7)}
.map-view-popup .map-info-view-icon{opacity:.7}
@media(max-width:800px){.map-view-popup{top:48px;left:8px;width:min(490px,calc(100% - 16px))}.map-view-popup .map-info-view-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.map-view-popup[data-map-view-popup-orientation="vertical"]{width:min(104px,calc(100% - 16px))}
.map-view-popup[data-map-view-popup-orientation="vertical"] .map-info-view-grid{grid-template-columns:minmax(0,1fr)}

:root{--cartarra-font-family:'Quicksand',system-ui,sans-serif}
body,body::before,body::after,body *{font-family:var(--cartarra-font-family)!important}
body .maplibregl-map,body .maplibregl-map *{font-family:var(--cartarra-font-family)!important}
#analysis-panel .workspace-subpanel-header{position:sticky;top:-18px;z-index:6;padding-right:38px;background:var(--card)}
[data-workspace-context]{overflow-wrap:anywhere}
[data-workspace-context] .workspace-context-name{text-transform:none;letter-spacing:normal}
#analysis-panel .workspace-subpanel-close{position:absolute;top:0;right:0;display:grid;place-items:center;width:30px;height:30px;margin:0;padding:0;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);font-size:24px;font-weight:500;line-height:1}
#analysis-panel .workspace-subpanel-close:hover,#analysis-panel .workspace-subpanel-close:focus-visible{border-color:#168083;background:#e8f3f1;outline:2px solid #168083;outline-offset:1px}
#analysis-panel .bricklayer-browser{scroll-margin-top:95px}
.tools-tool-grid[hidden]{display:none}
[data-workspace-tool-details]:not(:empty){margin-top:22px}

/* Perspective is the existing Data module with a lighter, text-first control layout. */
#map-info-data{padding:12px;border:1px solid var(--line);border-radius:10px;background:#fff}
#map-info-data .map-info-module-heading h3{font-size:12px;letter-spacing:.03em;text-transform:uppercase}
#legend-data{container-type:inline-size}
#legend-data .legend-meta-row{grid-template-columns:minmax(68px,28%) minmax(0,1fr);gap:7px;min-width:0;margin:5px 0}
#legend-data .legend-meta-label{min-width:0;color:var(--ink);font-size:11px;font-weight:700}
#legend-data .legend-where-row .legend-title{font-size:11px}
#legend-data .legend-column-badge,
#legend-data .legend-base-column-badge,
#legend-data .legend-aggregation-layer-control{min-width:0;border-color:var(--line);border-radius:6px;background:#fff}
#legend-data .legend-aggregation-layer-control.is-placeholder{color:var(--muted)}
#legend-data .legend-column-badge:hover,
#legend-data .legend-column-badge:focus-visible,
#legend-data .legend-base-column-badge:hover,
#legend-data .legend-base-column-badge:focus-visible,
#legend-data .legend-aggregation-layer-control:hover,
#legend-data .legend-aggregation-layer-control:focus-visible{border-color:#168083;background:#eef7f5;outline:2px solid #168083;outline-offset:1px}
#legend-data .legend-scope-controls,
#legend-data .legend-mode-icons,
#legend-data .legend-winner-icons,
#legend-data .legend-method-icons{display:flex;flex-wrap:wrap;gap:4px;min-width:0;height:auto;min-height:0}
#legend-data .legend-scope-controls .legend-inline-icon{flex:1 1 90px;min-width:90px}
#legend-data .legend-mode-icons .legend-inline-icon{flex:1 1 80px}
#legend-data .legend-winner-icons .legend-inline-icon:not(.legend-winner-method-control){flex:1 1 80px}
#legend-data .legend-winner-icons .legend-winner-method-control{flex:1 1 100%}
#legend-data .legend-method-icons .legend-inline-icon{flex:1 1 75px}
#legend-data .legend-scope-row,
#legend-data .legend-icon-row{align-items:start;margin:6px 0}
#legend-data .legend-scope-row>.legend-meta-label,
#legend-data .legend-icon-row>.legend-meta-label{min-height:31px}
#legend-data .legend-inline-icon{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:5px;width:auto;min-width:0;height:31px;min-height:31px;margin:0;padding:4px 6px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink);font-size:11px;line-height:1.2}
#legend-data .legend-inline-icon::after{content:none;display:none}
#legend-data .legend-inline-icon-symbol{width:17px;height:17px;flex:0 0 17px}
#legend-data .legend-inline-icon-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:700;line-height:1.2}
#legend-data .legend-inline-icon:hover{border-color:#168083;background:#eef7f5}
#legend-data .legend-inline-icon.is-selected{border-color:#006f73;background:#006f73;color:#fff}
#legend-data .legend-inline-icon:disabled{border-color:var(--line);background:#f8f6f1;color:var(--muted);opacity:.5;cursor:not-allowed}
#legend-data .legend-inline-icon:focus-visible{outline:2px solid #168083;outline-offset:2px}
@container (max-width:260px){#legend-data .legend-meta-row{grid-template-columns:minmax(0,1fr);gap:2px}}


#geocode-preview-controls{border-color:#c8ddd2;background:var(--card)!important;color:var(--ink)!important}
#geocode-preview-controls .overlay-kicker{color:var(--selection-color)}
#geocode-preview-controls>p{color:var(--muted)}
#geocode-preview-controls #geocode-progress{accent-color:var(--selection-color)}
#geocode-preview-controls .geocode-progress-label{border-color:#c8ddd2;background:#f1f7f3;color:var(--ink)}
#geocode-preview-controls .geocode-field-mapping{border-color:#c8ddd2;background:#f7faf7}
#geocode-preview-controls .geocode-field-mapping label{color:var(--ink)}
#geocode-preview-controls .geocode-field-mapping label select{border-color:var(--line);background:#fff;color:var(--ink)}
#geocode-preview-controls .geocode-field-mapping label select:focus-visible{border-color:var(--selection-color);outline:2px solid #9fc9c5;outline-offset:1px}
#geocode-preview-controls .geocode-field-mapping label.has-column-match{background:var(--selection-color)!important;color:#fff!important}
#geocode-preview-controls .geocode-field-mapping label.has-column-match select{background:#fff;color:var(--ink)}
#geocode-preview-controls .geocode-row-preview{border-color:#c8ddd2;background:#f7faf7}
#geocode-preview-controls .geocode-results-section{border-color:#c8ddd2}
#geocode-preview-controls .geocode-download-button{border-color:var(--line);background:#fff;color:var(--ink)}
#geocode-preview-controls .geocode-download-button:hover{background:#e7f2eb}
#geocode-preview-controls .geocode-results-table th{background:var(--selection-color)}
#geocode-preview-controls .geocode-overlay-close:hover,#geocode-preview-controls .geocode-overlay-close:focus-visible{background:#e7f2eb!important;color:var(--ink)!important;outline-color:var(--selection-color)}
#geocode-preview-controls .geocode-overlay-actions [data-geocode-start]{border-color:var(--selection-color);background:var(--selection-color);color:#fff}
#geocode-preview-controls .geocode-overlay-actions [data-geocode-start]:hover{border-color:#00565a;background:#00565a}
#geocode-preview-controls .geocode-overlay-actions [data-geocode-start]:focus-visible{outline:2px solid #9fc9c5;outline-offset:2px}
#geocode-preview-controls .geocode-overlay-actions [data-geocode-close]:not(.secondary){border-color:var(--selection-color);background:var(--selection-color);color:#fff}
#geocode-preview-controls .geocode-overlay-actions [data-geocode-close]:not(.secondary):hover{border-color:#00565a;background:#00565a}
#geocode-preview-controls .geocode-overlay-actions [data-geocode-close]:not(.secondary):focus-visible{outline:2px solid #9fc9c5;outline-offset:2px}
#geocode-preview-controls .geocode-overlay-actions [data-geocode-start].secondary{border-color:var(--line);background:#ebe7dc;color:var(--ink)}
#geocode-preview-controls .geocode-overlay-actions [data-geocode-start].secondary:hover{border-color:var(--line);background:#e7f2eb}
#geocode-preview-controls .geocode-overlay-actions.is-geocoding-complete{justify-content:flex-end}
#geocode-preview-controls .geocode-overlay-actions.is-geocoding-complete button{flex:0 1 165px}

#geocode-preview-controls .geocode-results-section{max-height:none;overflow:visible}
#geocode-preview-controls .geocode-results-table-viewport{max-height:260px;overflow:auto;border:1px solid var(--line);border-radius:7px;background:#fff}
#geocode-preview-controls .geocode-results-table{width:max-content;min-width:100%;border:0;border-radius:0}
#geocode-preview-controls .geocode-results-table th{position:sticky;top:0;z-index:2}
#geocode-preview-controls .geocode-results-table td{max-width:none;min-width:130px;padding:3px 5px}
#geocode-preview-controls .geocode-results-table td:first-child{min-width:54px}
#geocode-preview-controls .geocode-failed-cell{box-sizing:border-box;width:100%;min-width:120px;padding:4px 5px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--ink);font:inherit}
#geocode-preview-controls .geocode-failed-cell:focus{border-color:var(--selection-color);outline:2px solid #9fc9c5;background:#fff}
#geocode-preview-controls .geocode-results-pager{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:8px;color:var(--muted);font-size:11px}
#geocode-preview-controls .geocode-results-pager button{padding:5px 9px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink)}
#geocode-preview-controls .geocode-results-pager button:disabled{opacity:.5;cursor:not-allowed}

#legend-data .legend-winner-method-control[hidden]{display:none!important}

button[aria-disabled="true"]{cursor:not-allowed}

.overlay-resize-handle{position:absolute;right:3px;bottom:3px;z-index:100;display:block;box-sizing:border-box;width:22px;height:22px;margin:0;padding:0;border:0;border-radius:3px;background:transparent;color:#547579;cursor:nwse-resize;touch-action:none;user-select:none;pointer-events:auto}
.overlay-resize-handle::before{position:absolute;right:3px;bottom:3px;width:14px;height:14px;background:repeating-linear-gradient(135deg,transparent 0 3px,currentColor 3px 5px);clip-path:polygon(100% 0,100% 100%,0 100%);content:""}
.overlay-resize-handle:hover{color:var(--selection-color,#006f73)}
.overlay-resize-handle:focus-visible{outline:2px solid var(--selection-color,#006f73);outline-offset:-2px;background:#e8f3f1}
.is-resized-overlay{position:fixed!important;inset:auto!important;left:var(--overlay-resize-left)!important;top:var(--overlay-resize-top)!important;box-sizing:border-box!important;width:var(--overlay-resize-width)!important;height:var(--overlay-resize-height)!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;margin:0!important;transform:none!important}
body.is-resizing-overlay,body.is-resizing-overlay *{cursor:nwse-resize!important;user-select:none!important}

/* Keep every map tool and flyout choice within the compact toolbar tile. */
:root{--map-menu-button-width:62px;--map-menu-button-height:56px}
.map-navigation-toolbar[data-map-navigation-orientation] .map-navigation-button,
.map-navigation-menu .map-navigation-menu-item,
.selection-menu .selection-menu-choice,
.selection-menu .selection-menu-stop,
.map-view-popup .map-info-view-choice,
#workspace-style-menu .workspace-mode-menu-choice{
  box-sizing:border-box;
  display:flex;
  flex:none;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  width:var(--map-menu-button-width);
  min-width:var(--map-menu-button-width);
  max-width:var(--map-menu-button-width);
  height:var(--map-menu-button-height);
  min-height:var(--map-menu-button-height);
  max-height:var(--map-menu-button-height);
  margin:0;
  padding:4px 2px;
  font:700 8px/1.1 var(--cartarra-font-family);
  text-align:center;
  white-space:normal;
}
.map-navigation-toolbar{width:max-content}
.map-navigation-toolbar[data-map-navigation-orientation="vertical"]{width:calc(var(--map-menu-button-width) + 22px)}
.map-navigation-toolbar .map-navigation-button:disabled{cursor:not-allowed;opacity:.45}
.map-navigation-menu .map-navigation-menu-options{grid-template-columns:repeat(2,var(--map-menu-button-width))}
.map-navigation-menu-icon svg,.map-view-popup .map-info-view-icon svg{width:24px;height:24px}

.selection-menu{padding:10px;border-color:#d8d3c84d;border-radius:10px;background:rgb(255 253 248 / .3);box-shadow:0 10px 28px #17252d14;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
.selection-menu .selection-menu-heading{align-items:flex-start;flex-wrap:wrap;gap:8px}
.selection-menu .selection-menu-heading>strong{padding-top:4px}
.selection-menu .selection-menu-stop::before{width:14px;height:14px;flex:0 0 14px;border-radius:2px;background:currentColor;opacity:.7;content:""}
.selection-menu .selection-menu-groups{grid-template-columns:max-content max-content}
.selection-menu .selection-menu-group:first-child .selection-menu-choices{grid-template-columns:repeat(3,var(--map-menu-button-width))}
.selection-menu .selection-menu-group:nth-child(2) .selection-menu-choices{grid-template-columns:repeat(4,var(--map-menu-button-width))}
.selection-menu.is-narrow .selection-menu-groups{grid-template-columns:minmax(0,1fr)}
.selection-menu.is-narrow .selection-menu-group .selection-menu-choices,
.selection-menu.is-narrow .selection-menu-group:first-child .selection-menu-choices{grid-template-columns:repeat(auto-fit,var(--map-menu-button-width))}

.map-view-popup{width:min(414px,calc(100% - 16px))}
.map-view-popup .map-info-view-grid{grid-template-columns:repeat(auto-fit,var(--map-menu-button-width));justify-content:start}
.map-view-popup[data-map-view-popup-orientation="vertical"]{width:calc(var(--map-menu-button-width) + 22px)}
.map-view-popup[data-map-view-popup-orientation="vertical"] .map-info-view-grid{grid-template-columns:var(--map-menu-button-width)}
@media(max-width:800px){.map-view-popup{width:min(216px,calc(100% - 16px))}}

#workspace-style-menu.map-navigation-menu--style{
  width:var(--map-menu-flyout-width)!important;
  max-width:calc(100vw - 16px);
  max-height:calc(100vh - 16px);
  overflow:auto;
  border-color:#d8d3c84d;
  border-radius:10px;
  background:rgb(255 253 248 / .3);
  box-shadow:0 10px 28px #17252d14;
  -webkit-backdrop-filter:blur(4px);
  backdrop-filter:blur(4px);
}
#workspace-style-menu .workspace-mode-menu-groups{grid-template-columns:repeat(3,max-content);gap:10px}
#workspace-style-menu .workspace-mode-menu-group{grid-template-columns:var(--map-menu-button-width)}
#workspace-style-menu .workspace-mode-menu-group[data-workspace-mode-section="Match Patterns"]{grid-template-columns:repeat(3,var(--map-menu-button-width))}
#workspace-style-menu .workspace-mode-menu-choice{background:rgb(255 255 255 / .7)}
#workspace-style-menu .workspace-mode-menu-choice:hover,
#workspace-style-menu .workspace-mode-menu-choice:focus-visible,
#workspace-style-menu .workspace-mode-menu-choice.is-active{background:rgb(217 238 235 / .7)}
#workspace-style-menu .workspace-mode-menu-label{font-size:8px;line-height:1.1;white-space:normal}
#workspace-style-menu .workspace-mode-menu-choice>[aria-hidden="true"]{opacity:.7}
.selection-menu .selection-menu-choice>span:last-child,
.map-navigation-menu .map-navigation-menu-item>span:last-child,
#workspace-style-menu .workspace-mode-menu-label{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#workspace-style-menu.is-narrow .workspace-mode-menu-groups{grid-template-columns:minmax(0,1fr)}
#workspace-style-menu.is-narrow .workspace-mode-menu-group+.workspace-mode-menu-group{padding:10px 0 0;border-top:1px solid var(--line);border-left:0}
#workspace-style-menu.is-narrow .workspace-mode-menu-group[data-workspace-mode-section="Match Patterns"]{grid-template-columns:repeat(auto-fit,var(--map-menu-button-width))}
/* Area-level and subject filters (N77) */
.discover-geo-subject{margin-top:14px}
.discover-geo-subject-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}
.discover-geo-subject-fields>.discover-flags,.discover-geo-subject-fields>.discover-choices,.discover-geo-subject-fields>.discover-facets-note{grid-column:1/-1}
[data-source-view="discover"][data-discover-filters-collapsed="true"] .discover-geo-subject-fields{display:none}
.discover-area-levels,.discover-nuts-levels,.discover-choice-group{margin:0;padding:0;border:0;min-width:0}.discover-area-levels legend,.discover-nuts-levels legend,.discover-choice-group legend{padding:0;margin-bottom:4px;font-size:13px}
.discover-area-level-list,.discover-choice-list{display:flex;flex-wrap:wrap;gap:6px 12px}.discover-check{display:inline-flex;align-items:center;gap:4px;font-size:13px}
.discover-flags{display:flex;flex-wrap:wrap;gap:6px 18px}.discover-flags [hidden]{display:none}
.discover-choices{display:grid;gap:10px}.discover-choices:empty{display:none}
.discover-count{color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}.discover-count:empty{display:none}
.discover-choice-list{gap:6px}.discover-choice-chip,.discover-choice-more{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font:12px var(--cartarra-font-family);cursor:pointer}
.discover-choice-chip.is-selected{background:#d9e7e5;border-color:#7aa6a1}.discover-choice-more{border-style:dashed;color:var(--muted)}
.discover-subject-picker{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:13px}.discover-subject-picker input[type="search"]{width:100%;box-sizing:border-box}
.discover-subject-tree{max-height:240px;margin:0;padding:4px;overflow:auto;list-style:none;border:1px solid var(--line);border-radius:8px;background:#fff}
.discover-subject-domain-row{display:flex;align-items:center;gap:4px}.discover-subject-domain-check{flex:1;min-width:0}.discover-subject-domain-check .discover-check-label{font-weight:600}
.discover-subject-toggle{width:20px;height:20px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--muted);font-size:12px;line-height:1;cursor:pointer}.discover-subject-toggle:hover{background:#eef5f4}
.discover-subject-children{margin:0 0 4px 24px;padding:0;list-style:none}.discover-subject-children[hidden]{display:none}.discover-subject-children .discover-check{padding:1px 0}
.discover-geo-subject-note,.discover-facets-note{min-height:0;color:var(--muted);font-size:11px}.discover-geo-subject-note:empty,.discover-facets-note[hidden]{display:none}
.discover-filter-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.discover-filter-chips[hidden]{display:none}
.discover-filter-chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;padding:2px 4px 2px 9px;border:1px solid var(--line);border-radius:999px;background:#eef5f4;font-size:12px}
.discover-filter-chip-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.discover-filter-chip-remove{width:20px;height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--ink);font-size:14px;line-height:1;cursor:pointer}.discover-filter-chip-remove:hover{background:#d9e7e5}
.source-result .source-result-tags{display:block;color:var(--muted);font-size:11px}
.source-result-tag-row{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}
.source-result-tag{display:inline-block;padding:1px 7px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--muted);font-size:11px;line-height:1.5}
.source-result-tag.is-ok{border-color:#7fb58a;background:#e8f4ea;color:#245a30}.source-result-tag.is-warn{border-color:#d3b36a;background:#fbf3de;color:#6b4e0a}.source-result-tag.is-bad{border-color:#d58a8a;background:#fbe9e9;color:#7a2020}
@media(max-width:850px){.discover-geo-subject-fields{grid-template-columns:1fr}}
/* N-82 (owner decision 29 Oct 2026): a long category or range label is cut with an ellipsis on one line, the full text is in the
   title attribute. One variable, --legend-label-max, is the longest a label may get (legend.js keeps the same number for the
   data column). Only the label text shrinks: the checkbox/swatch and the count column stay where they are. This block is last on
   purpose, so it wins over the older min-width:max-content / overflow:visible layers above; restyle it freely. */
:root{--legend-label-max:40ch}
.legend .legend-row .legend-filter-choice,.legend .legend-row .legend-visibility-choice{max-width:var(--legend-label-max);min-width:0}
.legend .legend-row .legend-filter-choice strong,.legend .legend-row .legend-visibility-choice strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.map-surface-legend .map-surface-legend-value>span:last-child{min-width:0;max-width:var(--legend-label-max);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* CABL-001 WP1: Afbryd for the whole-dataset measurement before analysis (column-facts-before-analysis.js); placement is provisional, noted for the designer. */
.data-loading-overlay .data-loading-cancel{position:absolute;top:calc(50% + 170px);left:50%;transform:translateX(-50%);margin:0;cursor:pointer}
/* Import progress (import-progress.js, KRAV-PROGRESS-01): step strip, % done and time under the spinner and in the geocoding panel. */
.import-progress{box-sizing:border-box;width:min(560px,calc(100vw - 32px));padding:12px 14px;border:1px solid #dce4ec;border-radius:10px;background:#fff;color:#142235;font-size:12px;line-height:1.35;box-shadow:0 4px 16px #17252d1f;cursor:default}
.data-loading-overlay>.import-progress{position:absolute;top:min(calc(50% + 165px),calc(100% - 200px));left:50%;transform:translateX(-50%);max-height:calc(100% - 72px);overflow:auto}
/* Afbryd stays inside the window on short viewports (it sat at +170 px before the card): under the card, never below the bottom edge, and above it if they meet. */
.data-loading-overlay:has(>.import-progress) .data-loading-cancel{z-index:1;top:min(calc(50% + 300px),calc(100% - 56px))}
#geocode-preview-controls>.import-progress{width:auto;margin:0 0 10px;box-shadow:none}
.import-progress-steps{display:flex;flex-wrap:wrap;gap:4px 6px;margin:0 0 8px;padding:0;list-style:none}
.import-progress-steps li{padding:3px 8px;border-radius:999px;background:#eef2f6;color:#52677b;font-size:11px;white-space:nowrap}
.import-progress-steps li[data-state=active],.import-progress-steps li[data-state=waiting]{background:#168083;color:#fff;font-weight:600}
.import-progress-steps li[data-state=done]{background:#d7eeee;color:#0f5c5e}
.import-progress-steps li[data-state=done]::before{content:"✓ "}
.import-progress-steps li[data-state=skipped]{background:transparent;color:#8a9aab;text-decoration:line-through}
.import-progress-steps li[data-state=stopped]{background:#fde8e8;color:#7f1d1d}
.import-progress-line{display:flex;justify-content:space-between;gap:12px;font-weight:600}
.import-progress-bar{height:8px;margin:6px 0;border-radius:999px;background:#eef2f6;overflow:hidden}
.import-progress-bar>span{display:block;height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,#168083,#4baeb0);transition:width .25s linear}
.import-progress-time{color:#52677b;font-variant-numeric:tabular-nums}
@media (prefers-reduced-motion:reduce){.import-progress-bar>span{transition:none}}
.searchable-select-popup{position:fixed;z-index:10000;box-sizing:border-box;display:flex;flex-direction:column;max-height:min(320px,calc(100vh - 16px));padding:6px;border:1px solid var(--line,#d8d3c8);border-radius:8px;background:var(--card,#fff);box-shadow:0 8px 24px #17252d33;color:var(--ink,#17252d)}.searchable-select-popup .searchable-select-search{flex:none;box-sizing:border-box;width:100%;margin:0;padding:7px 8px;border:1px solid var(--line,#d8d3c8);border-radius:5px;background:#fff;color:var(--ink,#17252d);font:inherit;font-size:12px}.searchable-select-count{padding:2px 4px}.searchable-select-options{min-height:0;overflow-y:auto}.searchable-select-option{display:block;width:100%;margin:0;padding:7px 8px;border:0;border-radius:4px;background:transparent;color:inherit;text-align:left;font:inherit;font-size:12px}.searchable-select-option:hover,.searchable-select-option.is-active{background:#e8f3f1}.searchable-select-option[aria-selected=true]{font-weight:700}.searchable-select-option:disabled{opacity:.5;cursor:not-allowed}.searchable-select-group{padding:7px 8px 3px;color:var(--muted,#5f6b72);font-size:11px;font-weight:700}
/* CABL-026 / KRAV-LISTSEARCH-05: a row hidden by a list search is ALWAYS gone, whatever display an author rule gives it (flex, grid, block). */
.list-search-hidden,.list-search-hidden[hidden],[data-list-search-box][hidden]{display:none!important}
.list-search{display:flex;align-items:center;gap:8px;box-sizing:border-box;width:100%;margin:6px 0;grid-column:1/-1;flex:0 0 auto}
.list-search-input{flex:1 1 auto;min-width:0;box-sizing:border-box;padding:4px 8px;font-size:12px;border:1px solid var(--line,#d8d3c8);border-radius:7px;background:var(--card,#fff);color:var(--ink,#17252d)}
.list-search-count{flex:0 0 auto;font-size:11px;color:var(--muted,#5f6b72);white-space:nowrap}
.list-search-count:empty{display:none}
.list-search-count-host{display:block;margin:2px 0}
/* CABL-029 (KRAV-RESULTCARD-12): Discover result card = title link + score, description, chips, table id. */
.source-result .source-result-body{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px;row-gap:3px}
.source-result .source-result-body>strong{display:block;flex:0 1 auto;min-width:0}
.source-result .source-result-title{color:#1a56c4;text-decoration:none;cursor:pointer}.source-result .source-result-title:hover{text-decoration:underline}
.source-result .source-result-score{margin-left:auto;font-variant-numeric:tabular-nums;letter-spacing:.02em;font-size:12px;color:var(--muted)}
.source-result .source-result-description{flex:0 0 100%;color:var(--muted);font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
.source-result .source-result-tag-row{flex:0 0 100%;margin-top:2px}
.source-result .source-result-table-id{flex:0 0 100%;color:var(--muted);font-size:10px;overflow-wrap:anywhere}
.source-result-tag.is-info{border-color:#8fb7e3;background:#e8f1fb;color:#1c4a80}
/* LISTBTN (owner 2026-11-18, docs/design/CA_LIST_BUTTONS.md KRAV-LISTBTN-01..03): the "..." control is plain text everywhere. No fill, no tint, no
   border, no red; the text colour is the surrounding text colour. Last in the cascade, with an id-strength :not(#_) so no per-list rule can tint it again. */
body button:is(.action-menu-more,.map-tab-more,.legend-more):not(#_):not(#_){border:0!important;border-radius:4px!important;background:transparent!important;background-image:none!important;box-shadow:none!important;color:inherit!important;font:700 15px/1 inherit!important;letter-spacing:.05em;white-space:nowrap;text-decoration:none}
body button:is(.action-menu-more,.map-tab-more,.legend-more):not(#_):not(#_):is(:hover,[aria-expanded="true"]){background:transparent!important;border:0!important;box-shadow:none!important;color:inherit!important;text-decoration:underline}
body button:is(.action-menu-more,.map-tab-more,.legend-more):not(#_):not(#_):focus-visible{background:transparent!important;outline:2px solid #168083!important;outline-offset:1px!important}
/* KRAV-LISTBTN-04: the buttons of a list row stay on one line; only the text beside them may wrap. */
:is(.analysis-loaded-data-actions,.source-result-actions,.analysis-library-actions,.bricklayer-file-actions,.legend-heading-actions,.dataset-card-toolbar,.map-info-module-heading){flex-wrap:nowrap}
:is(.analysis-loaded-data-actions,.source-result-actions,.analysis-library-actions,.bricklayer-file-actions,.legend-heading-actions,.dataset-card-toolbar,.aggregation-layer-item,.interest-bookmark-item,.dataset-column-list li) button{white-space:nowrap}
:is(.analysis-loaded-data-actions,.source-result-actions,.analysis-library-actions,.bricklayer-file-actions,.legend-heading-actions)>button{flex-shrink:0}
/* KRAV-LISTBTN-09 (owner 2026-11-18: "slette/delete knapper skal være røde"): delete items in the shared "..." menu are red */
.cartarra-action-menu button[data-action-id="delete"]:not(#_),.cartarra-action-menu button[data-action-id^="delete-"]:not(#_){color:#b42318!important}
