/* Read-first graded source statements and evidence guidance. */
.confidence-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.5;
}

.confidence-summary strong {
  color: var(--text-1);
  font-weight: 650;
}

.confidence-summary__difference {
  color: #e8d790;
}

.source-warning {
  margin: 0;
  padding: 8px 9px;
  border: 1px solid #8b4d56;
  border-radius: 6px;
  background: #2b1c23;
  color: #ffb2b2;
  font-size: 11px;
  line-height: 1.45;
}

.suggestion-details {
  color: var(--text-2);
  font-size: 10px;
}

.suggestion-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--text-1);
}

.suggestion-reasons {
  margin: 7px 0 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.5;
}

.source-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-list > li {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.source-list > li:last-child {
  border-bottom: 1px solid var(--line);
}

.source-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.source-heading > strong {
  color: var(--text-0);
  font-size: 12px;
  text-transform: capitalize;
}

.source-badge--independent {
  padding: 2px 6px;
  border-radius: 4px;
  background: #173226;
  color: #9cddb8;
  font-size: 9px;
  font-weight: 650;
}

.source-grades {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.45;
}

.source-list p {
  max-width: 70ch;
  margin: 0;
  overflow-wrap: anywhere;
  color: #c9d3e0;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.source-list a,
.source-url {
  overflow-wrap: anywhere;
  color: #80bdff;
  font-size: 11px;
  line-height: 1.4;
}

.source-url {
  color: var(--text-1);
}

.source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: var(--text-2);
  font-size: 10px;
}

.source-remove {
  align-self: flex-start;
  margin-left: -7px;
  color: #e99a9a;
}

.field textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  padding: 8px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-1);
  color: var(--text-0);
  font-size: 13px;
  font-weight: 450;
  line-height: 1.45;
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
}

.field textarea:hover:not(:disabled) {
  border-color: #536177;
}

.field textarea:focus {
  border-color: var(--focus);
  background: #101722;
}

.field textarea::placeholder {
  color: #929daf;
  opacity: 1;
}

.field.checkbox-field {
  align-self: flex-end;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  min-height: 34px;
  padding-bottom: 2px;
}

.field.checkbox-field input {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

.source-list .source-link {
  width: fit-content;
  max-width: 100%;
  grid-template-columns: 18px minmax(0, 1fr) 14px;
  padding: 3px 5px;
  margin-left: -5px;
}

.source-list .source-link .identifier-icon {
  width: 15px;
  height: 15px;
}

@media (max-width: 440px) {
  .field.checkbox-field { align-self: auto; }
}
/* required styles */

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	  -webkit-user-drag: none;
	}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
	background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
	image-rendering: -webkit-optimize-contrast;
	}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
	max-width: none !important;
	max-height: none !important;
	}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
	max-width: none !important;
	max-height: none !important;
	width: auto;
	padding: 0;
	}

.leaflet-container img.leaflet-tile {
	/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
	mix-blend-mode: plus-lighter;
}

.leaflet-container.leaflet-touch-zoom {
	-ms-touch-action: pan-x pan-y;
	touch-action: pan-x pan-y;
	}
.leaflet-container.leaflet-touch-drag {
	-ms-touch-action: pinch-zoom;
	/* Fallback for FF which doesn't support pinch-zoom */
	touch-action: none;
	touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
	-ms-touch-action: none;
	touch-action: none;
}
.leaflet-container {
	-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	z-index: 800;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	}

.leaflet-pane         { z-index: 400; }

.leaflet-tile-pane    { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane  { z-index: 500; }
.leaflet-marker-pane  { z-index: 600; }
.leaflet-tooltip-pane   { z-index: 650; }
.leaflet-popup-pane   { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg    { z-index: 200; }

.leaflet-vml-shape {
	width: 1px;
	height: 1px;
	}
.lvml {
	behavior: url(#default#VML);
	display: inline-block;
	position: absolute;
	}


/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 800;
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}
.leaflet-top,
.leaflet-bottom {
	position: absolute;
	z-index: 1000;
	pointer-events: none;
	}
.leaflet-top {
	top: 0;
	}
.leaflet-right {
	right: 0;
	}
.leaflet-bottom {
	bottom: 0;
	}
.leaflet-left {
	left: 0;
	}
.leaflet-control {
	float: left;
	clear: both;
	}
.leaflet-right .leaflet-control {
	float: right;
	}
.leaflet-top .leaflet-control {
	margin-top: 10px;
	}
.leaflet-bottom .leaflet-control {
	margin-bottom: 10px;
	}
.leaflet-left .leaflet-control {
	margin-left: 10px;
	}
.leaflet-right .leaflet-control {
	margin-right: 10px;
	}


/* zoom and fade animations */

.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	   -moz-transition: opacity 0.2s linear;
	        transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}
.leaflet-zoom-animated {
	-webkit-transform-origin: 0 0;
	    -ms-transform-origin: 0 0;
	        transform-origin: 0 0;
	}
svg.leaflet-zoom-animated {
	will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
	-webkit-transition: none;
	   -moz-transition: none;
	        transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}


/* cursors */

.leaflet-interactive {
	cursor: pointer;
	}
.leaflet-grab {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	cursor:         grab;
	}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
	cursor: crosshair;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
	cursor: move;
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	cursor:         grabbing;
	}

/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
	pointer-events: none;
	}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline-offset: 1px;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}


/* general typography */
.leaflet-container {
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-size: 0.75rem;
	line-height: 1.5;
	}


/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}

.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {
	font-size: 22px;
	}


/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-scrollbar {
	overflow-y: scroll;
	overflow-x: hidden;
	padding-right: 5px;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	font-size: 13px;
	font-size: 1.08333em;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=);
	}


/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.8);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	line-height: 1.4;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
	text-decoration: underline;
	}
.leaflet-attribution-flag {
	display: inline !important;
	vertical-align: baseline !important;
	width: 1em;
	height: 0.6669em;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	white-space: nowrap;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	background: rgba(255, 255, 255, 0.8);
	text-shadow: 1px 1px #fff;
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}


/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	margin-bottom: 20px;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	line-height: 1.3;
	font-size: 13px;
	font-size: 1.08333em;
	min-height: 1px;
	}
.leaflet-popup-content p {
	margin: 17px 0;
	margin: 1.3em 0;
	}
.leaflet-popup-tip-container {
	width: 40px;
	height: 20px;
	position: absolute;
	left: 50%;
	margin-top: -1px;
	margin-left: -20px;
	overflow: hidden;
	pointer-events: none;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;
	pointer-events: auto;

	-webkit-transform: rotate(45deg);
	   -moz-transform: rotate(45deg);
	    -ms-transform: rotate(45deg);
	        transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;
	color: #333;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	border: none;
	text-align: center;
	width: 24px;
	height: 24px;
	font: 16px/24px Tahoma, Verdana, sans-serif;
	color: #757575;
	text-decoration: none;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
	color: #585858;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	-ms-zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}


/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}


/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-interactive {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}

/* Printing */

@media print {
	/* Prevent printers from removing background-images of controls. */
	.leaflet-control {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		}
	}
:root {
  --bg-0: #0d1117;
  --bg-1: #12171f;
  --bg-2: #171d27;
  --bg-3: #1d2531;
  --line: #2a3443;
  --line-strong: #3b485b;
  --text-0: #e6ecf5;
  --text-1: #aeb9c8;
  --text-2: #8794a6;
  --accent: #ffd166;
  --accent-ink: #211a08;
  --danger: #ff7b7b;
  --focus: #6db3ff;
  --snapshot-added: #65d48d;
  --snapshot-changed: #f0bd55;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg-0);
  color: var(--text-0);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.app {
  display: grid;
  height: 100%;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 8px 14px 8px 18px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  white-space: nowrap;
  transition: opacity 160ms ease-out;
}

.brand:hover {
  opacity: 0.86;
}

.brand:hover .brand-name {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
  text-underline-offset: 3px;
}

.brand-mark {
  align-self: center;
  width: 24px;
  height: 24px;
  color: #cdd6e3;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.topbar-global-tool {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
}

/* The Docs anchor borrows .button styling; anchors need the underline gone
   and flex centering so it sits level with the neighbouring buttons. */
.topbar-docs-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.topbar-global-tool__icon {
  width: 19px;
  height: 19px;
}

.topbar-legend-popover {
  min-width: 230px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
}

.topbar-legend-popover__body {
  padding: 12px;
}

/* Topbar menus extend into grid row 2, so keep them above every page surface. */
.topbar .toolbar-popover,
.topbar .search-results {
  z-index: 19;
}

.topbar-meta {
  margin-right: 6px;
  font-size: 12px;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-2);
  color: var(--text-0);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
}

.button:hover:not(:disabled) {
  background: var(--bg-3);
  border-color: #536177;
}

.button:active:not(:disabled) {
  background: #222c3a;
}

.button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button--primary:hover:not(:disabled) {
  background: #ffda80;
  border-color: #ffda80;
}

.button--danger {
  color: var(--danger);
  border-color: #6a3c45;
  background: transparent;
}

.button--danger:hover:not(:disabled) {
  background: #2b1c23;
  border-color: #9c4e59;
}

.button--compact {
  min-height: 30px;
  padding: 6px 10px;
}

.icon-button,
.text-button {
  border: 0;
  background: transparent;
  color: var(--text-1);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
}

.icon-button:hover:not(:disabled),
.text-button:hover:not(:disabled) {
  color: var(--text-0);
  background: var(--bg-3);
}

.text-button {
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
}

.stage {
  display: flex;
  min-width: 0;
  min-height: 0;
  grid-column: 1;
  grid-row: 2;
}

.canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  background-color: var(--bg-0);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 40%, #141b26 0%, var(--bg-0) 70%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
}

.graph-canvas {
  width: 100%;
  height: 100%;
}

.status-state {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: flex;
  width: min(360px, calc(100% - 40px));
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, -50%);
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.status-state strong {
  color: var(--text-0);
  font-size: 15px;
}

.status-state .button {
  margin-top: 7px;
}

.status-state--error strong,
.status-state--error span {
  color: var(--danger);
}

.status-state--empty {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(18, 23, 31, 0.92);
}

.loading-line {
  position: relative;
  width: 150px;
  height: 3px;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}

.loading-line::after {
  position: absolute;
  inset: 0;
  width: 45%;
  background: var(--accent);
  content: "";
  animation: loading-slide 1s ease-in-out infinite alternate;
}

@keyframes loading-slide {
  from { transform: translateX(-10%); }
  to { transform: translateX(135%); }
}

.api-banner {
  position: absolute;
  z-index: 6;
  top: 12px;
  left: 50%;
  display: flex;
  max-width: calc(100% - 28px);
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
  padding: 8px 10px;
  border: 1px solid #743f49;
  border-radius: 7px;
  background: #291b21;
  color: #ffb2b2;
  font-size: 12px;
}

.api-banner button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-0);
  font-weight: 700;
}

.legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(18, 23, 31, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  font-size: 12px;
  color: var(--text-1);
}

.legend-title {
  margin-bottom: 6px;
  color: var(--text-2);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.7;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.legend-dot--small { width: 8px; height: 8px; }
.legend-dot--large { width: 16px; height: 16px; }

.legend-line {
  width: 22px;
  height: 0;
  flex: 0 0 auto;
}

.legend-line--high { border-top: 3px solid #8b96a6; }
.legend-line--med { border-top: 1.5px solid #8b96a6; }
.legend-line--low { border-top: 1.5px dotted #8b96a6; }
.legend-line--suspected { border-top: 2px dashed #b9a75f; }

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: 0 0 auto;
  background: #4aa3ff;
}

.legend-swatch--unverified {
  background: transparent;
  border: 2px dashed #c9d3e0;
}

.legend-swatch--inactive { opacity: 0.32; }

.legend-swatch--flagged {
  background: transparent;
  border: 3px solid #e8503a;
}

.pane-resize-handle {
  position: relative;
  z-index: 4;
  width: 9px;
  flex: 0 0 9px;
  touch-action: none;
  cursor: col-resize;
  background: var(--bg-1);
}

.pane-resize-handle::after {
  position: absolute;
  inset: 0 4px;
  background: var(--line);
  content: "";
  transition: background-color 160ms ease-out, box-shadow 160ms ease-out;
}

.pane-resize-handle:hover::after,
.pane-resize-handle:focus-visible::after,
.pane-resize-handle--dragging::after {
  background: var(--focus);
  box-shadow: 0 0 5px rgba(109, 179, 255, 0.45);
}

.pane-resize-handle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.side-panel {
  flex: 0 0 var(--profile-pane-width, 390px);
  min-width: 0;
  overflow-y: auto;
  background: var(--bg-1);
  scrollbar-color: var(--line-strong) var(--bg-1);
}

.panel-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-height: 100%;
  padding: 15px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
}

.panel-heading h2,
.side-empty h2 {
  margin: 0;
  color: var(--text-0);
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.panel-kicker {
  margin: 0 0 4px;
  color: var(--text-1);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entity-id {
  display: block;
  max-width: 310px;
  margin-top: 7px;
  overflow: hidden;
  color: var(--text-2);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.narrative {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-0);
}

.narrative__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.narrative__heading h3 {
  margin: 0;
  color: var(--text-0);
  font-size: 12px;
  font-weight: 700;
}

.narrative__text,
.narrative__empty {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.narrative__text {
  color: #c9d3e0;
  white-space: pre-wrap;
}

.narrative__empty {
  color: var(--text-2);
  font-size: 12px;
}

.narrative-mention {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #80bdff;
  font: inherit;
  font-weight: 650;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(128, 189, 255, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button.narrative-mention:hover {
  color: #b9dcff;
  text-decoration-color: currentColor;
}

.narrative-mention--broken {
  color: var(--text-2);
  cursor: help;
  opacity: 0.72;
  text-decoration-style: dotted;
  text-decoration-color: var(--danger);
}

/* Light theme: the dark-stage link blue (#80bdff) is too pale on a light pane. */
:root[data-theme="light"] .narrative-mention {
  color: #1a66c2;
  text-decoration-color: rgba(26, 102, 194, 0.5);
}

:root[data-theme="light"] button.narrative-mention:hover {
  color: #0d4c9e;
}

.narrative__editor {
  display: block;
}

/* T31 @-mention autocomplete: the dropdown anchors to the bottom of the
   textarea (not the caret -- caret-position tracking in a <textarea> needs a
   mirrored-div measurement hack that isn't worth it here) and reuses the
   .search-results / .search-result styling from the node search box so both
   read as one system. */
.narrative-mentions {
  position: relative;
}

.narrative__editor textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-1);
  color: var(--text-0);
  font-size: 13px;
  line-height: 1.55;
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
}

.narrative__editor textarea:hover:not(:disabled) {
  border-color: #536177;
}

.narrative__editor textarea:focus {
  border-color: var(--focus);
  background: #101722;
}

.narrative__editor textarea::placeholder {
  color: #929daf;
  opacity: 1;
}

.narrative__actions {
  display: flex;
  gap: 8px;
}

.backlinks {
  padding-top: 12px;
}

.backlink-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.backlink-list button {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-0);
  text-align: left;
}

.backlink-list button:hover {
  background: var(--bg-2);
}

.backlink-list button span {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backlink-list code {
  max-width: 42%;
  overflow: hidden;
  color: var(--text-2);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.field {
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  flex-direction: column;
  gap: 6px;
  color: var(--text-1);
  font-size: 12px;
  font-weight: 650;
}

.field input,
.field select,
.property-row input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 13px;
  font-weight: 450;
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
}

.field input:hover:not(:disabled),
.field select:hover:not(:disabled),
.property-row input:hover:not(:disabled) {
  border-color: #536177;
}

.field input:focus,
.field select:focus,
.property-row input:focus {
  border-color: var(--focus);
  background: #101722;
}

.field input::placeholder,
.property-row input::placeholder {
  color: #929daf;
  opacity: 1;
}

.field small,
.field-hint {
  margin: 0;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 450;
  line-height: 1.45;
}

/* --- Add-edge graph-pick: active endpoint highlight + hint (marked block) --- */
.node-picker-field--active > span {
  color: var(--accent);
}

.node-picker-field--active .node-picker input {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.node-pick-hint strong {
  color: var(--accent);
  font-weight: 650;
}
/* --- end add-edge graph-pick block --- */

.field-pair {
  display: flex;
  gap: 10px;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.panel-section h3 {
  margin: 0;
  color: var(--text-0);
  font-size: 12px;
  font-weight: 700;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading span {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 10px;
  text-align: center;
}

.property-editor {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.property-row {
  display: grid;
  grid-template-columns: minmax(80px, 0.8fr) minmax(100px, 1.2fr) 30px;
  gap: 6px;
}

.property-row .property-key {
  color: var(--text-1);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.form-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}

.form-actions--split {
  justify-content: space-between;
}

.form-error,
.form-notice {
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.form-error {
  border: 1px solid #743f49;
  background: #291b21;
  color: #ffb2b2;
}

.form-notice {
  border: 1px solid #66572b;
  background: #262314;
  color: #e8d790;
}

.connection-list {
  display: flex;
  flex-direction: column;
}

.connection-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 0.8fr);
  border-top: 1px solid var(--line);
}

.connection-row:last-child {
  border-bottom: 1px solid var(--line);
}

.connection-row button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 9px 6px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 10px;
  text-align: left;
}

.connection-row button:hover {
  background: var(--bg-2);
  color: var(--text-0);
}

.connection-row .connection-neighbor {
  justify-content: center;
  color: var(--text-0);
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.connection-relation {
  color: var(--text-0);
  font-size: 12px;
  font-weight: 650;
}

.endpoint-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.endpoint-flow > span {
  color: var(--accent);
}

.endpoint-flow button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg-0);
  color: var(--text-0);
  text-align: left;
}

.endpoint-flow button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--bg-2);
}

.endpoint-flow strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-flow button span {
  overflow: hidden;
  color: var(--text-2);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identifier-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.identifier-list li {
  border-top: 1px solid var(--line);
}

.identifier-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.identifier-link {
  display: grid;
  min-width: 0;
  min-height: 40px;
  grid-template-columns: 20px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  padding: 7px 6px;
  border-radius: 5px;
  color: #80bdff;
  text-decoration: none;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}

.identifier-link:hover {
  background: var(--bg-2);
  color: #b9dcff;
}

.identifier-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.identifier-link--text {
  color: var(--text-1);
}

.identifier-icon {
  width: 18px;
  height: 18px;
  color: currentColor;
}

.identifier-link__text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.identifier-link__text > span {
  overflow: hidden;
  color: var(--text-0);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identifier-link__text small {
  color: var(--text-2);
  font-size: 9px;
  text-transform: capitalize;
}

.identifier-link__external {
  color: var(--text-2);
  font-size: 12px;
  transition: color 160ms ease-out, transform 160ms ease-out;
}

.identifier-link:hover .identifier-link__external {
  color: currentColor;
  transform: translate(1px, -1px);
}

.identifier-error {
  margin: 0;
  color: #e99a9a;
  font-size: 10px;
  line-height: 1.45;
}

.side-empty {
  display: flex;
  height: 100%;
  min-height: 260px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 28px;
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.6;
}

.side-empty p {
  max-width: 30ch;
  margin: 8px 0 18px;
}

.empty-glyph {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font-size: 20px;
}

.empty-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 900px) {
  .brand-sub { display: none; }
}

@media (max-width: 700px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }

  .topbar-meta {
    width: 100%;
    order: 3;
    text-align: right;
  }

  .stage {
    flex-direction: column;
  }

  .canvas-wrap {
    min-height: 42vh;
  }

  .pane-resize-handle {
    display: none;
  }

  .side-panel {
    flex: 1 1 58%;
    border-top: 1px solid var(--line);
  }

  .legend {
    max-height: 160px;
    flex-direction: row;
    overflow-y: auto;
  }
}

@media (max-width: 440px) {
  .field-pair { flex-direction: column; }
  .panel-form { padding: 15px; }
  .legend { display: none; }
  .topbar-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* T30 read-first dossier panels */
.panel-dossier {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}

.panel-identity {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex: 1 1 180px;
  min-width: 0;
}

/* --- Node identity images: avatar + primary-image picker (marked block) --- */
.panel-identity__text {
  flex: 1 1 auto;
  min-width: 0;
}

/* Type-colored ring avatar. The ring color is set inline (colorForType). */
.node-avatar {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  background: var(--bg-3);
  margin-top: 2px;
}

.dossier-avatar {
  width: 96px;
  height: 96px;
  border-width: 3px;
  margin-top: 0;
}

.identity-image-disclosure {
  margin-top: -8px;
}

.identity-image-disclosure > summary {
  display: inline-block;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  list-style: none;
}

.identity-image-disclosure > summary::-webkit-details-marker {
  display: none;
}

.identity-image-disclosure > summary:hover {
  color: var(--text-0);
}

.identity-image-disclosure[open] > summary {
  margin-bottom: 8px;
  color: var(--text-0);
}

.primary-image-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.primary-image-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.primary-image-picker__head .panel-kicker {
  margin: 0;
}

.primary-image-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
}

.primary-image-picker__thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-3);
  cursor: pointer;
  transition: border-color 120ms ease;
}

.primary-image-picker__thumb:hover:not(:disabled) {
  border-color: var(--accent);
}

.primary-image-picker__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.primary-image-picker__thumb--active {
  border-color: var(--accent);
  cursor: default;
}

.primary-image-picker__badge {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-1);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
/* --- end node identity images block --- */

.panel-heading__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.panel-heading__actions .text-button {
  white-space: nowrap;
}

.panel-heading--stacked {
  flex-direction: column;
  gap: 8px;
}

.panel-heading--stacked .panel-heading__actions {
  width: 100%;
}

.panel-heading--stacked .panel-identity {
  flex: 0 1 auto;
  width: 100%;
  min-width: 0;
}

.panel-heading--stacked h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.text-button--active {
  background: var(--bg-3);
  color: var(--text-0);
}

/* panel header redesign */
/* Compact icon actions sit in their own row above the full-width identity. */
.panel-action {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-1);
  cursor: pointer;
  text-decoration: none;
}

.panel-action svg {
  width: 16px;
  height: 16px;
  display: block;
}

.panel-action:hover:not(:disabled) {
  background: var(--bg-3);
  color: var(--text-0);
}

.panel-action:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.panel-action:disabled {
  cursor: default;
  opacity: 0.45;
}

/* Focus / Edit toggles carry an active tint, matching the old text-button state. */
.panel-action--active,
.panel-action--active:hover:not(:disabled) {
  background: var(--bg-3);
  color: var(--text-0);
}

/* Close sits at the end, hairline-separated from the toggles. */
.panel-action--close {
  margin-left: 6px;
  padding-left: 6px;
  border-left: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  width: 34px;
}

/* Flagged state: filled pennant in a success tint so it reads as done. */
.flag-action--done,
.flag-action--done:disabled {
  color: #83d3a1;
  opacity: 1;
}

.flag-action--done:hover {
  background: #16301f;
}

.identity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.status-chip,
.confidence-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 10px;
  font-weight: 650;
  text-transform: capitalize;
}

.status-chip > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #69c48d;
}

.status-chip--suspected > span,
.status-chip--unverified > span {
  border: 1px dashed #d9c474;
  background: transparent;
}

/* "inactive" is the canonical node status; legacy "dead" data still renders
   identically until scripts/migrate_status_inactive.py rewrites it. */
.status-chip--inactive,
.status-chip--dead,
.status-chip--defunct {
  opacity: 0.65;
}

.status-chip--inactive > span,
.status-chip--dead > span,
.status-chip--defunct > span {
  background: var(--text-2);
}

.status-chip--dormant > span {
  background: #d9a441;
}

.confidence-chip {
  color: #d7c47b;
}

.section-label,
.panel-section h3.section-label,
.narrative h3.section-label {
  margin: 0;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.panel-dossier .panel-section {
  gap: 8px;
  padding-top: 18px;
}

.narrative {
  gap: 11px;
  padding: 14px;
}

.narrative__heading > .section-heading {
  flex: 1 1 auto;
}

.narrative__text,
.narrative__empty {
  font-size: 14px;
  line-height: 1.6;
  text-wrap: pretty;
}

.narrative__empty {
  width: 100%;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--text-2);
  text-align: left;
}

.narrative__empty:hover {
  color: var(--text-1);
}

.identity-edit {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-0);
}

.read-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.read-field {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(90px, 0.34fr) minmax(0, 1fr);
  gap: 10px;
  padding: 6px 0;
}

.read-field dt {
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.55;
}

.read-field dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-0);
  font-size: 12px;
  line-height: 1.55;
}

.read-field--editable {
  grid-template-columns: minmax(90px, 0.34fr) minmax(0, 1fr) auto;
}

.read-field__edit {
  align-self: start;
  margin: -3px -6px -3px 0;
  opacity: 0.55;
}

.read-field--editable:hover .read-field__edit,
.read-field__edit:focus-visible {
  opacity: 1;
}

.read-empty {
  color: var(--text-2);
}

.read-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.read-token-list > span {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 10px;
}

.read-object {
  display: block;
  overflow-x: auto;
  color: var(--text-1);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  white-space: pre-wrap;
}

.button--quiet {
  min-height: 30px;
  padding: 5px 9px;
  border-color: transparent;
  background: transparent;
  color: var(--text-1);
}

.button--quiet:hover:not(:disabled) {
  border-color: var(--line);
  background: var(--bg-2);
}

.section-action {
  align-self: flex-start;
  margin-left: -9px;
}

.backlinks-disclosure {
  margin-top: -10px;
  color: var(--text-2);
  font-size: 10px;
}

.backlinks-disclosure summary {
  width: fit-content;
  cursor: pointer;
  color: var(--text-1);
}

.backlinks-disclosure .backlink-list {
  margin-top: 7px;
}

.form-actions--flush {
  padding-top: 0;
}

.entity-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.entity-meta button {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--text-2);
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
}

.entity-meta button:hover {
  color: var(--text-1);
}

.entity-meta code {
  overflow: hidden;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-meta button > span {
  flex: 0 0 auto;
  font-size: 9px;
}

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(4, 7, 11, 0.78);
}

.modal {
  display: flex;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg-1);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.32);
}

.modal__header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal__header h2 {
  margin: 0;
  color: var(--text-0);
  font-size: 16px;
  line-height: 1.3;
}

.modal__body {
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-form .compact-editor-section {
  padding-top: 14px;
}

@media (max-width: 440px) {
  .panel-dossier { padding: 16px; }
  .read-field,
  .read-field--editable { grid-template-columns: minmax(76px, 0.34fr) minmax(0, 1fr) auto; }
  .read-field:not(.read-field--editable) { grid-template-columns: minmax(76px, 0.34fr) minmax(0, 1fr); }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { max-height: 92vh; border-radius: 12px 12px 0 0; }
  .modal__body { padding: 16px; }
}
/* T10 graph discovery and view controls */
.search-box {
  position: relative;
  flex: 1 1 220px;
  max-width: 360px;
  min-width: 180px;
}

.search-box > input {
  width: 100%;
  height: 34px;
  padding: 7px 34px 7px 32px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 12px;
}

.search-box > input::placeholder {
  color: #929daf;
  opacity: 1;
}

.search-box > input:hover:not(:disabled) {
  border-color: #536177;
}

.search-box > input:focus {
  border-color: var(--focus);
}

.search-box__icon,
.search-box__status {
  position: absolute;
  z-index: 1;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-1);
  pointer-events: none;
}

.search-box__icon {
  left: 11px;
  font-size: 16px;
}

.search-box__status {
  right: 11px;
}

.search-results {
  position: absolute;
  z-index: 14;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-height: min(360px, calc(100vh - 90px));
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-1);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.32);
}

.search-result {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text-0);
  text-align: left;
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result:hover,
.search-result--active {
  background: var(--bg-3);
}

.search-result span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result small {
  flex: 0 0 auto;
  color: var(--text-2);
  font-size: 10px;
  text-transform: capitalize;
}

.search-results__message {
  margin: 0;
  padding: 12px;
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.45;
}

.toolbar-menu {
  position: relative;
}

.toolbar-menu > summary {
  list-style: none;
}

.toolbar-menu > summary::-webkit-details-marker {
  display: none;
}

.toolbar-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toolbar-summary--active {
  border-color: #8f7730;
  background: #2b2617;
  color: #ffe29a;
}

.toolbar-count {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 9px;
}

.toolbar-popover {
  position: absolute;
  z-index: 13;
  top: calc(100% + 7px);
  right: 0;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg-1);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.32);
}

.toolbar-popover__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.filter-popover {
  width: min(430px, calc(100vw - 28px));
}

.filter-clear-all {
  min-width: 74px;
}

.filter-groups {
  max-height: min(500px, calc(100vh - 120px));
  overflow-y: auto;
}

.filter-group {
  margin: 0;
  border-top: 1px solid var(--line);
}

.filter-group:first-child {
  border-top: 0;
}

.filter-group__summary {
  display: grid;
  min-height: 50px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  padding: 8px 12px;
  color: var(--text-0);
  cursor: pointer;
  list-style: none;
  transition: background-color 160ms ease-out;
}

.filter-group__summary::-webkit-details-marker {
  display: none;
}

.filter-group__summary:hover {
  background: var(--bg-3);
}

.filter-group__summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.filter-group[open] > .filter-group__summary {
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-1));
}

.filter-group__title {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-group__status {
  min-width: 0;
  overflow: hidden;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-group__count {
  grid-row: 1 / 3;
  grid-column: 2;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-3));
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.filter-group__chevron {
  grid-row: 1 / 3;
  grid-column: 3;
  width: 16px;
  height: 16px;
  color: var(--text-2);
  transition: transform 180ms ease-out;
}

.filter-group[open] .filter-group__chevron {
  transform: rotate(180deg);
}

.filter-group__body {
  margin: 0;
  padding: 9px 12px 12px;
  border: 0;
  border-top: 1px solid var(--line);
}

.filter-group__select-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-bottom: 6px;
  color: var(--text-2);
  font-size: 9px;
}

.filter-group__select-actions button {
  padding: 2px 3px;
  border: 0;
  background: transparent;
  color: #80bdff;
  font: inherit;
  font-weight: 700;
}

.filter-group__select-actions button:hover:not(:disabled) {
  color: #b9dcff;
  text-decoration: underline;
}

.filter-group__select-actions button:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

:root[data-theme="light"] .filter-group__select-actions button {
  color: #1a66c2;
}

.filter-group__select-actions button:disabled {
  color: var(--text-2);
  cursor: default;
  opacity: 0.48;
}

.filter-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px 12px;
}

.filter-options label {
  display: flex;
  min-width: 0;
  min-height: 32px;
  align-items: flex-start;
  gap: 7px;
  padding: 6px 4px;
  border-radius: 5px;
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.35;
}

.filter-options label:hover {
  background: var(--bg-3);
  color: var(--text-0);
}

.filter-options input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}

.filter-options span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.filter-empty {
  display: block;
  padding: 8px 4px;
  color: var(--text-2);
  font-size: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .filter-group__summary,
  .filter-group__chevron {
    transition: none;
  }
}
.views-popover {
  width: min(300px, calc(100vw - 28px));
}

.view-list {
  max-height: 260px;
  overflow-y: auto;
}

.view-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text-0);
}

button.view-row,
.view-row > button:first-child {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 0;
  background: transparent;
  color: var(--text-0);
  text-align: left;
}

button.view-row:hover,
.view-row > button:first-child:hover {
  background: var(--bg-3);
}

.view-row span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-row small {
  flex: 0 0 auto;
  color: var(--text-2);
  font-size: 9px;
}

.view-row > .icon-button {
  flex: 0 0 30px;
  margin-right: 4px;
}

.view-save {
  display: flex;
  gap: 7px;
  padding: 10px;
}

.view-save input {
  min-width: 0;
  height: 30px;
  flex: 1 1 auto;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 11px;
}

.view-save input::placeholder {
  color: #929daf;
  opacity: 1;
}

.view-save .button {
  flex: 0 0 auto;
}

.focus-controls {
  position: absolute;
  z-index: 7;
  top: 12px;
  left: 50%;
  display: flex;
  max-width: calc(100% - 28px);
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
  padding: 9px 10px 9px 12px;
  border: 1px solid #8f7730;
  border-radius: 8px;
  background: rgba(27, 25, 18, 0.96);
}

.focus-controls__summary {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
}

.focus-controls__label {
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.focus-controls__summary strong {
  overflow: hidden;
  max-width: 220px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-controls__summary small {
  color: #b7aa80;
  font-size: 10px;
  white-space: nowrap;
}

.focus-controls__error {
  color: #ffb2b2;
  font-size: 10px;
}

.focus-controls__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.timeline-panel {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  display: flex;
  width: min(420px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(18, 23, 31, 0.97);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.32);
}

.focus-controls + .timeline-panel {
  top: 76px;
  max-height: calc(100% - 88px);
}

.timeline-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--line);
}

.timeline-panel__header h2 {
  margin: 0;
  font-size: 15px;
}

.timeline-panel__header p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 10px;
}

.timeline-panel__body {
  min-height: 0;
  overflow-y: auto;
}

.timeline-message {
  padding: 18px 14px;
  color: var(--text-1);
  font-size: 12px;
}

.timeline-message--error {
  color: #ffb2b2;
}

.timeline-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 4px 10px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
}

.timeline-row:last-child {
  border-bottom: 0;
}

.timeline-row time {
  grid-row: 1 / span 2;
  color: #d7c47b;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.timeline-row > strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-row__endpoints {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
}

.timeline-row__endpoints button {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: #80bdff;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-row__endpoints button:hover {
  color: #b9dcff;
  text-decoration: underline;
}

.path-finder {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  display: flex;
  width: min(380px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(18, 23, 31, 0.97);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.32);
}

.focus-controls + .path-finder {
  top: 76px;
  max-height: calc(100% - 88px);
}

.path-finder__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--line);
}

.path-finder__header h2 {
  margin: 0;
  font-size: 15px;
}

.path-finder__header p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 10px;
}

.path-finder__body {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 14px;
}

.path-endpoint {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.path-endpoint__label {
  color: var(--text-2);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.path-endpoint .search-box {
  max-width: none;
  flex: 1 1 auto;
}

.path-endpoint--active .path-endpoint__label {
  color: var(--accent);
}

.path-endpoint--active .search-box > input {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}

.path-pick-hint {
  padding: 7px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 7%, var(--bg-0));
}

.path-pick-hint strong {
  color: var(--accent);
  font-weight: 700;
}

.path-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-0);
}

.path-chip > span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.path-chip__clear {
  display: inline-grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-1);
  font-size: 16px;
  line-height: 1;
  place-items: center;
}

.path-chip__clear:hover {
  background: var(--bg-3);
  color: var(--text-0);
}

.path-endpoint__swap {
  display: flex;
  justify-content: center;
  margin: -4px 0;
}

.path-mode {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-0);
}

.path-mode__option {
  flex: 1 1 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-1);
  font-size: 12px;
  font-weight: 650;
}

.path-mode__option:hover:not(.path-mode__option--active) {
  color: var(--text-0);
  background: var(--bg-3);
}

.path-mode__option--active {
  background: var(--accent);
  color: var(--accent-ink);
}

.path-finder__find {
  width: 100%;
}

.path-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.path-results__message {
  margin: 0;
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.45;
}

.path-results__message--error {
  color: #ffb2b2;
}

.path-results__count {
  margin: 0;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.path-routes {
  display: flex;
  max-height: 40vh;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.path-route {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg-0);
  text-align: left;
}

button.path-route:hover {
  border-color: #536177;
  background: var(--bg-3);
}

.path-route--active {
  border-color: var(--accent);
  background: rgba(255, 209, 102, 0.08);
}

.path-route--static {
  cursor: default;
}

.path-route__count {
  color: #d7c47b;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.path-route__chain {
  color: var(--text-0);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

@media (max-width: 1180px) {
  .topbar {
    flex-wrap: wrap;
  }

  .search-box {
    order: 3;
    max-width: none;
    flex-basis: 100%;
  }

  .topbar-actions {
    flex: 1 1 auto;
  }
}

@media (max-width: 700px) {

  .focus-controls {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .focus-controls__summary {
    flex-wrap: wrap;
  }

  .focus-controls + .timeline-panel {
    top: 116px;
    max-height: calc(100% - 128px);
  }
}

@media (max-width: 440px) {
  .filter-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .timeline-panel {
    right: 8px;
    width: calc(100% - 16px);
  }

  .timeline-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}
/* T27 full-screen entity dossier */
.fullscreen-dossier {
  position: relative;
  z-index: 17;
  display: flex;
  width: 100%;
  height: 100%;
  grid-column: 1;
  grid-row: 2;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background:
    radial-gradient(circle at 86% -10%, rgba(109, 179, 255, 0.1), transparent 32%),
    var(--bg-0);
}

.fullscreen-dossier__header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
  padding: 11px clamp(20px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
}

.fullscreen-dossier__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 20px;
}

.fullscreen-dossier__identity .panel-kicker {
  min-width: 90px;
  margin: 0;
  text-align: right;
}

.fullscreen-dossier__identity h1 {
  display: inline;
  margin: 0 14px 0 0;
  font-size: 26px;
  font-weight: 550;
  line-height: 1.1;
}

.fullscreen-dossier__identity .status-chip,
.fullscreen-dossier__identity .confidence-chip {
  margin: 5px 5px 0 0;
  vertical-align: top;
}

.dossier-collapse {
  flex: 0 0 auto;
}

.dossier-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 0 clamp(20px, 4vw, 58px);
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}

.dossier-tab {
  position: relative;
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  background: transparent;
  color: var(--text-1);
  font-size: 12px;
  font-weight: 650;
}

.dossier-tab:hover {
  color: var(--text-0);
  background: var(--bg-2);
}

.dossier-tab::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  content: "";
  background: transparent;
}

.dossier-tab--active {
  color: var(--text-0);
}

.dossier-tab--active::after {
  background: var(--accent);
}

.fullscreen-dossier__body {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
}

.dossier-main {
  min-width: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

.fullscreen-dossier__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

/* Docked ego-graph pane (dossier-dominant mode's shrunk graph). */
.dossier-map-pane {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
}

.dossier-map-pane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.dossier-map-pane__head .panel-kicker {
  margin: 0;
}

.dossier-map-pane__body {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
}

.mini-graph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dossier-map-pane__note {
  margin: 0;
  padding: 18px 14px;
  color: var(--text-1);
  font-size: 12px;
}

.dossier-map-pane__note--error {
  color: #ffb2b2;
}

.dossier-map-pane__hint {
  margin: 0;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 11px;
  text-align: center;
}

.dossier-map-resize {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 8px;
  margin: 0 -4px;
  cursor: col-resize;
  touch-action: none;
}

.dossier-map-resize::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 42px;
  content: "";
  transform: translate(-50%, -50%);
  border-radius: 3px;
  background: var(--line-strong);
  opacity: 0;
  transition: opacity 120ms ease;
}

.dossier-map-resize:hover::before,
.dossier-map-resize:focus-visible::before,
.dossier-map-resize--dragging::before {
  opacity: 1;
}

.dossier-content {
  width: min(1120px, calc(100% - 40px));
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(22px, 3.5vw, 44px) 0 56px;
}

.dossier-content--overview {
  width: min(820px, calc(100% - 40px));
}

.dossier-content .narrative {
  padding: 0 0 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.dossier-content .narrative__text,
.dossier-content .narrative__empty {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.62;
}

.dossier-content .panel-section {
  gap: 12px;
  padding-top: 18px;
}

.dossier-content .read-field {
  grid-template-columns: minmax(130px, 0.28fr) minmax(0, 1fr);
  padding: 9px 0;
}

.dossier-content .read-field dt,
.dossier-content .read-field dd {
  font-size: 13px;
}

.dossier-backlinks {
  margin: -20px 0 26px;
}

.dossier-message {
  margin: 0;
  padding: 20px 0;
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.55;
}

.dossier-message--error {
  color: #ffb2b2;
}

.dossier-content .connection-group + .connection-group {
  margin-top: 18px;
}

.connection-group > h4 {
  margin: 0 0 7px;
  color: var(--text-2);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dossier-content .connection-row {
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 0.75fr);
}

.dossier-content .connection-row button {
  padding: 13px 10px;
}

.dossier-content .identifier-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}

.dossier-content .source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dossier-content .source-list > li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-1);
}

.dossier-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.dossier-section-heading .panel-kicker {
  margin: 0 0 5px;
}

.dossier-section-heading h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 550;
}

.dossier-section-heading > span,
.evidence-group h3 span {
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
}

.evidence-group + .evidence-group {
  margin-top: 42px;
}

.evidence-group > h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 13px;
  font-size: 14px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.evidence-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-1);
}

.evidence-preview {
  display: grid;
  width: 100%;
  height: 190px;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
    var(--bg-2);
  color: var(--text-0);
  text-decoration: none;
}

.evidence-preview--image {
  padding: 0;
}

.evidence-preview--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease-out;
}

.evidence-preview--image:hover img {
  transform: scale(1.025);
}

.evidence-preview--document {
  align-content: center;
  gap: 8px;
}

.evidence-preview--document > span {
  display: grid;
  width: 62px;
  height: 76px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--bg-1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.evidence-preview--document small {
  color: #80bdff;
}

.evidence-card__body {
  padding: 14px;
}

.evidence-card__body h4 {
  margin: 0 0 13px;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.45;
}

.evidence-custody {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
}

.evidence-custody > div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px;
}

.evidence-custody dt,
.evidence-custody dd {
  min-width: 0;
  margin: 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.4;
}

.evidence-custody dd {
  color: var(--text-1);
  overflow-wrap: anywhere;
}

.evidence-custody a {
  color: #80bdff;
}

.evidence-custody code {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.evidence-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-1);
}

.evidence-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.evidence-filters__row .field {
  flex: 1 1 150px;
}

.evidence-filters__search {
  flex: 2 1 260px;
}

.evidence-filters__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.evidence-filters__count {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
}

.evidence-upload {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 54px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-1);
}

.evidence-upload__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.evidence-upload__heading h3 {
  margin: 0;
  font-size: 15px;
}

.evidence-upload__heading p {
  margin: 5px 0 0;
  color: var(--text-2);
  font-size: 10px;
}

.evidence-kind-chip {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.evidence-upload__fields {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.4fr;
  gap: 12px;
}

.evidence-upload > .button {
  align-self: flex-start;
}

.evidence-file-field input {
  padding: 5px;
}

.evidence-lightbox {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
}

.evidence-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 5, 8, 0.9);
}

.evidence-lightbox__content {
  position: relative;
  display: flex;
  width: min(92vw, 1600px);
  height: 90vh;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-1);
}

.evidence-lightbox__image-pane {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
}

.evidence-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 48px;
  padding: 8px 10px 8px 15px;
}

.evidence-lightbox__bar strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-lightbox__bar > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.evidence-lightbox__bar a {
  color: #80bdff;
  font-size: 11px;
}

.evidence-lightbox__media {
  display: grid;
  min-width: 0;
  min-height: 80px;
  flex: 1 1 auto;
  place-items: center;
  overflow: hidden;
  background: #05070a;
}

.evidence-lightbox__media > img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.evidence-lightbox__detail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 5px 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  color: var(--text-1);
  font-size: 11px;
  text-align: center;
}

.evidence-face-strip {
  position: relative;
  width: 320px;
  min-width: 0;
  min-height: 0;
  flex: 0 0 320px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 14px;
  border-left: 1px solid var(--line);
  background: var(--bg-1);
  scrollbar-gutter: stable;
}

.evidence-face-strip__heading,
.evidence-face-strip__tagger-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.evidence-face-strip__heading {
  margin-bottom: 12px;
}

.evidence-face-strip__heading strong,
.evidence-face-strip__tagger-heading strong {
  color: var(--text-0);
  font-size: 11px;
  font-weight: 650;
}

.evidence-face-strip__faces {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.evidence-face-strip__suggestions {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 8px;
  background: var(--bg-2);
}

.evidence-face-strip__suggestions > strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text-0);
  font-size: 10px;
  font-weight: 650;
}

.evidence-face-strip__suggestions ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evidence-face-strip__suggestions li {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.evidence-face-strip__suggestions li > span {
  overflow: hidden;
  color: var(--text-0);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-face-strip__suggestions li > small {
  color: var(--text-1);
  font-size: 9px;
  line-height: 1.35;
}

.evidence-face-strip__item {
  min-width: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.evidence-face-strip__item:first-child {
  padding-top: 0;
  border-top: 0;
}

.evidence-face-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 8px;
  transition: background-color 160ms ease-out;
}

.evidence-face-row--bound {
  background: color-mix(in srgb, var(--focus) 6%, transparent);
}

.evidence-face-row--active {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-2));
}

.evidence-face-row__thumbnail {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: var(--bg-3);
  object-fit: cover;
}

.evidence-face-row__identity {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
}

.evidence-face-row__name {
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-0);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.evidence-face-row__name {
  color: var(--focus);
  cursor: pointer;
}

button.evidence-face-row__name:hover {
  text-decoration: underline;
}

.evidence-face-row__done {
  color: var(--text-2);
  font-size: 9px;
}

.evidence-face-row__tag {
  flex: 0 0 auto;
}

.evidence-face-strip__tagger {
  min-width: 0;
  margin: 10px 6px 0;
  padding: 12px 0 2px;
  border-top: 1px dashed var(--line-strong);
}

.evidence-face-strip__notice {
  margin: 0 0 12px;
  color: var(--text-1);
  font-size: 10px;
  line-height: 1.45;
}

.evidence-face-strip .face-assignment--compact {
  margin-top: 8px;
  padding-top: 10px;
}

.evidence-face-strip .face-assignment--compact > p:first-of-type {
  max-width: 60ch;
}

.face-assignment__suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.face-assignment__suggestions > span {
  color: var(--text-1);
  font-size: 10px;
  font-weight: 600;
}

.face-assignment__suggestions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.face-assignment__suggestion-chip {
  max-width: 100%;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--text-0);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.face-assignment__suggestion-chip:hover:not(:disabled) {
  border-color: var(--focus);
  color: var(--focus);
}

.face-assignment__suggestion-chip:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.face-assignment__suggestion-chip--selected {
  border-color: var(--focus);
  background: color-mix(in srgb, var(--focus) 12%, var(--bg-2));
  color: var(--focus);
}

.face-assignment__suggestion-chip:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.evidence-face-strip--loading {
  min-height: 0;
}

.evidence-face-strip__loading-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.evidence-face-strip__loading-rows > span {
  width: 100%;
  height: 60px;
  border-radius: 8px;
  background: linear-gradient(100deg, var(--bg-2) 20%, var(--bg-3) 45%, var(--bg-2) 70%);
  background-size: 240% 100%;
  animation: faces-loading-shimmer 1.4s linear infinite;
}

.evidence-face-strip--error {
  color: var(--danger);
  font-size: 11px;
}

.evidence-face-strip__error-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .evidence-face-row {
    transition: none;
  }

  .evidence-face-strip__loading-rows > span {
    animation: none;
  }
}

@media (max-width: 899px) {
  .evidence-lightbox {
    padding: 10px;
  }

  .evidence-lightbox__content {
    width: 100%;
    height: 100%;
    flex-direction: column;
  }

  .evidence-lightbox__image-pane {
    flex: 1 1 auto;
  }

  .evidence-face-strip {
    width: 100%;
    max-height: min(38vh, 320px);
    flex: 0 0 auto;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

.entity-timeline__list {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entity-timeline__list::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 99px;
  width: 1px;
  content: "";
  background: var(--line);
}

.entity-timeline__list li {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(180px, 1fr) minmax(140px, 0.7fr);
  align-items: center;
  gap: 36px;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.entity-timeline__list li::before {
  position: absolute;
  left: 95px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--bg-0);
  border-radius: 50%;
  content: "";
  background: var(--accent);
}

.entity-timeline__list time {
  color: #d7c47b;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.entity-timeline__list strong {
  font-size: 13px;
}

.entity-timeline__list p {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 10px;
}

.entity-timeline__list button {
  justify-self: start;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #80bdff;
  font-size: 12px;
  text-align: left;
}

@media (max-width: 850px) {
  .fullscreen-dossier__identity .panel-kicker { display: none; }
  .evidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-upload__fields { grid-template-columns: 1fr; }
  /* Stack the ego-graph below the dossier body on narrow viewports. */
  .fullscreen-dossier__body { flex-direction: column; }
  .dossier-map-resize { display: none; }
  .dossier-map-pane {
    flex: 0 0 auto;
    height: 240px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .dossier-content .source-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .fullscreen-dossier__header { min-height: 72px; padding: 12px 16px; }
  .fullscreen-dossier__identity h1 { display: block; margin: 0; font-size: 22px; }
  .dossier-tabs { padding: 0 8px; }
  .dossier-tab { padding: 0 11px; }
  .dossier-content { width: calc(100% - 28px); padding-top: 28px; }
  .evidence-grid,
  .dossier-content .identifier-list { grid-template-columns: 1fr; }
  .dossier-content .connection-row { grid-template-columns: minmax(0, 1fr); }
  .entity-timeline__list::before,
  .entity-timeline__list li::before { display: none; }
  .entity-timeline__list li { grid-template-columns: 82px minmax(0, 1fr); gap: 10px; padding: 12px 0; }
  .entity-timeline__list li > button { grid-column: 2; }
  .evidence-lightbox { padding: 10px; }
}

/* T35 time-bar */
.timebar {
  position: absolute;
  z-index: 7;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(18, 23, 31, 0.96);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}

.timebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.timebar__summary {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.timebar__label {
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.timebar__summary strong {
  font-size: 12px;
  white-space: nowrap;
}

.timebar__summary small {
  overflow: hidden;
  color: var(--text-2);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timebar__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.timebar__chart {
  position: relative;
  height: 68px;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.timebar__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 100%;
  height: 100%;
}

.timebar__bar-cell {
  display: flex;
  flex: 1 1 0;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  height: 100%;
}

.timebar__bar {
  width: 100%;
  min-height: 0;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  transition: background-color 120ms ease;
}

.timebar__bar--muted {
  background: #3a4658;
}

.timebar__selection {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid rgba(255, 209, 102, 0.6);
  border-right: 1px solid rgba(255, 209, 102, 0.6);
  background: rgba(255, 209, 102, 0.1);
  pointer-events: none;
}

.timebar__handle {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 10px;
  margin-left: -5px;
  cursor: ew-resize;
  touch-action: none;
}

.timebar__handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--accent);
}

.timebar__axis {
  display: flex;
  gap: 2px;
  width: 100%;
}

.timebar__tick {
  overflow: hidden;
  flex: 1 1 0;
  min-width: 0;
  color: var(--text-2);
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .timebar__summary small { display: none; }
  .timebar__chart { height: 54px; }
}

/* T34 map view
   Leaflet renders the RI precinct polygons as vectors on a blank dark canvas —
   no tiles, no external URLs. These rules override Leaflet's default light
   chrome (popups, zoom control) for the dark theme. */

.view-toggle {
  display: inline-flex;
  align-items: stretch;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-1);
}

.view-toggle__option {
  min-height: 26px;
  padding: 4px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-1);
  font-size: 12px;
  font-weight: 650;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}

.view-toggle__option:hover:not(.view-toggle__option--active) {
  color: var(--text-0);
}

.view-toggle__option--active {
  background: var(--bg-3);
  color: var(--text-0);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* --- Analytic node-styling control: Style mode + centrality measure (marked block) --- */
.style-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.style-control__label {
  color: var(--text-2);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.style-seg {
  display: inline-flex;
  align-items: stretch;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-1);
}

.style-seg__option {
  min-height: 24px;
  padding: 3px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-1);
  font-size: 12px;
  font-weight: 650;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}

.style-seg__option:hover:not(.style-seg__option--active):not(:disabled) {
  color: var(--text-0);
}

.style-seg__option--active {
  background: var(--bg-3);
  color: var(--text-0);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.style-control__measure {
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-1);
  color: var(--text-0);
  font-size: 12px;
}

.legend-caption {
  margin-bottom: 2px;
  color: var(--text-0);
  font-size: 11px;
  font-weight: 650;
}
/* --- end analytic node-styling control --- */

.map-view {
  position: relative;
  width: 100%;
  height: 100%;
}

.map-canvas {
  width: 100%;
  height: 100%;
  /* The blank dark basemap the precinct vectors are drawn on. */
  background: var(--bg-0);
}

.map-view--compact .map-canvas {
  border-radius: 8px;
}

/* Leaflet panes/controls should never paint the default light background. */
.map-canvas.leaflet-container {
  background: var(--bg-0);
  font: inherit;
  outline: none;
}

.map-note {
  position: absolute;
  z-index: 500;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(18, 23, 31, 0.92);
  color: var(--text-1);
  font-size: 12px;
  pointer-events: none;
}

/* Leaflet zoom control, dark theme */
.map-canvas .leaflet-bar {
  border: 1px solid var(--line-strong);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.map-canvas .leaflet-bar a {
  background: var(--bg-2);
  color: var(--text-0);
  border-bottom-color: var(--line);
}

.map-canvas .leaflet-bar a:hover {
  background: var(--bg-3);
}

/* Leaflet popup, dark theme */
.map-canvas .leaflet-popup-content-wrapper,
.map-canvas .leaflet-popup-tip {
  background: var(--bg-2);
  color: var(--text-0);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.map-canvas .leaflet-popup-content {
  margin: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
}

.map-canvas .leaflet-popup-close-button {
  color: var(--text-2);
}

.map-canvas .leaflet-popup-close-button:hover {
  color: var(--text-0);
}

.map-popup__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-0);
}

.map-popup__addr {
  margin-top: 3px;
  color: var(--text-1);
}

.map-popup__grid {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 3px;
}

.map-popup__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.map-popup__row span {
  color: var(--text-2);
}

.map-popup__row strong {
  color: var(--text-0);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* T16 lead inbox */
.lead-inbox {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  display: flex;
  width: min(400px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(18, 23, 31, 0.97);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.32);
}

.lead-inbox__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--line);
}

.lead-inbox__header h2 {
  margin: 0;
  font-size: 15px;
}

.lead-inbox__header p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 10px;
}

.lead-inbox__body {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 14px;
}

.lead-add {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lead-add input,
.lead-add select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 13px;
  font-weight: 450;
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
}

.lead-add input:hover:not(:disabled),
.lead-add select:hover:not(:disabled) {
  border-color: #536177;
}

.lead-add input:focus,
.lead-add select:focus {
  border-color: var(--focus);
  background: #101722;
}

.lead-add input::placeholder {
  color: #929daf;
  opacity: 1;
}

.lead-add__row {
  display: flex;
  gap: 8px;
}

.lead-add__row select {
  flex: 1 1 0;
  text-transform: capitalize;
}

.lead-add__row .button {
  flex: 0 0 auto;
}

/* T16b: inline "possible duplicate" hint under the lead quick-add text input.
   Reuses .search-result row styling from the node search box (see the
   .node-picker comment near it) so both read as one system, but the wrapper
   here sits in normal document flow -- this hint is a persistent advisory,
   not a closeable dropdown, so it must never overlay the URL field below it. */
.lead-dup-hint {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-1);
  overflow: hidden;
}

.lead-dup-hint .search-result {
  width: 100%;
  padding: 7px 10px;
}

.lead-dup-hint__row:not(button):hover {
  background: transparent;
}

.lead-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-0);
}

.lead-filter__option {
  flex: 1 1 0;
  padding: 5px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-1);
  font-size: 11px;
  font-weight: 650;
  text-transform: capitalize;
}

.lead-filter__option:hover:not(.lead-filter__option--active) {
  color: var(--text-0);
  background: var(--bg-3);
}

.lead-filter__option--active {
  background: var(--accent);
  color: var(--accent-ink);
}

.lead-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lead-results__message {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.45;
}

.lead-results__message--error {
  color: var(--danger);
}

.lead-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lead-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-1);
}

.lead-row--stale {
  border-color: #8f7730;
  background: #211d13;
}

.lead-row__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 10px;
  font-weight: 650;
  text-transform: capitalize;
}

.lead-chip--priority-high {
  background: #3a1e22;
  color: #ff9d9d;
}

.lead-chip--priority-medium {
  background: #2b2617;
  color: #ffe29a;
}

.lead-chip--priority-low {
  background: var(--bg-3);
  color: var(--text-2);
}

.lead-chip--status-open {
  background: #16283a;
  color: #8dc2ff;
}

.lead-chip--status-exploring {
  background: #2b2617;
  color: #ffe29a;
}

.lead-chip--status-promoted {
  background: #16301f;
  color: #83d3a1;
}

.lead-chip--status-cold {
  background: var(--bg-3);
  color: var(--text-2);
  opacity: 0.8;
}

.lead-stale {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px dashed #8f7730;
  border-radius: 999px;
  color: #ffcf7a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lead-row__age {
  margin-left: auto;
  color: var(--text-2);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.lead-row__text {
  margin: 0;
  color: var(--text-0);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
}

.lead-row__url {
  overflow: hidden;
  color: var(--focus);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-row__origin {
  align-self: flex-start;
  max-width: 100%;
  overflow: hidden;
  color: var(--accent);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-row__note {
  margin: 0;
  padding: 6px 8px;
  border-left: 2px solid var(--line-strong);
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.lead-row__controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 2px;
}

.lead-row__status {
  height: 28px;
  padding: 4px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 11px;
  text-transform: capitalize;
}

.lead-row__delete {
  color: var(--danger);
}

.lead-row__delete:hover:not(:disabled) {
  color: var(--danger);
  background: #2b1c23;
}

.lead-note-edit {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead-note-edit__input {
  width: 100%;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 12px;
  font-weight: 450;
  line-height: 1.45;
  resize: vertical;
}

.lead-note-edit__input:focus {
  border-color: var(--focus);
  background: #101722;
}

.lead-note-edit__actions {
  display: flex;
  gap: 4px;
}

.lead-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #6a3c45;
  border-radius: 7px;
  background: #211318;
  color: var(--text-1);
  font-size: 11px;
}

.lead-confirm__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

/* T54 issues browse panel */
.issues-panel {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  display: flex;
  width: min(380px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(18, 23, 31, 0.97);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.32);
}

.focus-controls + .issues-panel {
  top: 76px;
  max-height: calc(100% - 88px);
}

.issues-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--line);
}

.issues-panel__header h2 {
  margin: 0;
  font-size: 15px;
}

.issues-panel__header p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 10px;
}

.issues-panel__body {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 14px;
}

.issues-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-1);
}

.issues-panel__detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.issues-panel__back {
  align-self: flex-start;
}

.issues-panel__issue-name {
  margin: 0;
  color: var(--text-0);
  font-size: 16px;
}

.issues-panel__issue-summary {
  margin: 0;
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.45;
}

.issues-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.issues-results__message {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.45;
}

.issues-results__message--error {
  color: var(--danger);
}

.issues-stance-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.issues-stance-group__label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text-1);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.issues-stance-group__label--supports {
  color: #83d3a1;
}

.issues-stance-group__label--opposes {
  color: #ff9d9d;
}

.issues-stance-group__label--advocates {
  color: #8dc2ff;
}

.issues-stance-group__count {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 650;
}

.issues-actor-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-1);
}

.issues-actor-row {
  width: 100%;
}

/* T50 Faces panel — Immich people-cluster gallery + assign-to-node flow.
   Same floating-panel family as .lead-inbox / .issues-panel / .path-finder /
   .timeline-panel (top-left, mutually exclusive, glass-over-canvas chrome). */
.faces-panel {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  display: flex;
  width: min(420px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(18, 23, 31, 0.97);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.32);
}

.focus-controls + .faces-panel {
  top: 76px;
  max-height: calc(100% - 88px);
}

.faces-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--line);
}

.faces-panel__header h2 {
  margin: 0;
  font-size: 15px;
}

.faces-panel__header p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 10px;
}

.faces-panel__body {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 14px;
}

.faces-results {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faces-results__message {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.45;
}

.faces-results__message--error {
  color: var(--danger);
}

.faces-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faces-section__label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text-1);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.faces-section__count {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 650;
}

.faces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.faces-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-1);
}

.faces-card__thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-3);
}

.faces-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.faces-card__name {
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-0);
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.faces-card__name:hover {
  color: var(--focus);
  text-decoration: underline;
}

.faces-card__name--muted {
  color: var(--text-2);
  font-weight: 550;
}

.faces-card__name--unlinked {
  color: var(--text-1);
  cursor: default;
}

.faces-card__meta {
  color: var(--text-2);
  font-size: 10px;
}

.faces-card__action {
  align-self: flex-start;
  padding: 0;
}

.faces-assign {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* T16 flag-for-investigation */
.flag-lead {
  white-space: nowrap;
}

.flag-lead--done,
.flag-lead--done:disabled {
  border-color: #2f6a45;
  background: #16301f;
  color: #83d3a1;
  opacity: 1;
}

.flag-lead__error {
  align-self: center;
  color: var(--danger);
  font-size: 10px;
  font-weight: 650;
}

/* add-form overhaul */
/* Name-based node autocomplete for the Add edge form. Reuses the search-bar
   dropdown styling (.search-results / .search-result) so both read as one
   system; this block only positions the dropdown and tunes the two-line item. */
.node-picker {
  position: relative;
  width: 100%;
}

.node-picker .search-result {
  gap: 10px;
}

.node-picker__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-picker__meta {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

/* --- P1 pane divider grip + collapse/expand (marked block) --- */
/* Square-ish glyph buttons in the top bar (theme + panel toggles). */
.icon-toggle {
  min-width: 34px;
  padding: 6px 8px;
  text-align: center;
  font-size: 14px;
  line-height: 1;
}

/* Centered dot grip so the divider is discoverable without hovering. */
.pane-resize-handle__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.pane-resize-handle__grip span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-2);
  transition: background-color 160ms ease-out;
}

.pane-resize-handle:hover .pane-resize-handle__grip span,
.pane-resize-handle:focus-visible .pane-resize-handle__grip span,
.pane-resize-handle--dragging .pane-resize-handle__grip span {
  background: var(--focus);
}

/* Collapse button rides the divider; chrome comes from .edge-toggle. */
.pane-resize-handle__collapse {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
}

/* Thin coloured strip shown in place of the pane when collapsed — same fill as
   the left rail, so both collapsed edges read as "there's more here." */
.pane-collapsed-strip {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  background: var(--bg-2);
  border-left: 1px solid var(--line);
}

/* The expand toggle sits INSIDE the collapsed strip (mirrors the left rail's
   compact chevron); the divider collapse toggle is the one that rides the edge. */
.pane-expand {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
}
/* --- end P1 pane divider grip + collapse/expand --- */

/* --- P3 legend collapse/expand (marked block) --- */
.legend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.legend-header__title {
  color: var(--text-2);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.legend-collapse {
  width: 22px;
  height: 22px;
  font-size: 16px;
}

.legend-pill {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 5;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 23, 31, 0.9);
  backdrop-filter: blur(6px);
  color: var(--text-1);
  font-size: 11px;
  font-weight: 650;
  transition: color 160ms ease-out, border-color 160ms ease-out;
}

.legend-pill:hover {
  color: var(--text-0);
  border-color: var(--line-strong);
}
/* --- end P3 legend collapse/expand --- */

/* --- P4 popover heading actions (Filters/Views close controls) --- */
.toolbar-popover__heading-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
/* --- end P4 popover heading actions --- */

/* --- T49 on-canvas zoom indicator + controls (marked block) --- */
.zoom-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 31, 0.9);
  backdrop-filter: blur(6px);
}

.zoom-controls button {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-1);
  font-size: 15px;
  line-height: 1;
  transition: background-color 140ms ease-out, color 140ms ease-out;
}

.zoom-controls button:hover:not(:disabled) {
  background: var(--bg-3);
  color: var(--text-0);
}

.zoom-controls__level {
  min-width: 46px;
  padding: 0 6px;
  color: var(--text-1);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.zoom-controls__icon {
  width: 17px;
  height: 17px;
}
/* --- end T49 on-canvas zoom indicator + controls --- */

/* On-canvas node/edge count — bottom-center, between legend (left) and zoom (right). */
.graph-count {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 6;
  transform: translateX(-50%);
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 31, 0.9);
  backdrop-filter: blur(6px);
  color: var(--text-1);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 720px) {
  .graph-count { display: none; }
}

/* --- P2 light theme (marked block) --- */
/* Light overrides for the CSS-variable-driven chrome. The graph canvas + its
   floating overlays stay dark by design (node/edge colors are JS-set for a dark
   stage), so only the surrounding chrome flips. */
:root[data-theme="light"] {
  --bg-0: #f4f6fa;
  --bg-1: #ffffff;
  --bg-2: #eef1f6;
  --bg-3: #e2e7ef;
  --line: #d4dae3;
  --line-strong: #b7c0cd;
  --text-0: #1a2230;
  --text-1: #45505f;
  --text-2: #6b7686;
  --accent: #ffd166;
  --accent-ink: #211a08;
  --danger: #c23434;
  --focus: #2f6fd6;
  --snapshot-added: #1c7a43;
  --snapshot-changed: #8a5a00;
  color-scheme: light;
}

/* Light graph stage: the Cytoscape nodes/labels flip to theme-aware colors
   (see buildStylesheet in GraphCanvas), so the canvas itself goes light with a
   subtle dark grid + white radial. background-size carries over from the base
   .canvas-wrap rule (only image + color are overridden here). */
:root[data-theme="light"] .canvas-wrap {
  background-color: var(--bg-0);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 50% 40%, #ffffff 0%, var(--bg-0) 70%);
}

/* On-canvas overlays are hardcoded dark surfaces in the base theme; flip them
   to light panels so they read on the now-light canvas. Data-colored bits
   inside the legend (type swatches, confidence lines) stay as-is. */
:root[data-theme="light"] .zoom-controls,
:root[data-theme="light"] .graph-count,
:root[data-theme="light"] .legend,
:root[data-theme="light"] .legend-pill {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--line);
}

:root[data-theme="light"] .zoom-controls button,
:root[data-theme="light"] .zoom-controls__level,
:root[data-theme="light"] .graph-count,
:root[data-theme="light"] .legend,
:root[data-theme="light"] .legend-pill {
  color: var(--text-1);
}

/* The brand mark is a light-grey glyph tuned for the dark bar; darken it here. */
:root[data-theme="light"] .brand-mark {
  color: #5b6675;
}

/* Button press flash is a hardcoded dark; use a light press tint instead. */
:root[data-theme="light"] .button:active:not(:disabled) {
  background: var(--bg-3);
}

/* Focused inputs flip to a dark fill in the base theme; keep them light here so
   the dark input text stays readable while editing. */
:root[data-theme="light"] .field input:focus,
:root[data-theme="light"] .field select:focus,
:root[data-theme="light"] .property-row input:focus,
:root[data-theme="light"] .narrative__editor textarea:focus,
:root[data-theme="light"] .search-box > input:focus {
  background: #ffffff;
}

/* Narrative body uses a hardcoded light-grey ink; restore contrast on light. */
:root[data-theme="light"] .narrative__text {
  color: var(--text-0);
}
/* --- end P2 light theme --- */
/* --- Info popover: a small "ⓘ" trigger revealing an explanatory panel. --- */
.info-popover {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.info-popover__trigger {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-1);
  color: var(--text-2);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: color 120ms ease-out, border-color 120ms ease-out;
}

.info-popover__trigger:hover,
.info-popover__trigger:focus-visible,
.info-popover__trigger--active {
  color: var(--accent);
  border-color: var(--accent);
}

.info-popover__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: 320px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-3);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  color: var(--text-1);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: left;
  cursor: default;
}

.info-popover__title {
  margin-bottom: 6px;
  color: var(--text-0);
  font-size: 13px;
  font-weight: 700;
}

.info-popover__body p {
  margin: 0 0 8px;
}

.info-popover__body p:last-child {
  margin-bottom: 0;
}

.info-popover__body strong {
  color: var(--text-0);
}

.info-popover__body dfn {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

/* --- T41 left icon rail (activity-bar) --- */
.left-rail {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 54px;
  min-height: 0;
  padding: 50px 0 8px;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  transition: width 160ms ease-out;
}

/* Compact: the toggle sits inside the rail's margin. Labeled: it moves out to
   straddle the right border, mirroring the profile-pane toggle. */
.left-rail__toggle {
  position: absolute;
  top: 12px;
  right: 50%;
  z-index: 9;
  transform: translateX(50%);
  transition: right 160ms ease-out, transform 160ms ease-out;
}

.left-rail--labeled .left-rail__toggle {
  right: -13px;
  transform: none;
}

/* Expanded: icons keep their place, labels appear, rail widens. */
.left-rail--labeled {
  width: 178px;
  align-items: stretch;
}

.left-rail__items {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.left-rail--labeled .left-rail__items {
  align-items: stretch;
}

.left-rail__group {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.left-rail__group + .left-rail__group::before {
  content: "";
  width: 26px;
  height: 1px;
  margin: 5px 0;
  background: var(--line);
}

.left-rail__group-label {
  display: none;
}

.left-rail--labeled .left-rail__group {
  align-items: stretch;
}

.left-rail--labeled .left-rail__group + .left-rail__group::before {
  display: none;
}

.left-rail--labeled .left-rail__group-label {
  display: block;
  padding: 7px 12px 3px;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 700;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.rail-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-1);
  cursor: pointer;
  list-style: none;
  transition: background-color 140ms ease-out, color 140ms ease-out, border-color 140ms ease-out;
}

.rail-item::-webkit-details-marker {
  display: none;
}

.rail-item:hover:not(:disabled) {
  background: var(--bg-3);
  color: var(--text-0);
}

.rail-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.rail-item--active {
  background: #2b2617;
  border-color: #8f7730;
  color: #ffe29a;
}

.rail-item__icon {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
}

.rail-item__label {
  display: none;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.left-rail--labeled .rail-item {
  width: 100%;
  justify-content: flex-start;
  padding: 0 12px;
}

.left-rail--labeled .toolbar-menu--rail,
.left-rail--labeled .toolbar-menu--rail .rail-item {
  width: 100%;
}

.left-rail--labeled .rail-item__label {
  display: inline;
}

.rail-item__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  display: grid;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 9px;
  font-weight: 700;
}

/* In labeled mode the badge sits inline at the row's end, not corner-pinned. */
.left-rail--labeled .rail-item__badge {
  position: static;
  margin-left: auto;
}

/* The rail toggle points right (expand); flips to point left once expanded. */
.left-rail__toggle .edge-toggle__chevron {
  transition: transform 160ms ease-out;
}

.left-rail--labeled .left-rail__toggle .edge-toggle__chevron {
  transform: rotate(180deg);
}

/* Rail popovers open to the RIGHT of the icon instead of below it. */
.toolbar-menu--rail {
  display: block;
}

.toolbar-menu--rail .toolbar-popover {
  position: fixed;
  right: auto;
}

.rail-popover {
  min-width: 210px;
}

.legend-body {
  min-width: 190px;
}

.rail-popover__body {
  padding: 12px;
}

.rail-popover__body .style-control {
  flex-wrap: wrap;
}

/* Inline, expandable "what do these mean?" help in the Style popover — replaces
   a nested ⓘ popover that got clipped against the left edge. */
.style-help {
  flex: 1 0 100%;
  margin-top: 2px;
}

.style-help > summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  color: var(--text-2);
  font-size: 11px;
  cursor: pointer;
  list-style: none;
}

.style-help > summary::-webkit-details-marker {
  display: none;
}

.style-help > summary::before {
  content: "i";
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
}

.style-help[open] > summary {
  margin-bottom: 8px;
  color: var(--text-1);
}

.style-help__body {
  max-width: 250px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-1);
}

.style-help__body p {
  margin: 0 0 8px;
}

.style-help__body p:last-child {
  margin-bottom: 0;
}

.style-help__body strong {
  color: var(--text-0);
}

.style-help__body dfn {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

/* Shared chrome for the matching left-rail and profile-pane edge toggles. */
.edge-toggle {
  display: grid;
  place-items: center;
  width: 26px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-3);
  color: var(--text-0);
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  transition: background-color 140ms ease-out, color 140ms ease-out, border-color 140ms ease-out;
}

.edge-toggle:hover,
.edge-toggle:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1206;
}

.edge-toggle__chevron {
  width: 16px;
  height: 16px;
}

@media (max-width: 720px) {
  .left-rail { display: none; }
}

/* T55 / GB2 — ACH (Analysis of Competing Hypotheses) board */
.ach-board {
  position: relative;
  z-index: 18;
  display: flex;
  width: 100%;
  height: 100%;
  grid-column: 1;
  grid-row: 2;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background:
    radial-gradient(circle at 86% -10%, rgba(109, 179, 255, 0.1), transparent 32%),
    var(--bg-0);
}

.ach-board__header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
  padding: 11px clamp(20px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
}

.ach-board__header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 550;
}

.ach-board__header .panel-kicker {
  margin: 0 0 3px;
}

.ach-board__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.ach-board__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px clamp(20px, 4vw, 58px) 40px;
}

.ach-board__empty {
  max-width: 480px;
  margin: 60px auto 0;
  text-align: center;
}

.ach-board__empty h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.ach-board__empty p {
  margin: 0 0 20px;
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.55;
}

.ach-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.ach-add-form input {
  flex: 1 1 260px;
  min-width: 0;
  height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 13px;
}

.ach-add-form input:focus {
  border-color: var(--focus);
  background: #101722;
  outline: none;
}

.ach-add-form--empty {
  flex-wrap: nowrap;
  justify-content: center;
}

.ach-add-form--empty input {
  flex: 1 1 auto;
}

.ach-matrix-scroll {
  max-height: calc(100vh - 300px);
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ach-matrix {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.ach-matrix th,
.ach-matrix td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ach-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: var(--bg-2);
}

.ach-matrix__corner {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 220px;
  color: var(--text-1);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--bg-2);
}

.ach-matrix__corner-hint {
  display: block;
  margin-top: 3px;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 450;
  letter-spacing: normal;
  text-transform: none;
}

.ach-hyp-col {
  min-width: 190px;
  max-width: 240px;
}

.ach-hyp-col--surviving {
  background: rgba(255, 209, 102, 0.14);
}

.ach-hyp-col__badge {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ach-hyp-col__text {
  margin: 0 0 8px;
  color: var(--text-0);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
}

.ach-hyp-col__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ach-hyp-col__delete {
  color: var(--danger);
}

.ach-hyp-col__confirm {
  display: flex;
  gap: 4px;
}

.ach-hyp-rename {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ach-hyp-rename input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--focus);
  border-radius: 5px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 13px;
}

.ach-hyp-rename__actions {
  display: flex;
  gap: 6px;
}

.ach-evidence-row {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 220px;
  max-width: 260px;
  padding: 10px 12px;
  background: var(--bg-1);
}

.ach-evidence-row a {
  display: block;
  overflow: hidden;
  color: var(--text-0);
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ach-evidence-row a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.ach-evidence-row__diagnosticity {
  display: inline-block;
  margin-top: 5px;
  color: var(--text-2);
  font-size: 10px;
}

.ach-matrix__no-evidence {
  padding: 20px 12px;
  color: var(--text-1);
  font-size: 12px;
}

.ach-cell {
  min-width: 190px;
  padding: 0;
}

.ach-cell select {
  width: 100%;
  height: 100%;
  min-height: 44px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--text-0);
  font-size: 11px;
  cursor: pointer;
}

.ach-cell select:disabled {
  cursor: wait;
  opacity: 0.6;
}

.ach-cell select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.ach-cell--unset { background: var(--bg-0); }
.ach-cell--CC { background: rgba(60, 179, 113, 0.32); }
.ach-cell--C { background: rgba(60, 179, 113, 0.16); }
.ach-cell--N { background: rgba(148, 158, 173, 0.16); }
.ach-cell--I { background: rgba(255, 159, 67, 0.2); }
.ach-cell--II { background: rgba(255, 107, 107, 0.32); }
.ach-cell--NA {
  background: repeating-linear-gradient(
    135deg,
    var(--bg-0),
    var(--bg-0) 6px,
    var(--bg-1) 6px,
    var(--bg-1) 12px
  );
}

.ach-matrix tfoot th,
.ach-matrix tfoot td {
  position: sticky;
  bottom: 0;
  border-top: 2px solid var(--line-strong);
  border-bottom: 0;
  background: var(--bg-2);
  font-weight: 700;
}

.ach-matrix tfoot th {
  left: 0;
  z-index: 3;
  padding: 10px 12px;
  color: var(--text-1);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ach-matrix tfoot td {
  padding: 10px 12px;
  color: var(--text-0);
  font-size: 15px;
  text-align: center;
}

.ach-score--surviving {
  color: var(--accent);
}

.ach-add-evidence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.ach-add-evidence label {
  color: var(--text-1);
  font-size: 12px;
  font-weight: 650;
}

.ach-add-evidence input {
  flex: 1 1 280px;
  min-width: 0;
  height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 13px;
}

.ach-add-evidence__error {
  color: var(--danger);
  font-size: 12px;
}

@media (max-width: 850px) {
  .ach-board__header { min-height: 72px; padding: 12px 16px; }
  .ach-board__header .panel-kicker { display: none; }
  .ach-board__body { padding: 18px 16px 32px; }
  .ach-matrix-scroll { max-height: calc(100vh - 220px); }
}
/* --- end T41 left icon rail --- */
/* GC5 / T22 investigations and case-scoped graph view */
.cases-panel {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  display: flex;
  width: min(400px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-1);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.3);
}

.cases-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--line);
}

.cases-panel__header h2 {
  margin: 0;
  font-size: 15px;
}

.cases-panel__header p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 10px;
}

.cases-panel__body {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 14px;
}

.case-create {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-create input,
.case-create textarea,
.node-cases__add select {
  width: 100%;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 13px;
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
}

.case-create input {
  height: 34px;
}

.case-create textarea {
  min-height: 54px;
  line-height: 1.4;
  resize: vertical;
}

.case-create input:hover:not(:disabled),
.case-create textarea:hover:not(:disabled),
.node-cases__add select:hover:not(:disabled) {
  border-color: var(--text-2);
}

.case-create input:focus,
.case-create textarea:focus,
.node-cases__add select:focus {
  border-color: var(--focus);
}

.case-create input::placeholder,
.case-create textarea::placeholder {
  color: var(--text-2);
  opacity: 1;
}

.case-create .button {
  align-self: flex-start;
}

.case-active-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid #8f7730;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-1));
}

.case-active-summary > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.case-active-summary span {
  color: var(--text-2);
  font-size: 10px;
}

.case-active-summary strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-results__message {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.45;
}

.case-results__message--error {
  color: var(--danger);
}

.case-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  list-style: none;
}

.case-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}

.case-row:last-child {
  border-bottom: 0;
}

.case-row--active {
  background: color-mix(in srgb, var(--accent) 9%, var(--bg-1));
}

.case-row__select {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 10px 11px;
  border: 0;
  background: transparent;
  color: var(--text-0);
  text-align: left;
}

.case-row__select:hover:not(:disabled) {
  background: var(--bg-2);
}

.case-row__name {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-row__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-2);
  font-size: 10px;
}

.case-status {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 7px;
  border-radius: 999px;
  text-transform: capitalize;
}

.case-status--open {
  background: #16301f;
  color: #83d3a1;
}

.case-status--closed {
  background: var(--bg-3);
  color: var(--text-1);
}

:root[data-theme="light"] .case-status--open {
  background: #dff3e5;
  color: #24613a;
}

.case-row__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 4px;
  border-left: 1px solid var(--line);
}

.case-row__actions .text-button {
  padding-inline: 5px;
  font-size: 10px;
}

.case-row__delete {
  color: var(--danger);
}
.saved-reports {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.saved-reports__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.saved-reports__heading h3 {
  margin: 0;
  color: var(--text-0);
  font-size: 13px;
}

.saved-reports__heading p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.4;
}

.saved-report-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  list-style: none;
}

.saved-report-row {
  display: flex;
  min-width: 0;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.saved-report-row:last-child {
  border-bottom: 0;
}

.saved-report-row__open {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 11px;
  border: 0;
  background: transparent;
  color: var(--text-0);
  text-align: left;
}

.saved-report-row__open:hover:not(:disabled) {
  background: var(--bg-2);
}

.saved-report-row__open:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.saved-report-row__open strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-report-row__open span {
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.35;
}

.saved-report-row > .text-button {
  flex: 0 0 auto;
  align-self: center;
  margin-right: 7px;
  font-size: 10px;
}


.case-scope-controls {
  position: absolute;
  z-index: 7;
  top: 12px;
  right: 12px;
  display: flex;
  max-width: min(460px, calc(100% - 24px));
  align-items: center;
  gap: 14px;
  padding: 8px 9px 8px 11px;
  border: 1px solid #8f7730;
  border-radius: 8px;
  background: var(--bg-1);
  color: var(--text-0);
}

.case-scope-controls__summary {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
}

.case-scope-controls__summary > span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.case-scope-controls__summary strong {
  overflow: hidden;
  max-width: 180px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-scope-controls__summary small {
  color: var(--text-2);
  font-size: 10px;
  white-space: nowrap;
}

.case-scope-controls__summary em {
  overflow: hidden;
  max-width: 160px;
  color: var(--danger);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-cases {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.node-case-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  list-style: none;
}

.node-case-list li {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 4px 5px 4px 9px;
  border-bottom: 1px solid var(--line);
}

.node-case-list li:last-child {
  border-bottom: 0;
}

.node-case-list li > span {
  overflow: hidden;
  color: var(--text-0);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-cases__add {
  display: flex;
  gap: 8px;
}

.node-cases__add select {
  flex: 1 1 auto;
  height: 34px;
}

.node-cases__add .button {
  flex: 0 0 auto;
}

.node-cases__empty {
  margin: 0;
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .cases-panel {
    top: 8px;
    left: 8px;
    width: calc(100% - 16px);
    max-height: calc(100% - 16px);
  }

  .case-scope-controls {
    top: 8px;
    right: 8px;
    max-width: calc(100% - 16px);
  }

  .case-scope-controls__summary small {
    display: none;
  }
}

/* GC4 / T11 duplicate detection and identity resolution */
.dedup-panel {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  display: flex;
  width: min(720px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-1);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.3);
}

.dedup-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--line);
}

.dedup-panel__header h2 {
  margin: 0;
  font-size: 15px;
}

.dedup-panel__header p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 10px;
}

.dedup-panel__body {
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

.dedup-results,
.dedup-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dedup-message {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.45;
}

.dedup-message--error {
  color: var(--danger);
}

.dedup-empty {
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  text-align: center;
}

.dedup-empty strong {
  font-size: 13px;
}

.dedup-empty p {
  max-width: 50ch;
  margin: 5px auto 0;
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.5;
}

.dedup-list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  list-style: none;
}

.dedup-list li + li {
  border-top: 1px solid var(--line);
}

.dedup-row {
  display: grid;
  width: 100%;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 4px 10px;
  padding: 11px;
  border: 0;
  background: var(--bg-1);
  color: var(--text-0);
  text-align: left;
}

.dedup-row:hover {
  background: var(--bg-2);
}

.dedup-row__score {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.dedup-row__pair {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.dedup-row__pair strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dedup-row__pair > span {
  color: var(--text-2);
}

.dedup-row small {
  overflow: hidden;
  color: var(--text-2);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dedup-detail__back {
  align-self: flex-start;
}

.dedup-detail__match {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dedup-detail__match p {
  margin: 0;
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.4;
}

.dedup-score {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 13%, var(--bg-2));
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.dedup-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.dedup-compare__node {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-0);
}

.dedup-compare__node--target {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.dedup-compare__role {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.dedup-compare__role span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dedup-compare__role small {
  color: var(--text-2);
  font-size: 9px;
}

.dedup-compare__node h4 {
  margin: 8px 0 2px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.dedup-compare__type {
  margin: 0;
  color: var(--text-2);
  font-size: 10px;
}

.dedup-compare__counts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 11px 0;
}

.dedup-compare__counts div {
  padding: 6px 4px;
  border-radius: 5px;
  background: var(--bg-2);
  text-align: center;
}

.dedup-compare__counts dt {
  color: var(--text-2);
  font-size: 8px;
  text-transform: uppercase;
}

.dedup-compare__counts dd {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 700;
}

.dedup-compare__section {
  margin-top: 9px;
}

.dedup-compare__section > strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-1);
  font-size: 10px;
}

.dedup-compare__section > p {
  margin: 0;
  color: var(--text-2);
  font-size: 10px;
}

.dedup-compare__section ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dedup-compare__section li {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
  padding: 3px 0;
}

.dedup-compare__section li span,
.dedup-compare__facts dt {
  flex: 0 0 auto;
  color: var(--text-2);
  font-size: 9px;
  text-transform: capitalize;
}

.dedup-compare__section li code {
  overflow: hidden;
  color: var(--text-1);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dedup-compare__facts {
  margin: 0;
}

.dedup-compare__facts div {
  display: grid;
  grid-template-columns: minmax(70px, 0.45fr) minmax(0, 1fr);
  gap: 6px;
  padding: 3px 0;
}

.dedup-compare__facts dd {
  margin: 0;
  overflow: hidden;
  color: var(--text-1);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dedup-compare__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.dedup-compare__tags span {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 9px;
}

.dedup-direction {
  align-self: center;
  white-space: nowrap;
}

.dedup-merge-button {
  align-self: flex-end;
}

.dedup-confirm,
.node-merge-confirm {
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--danger) 7%, var(--bg-1));
}

.dedup-confirm strong,
.node-merge-confirm strong {
  font-size: 12px;
}

.dedup-confirm p,
.node-merge-confirm p {
  margin: 5px 0 10px;
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.5;
}

.dedup-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.node-merge-launch {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.node-merge-launch small {
  color: var(--text-2);
  font-size: 10px;
}

.node-merge-action {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-0);
}

.node-merge-action > p {
  margin: 0;
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.5;
}

.node-merge-action > .button {
  align-self: flex-start;
}

.node-merge-action > .text-button {
  align-self: flex-start;
  padding-inline: 0;
}

@media (max-width: 720px) {
  .dedup-panel {
    top: 8px;
    left: 8px;
    width: calc(100% - 16px);
    max-height: calc(100% - 16px);
  }

  .dedup-compare {
    grid-template-columns: minmax(0, 1fr);
  }

  .dedup-direction {
    justify-self: center;
  }
}
/* GC6 / T17 recurring venue hubs */
.venues-panel {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  display: flex;
  width: min(410px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-1);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.3);
}

.focus-controls + .venues-panel {
  top: 76px;
  max-height: calc(100% - 88px);
}

.venues-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--line);
}

.venues-panel__header h2 {
  margin: 0;
  font-size: 15px;
}

.venues-panel__header p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 10px;
}

.venues-panel__body {
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

.venue-results__message {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.5;
}

.venue-results__message--error {
  color: var(--danger);
}

.venue-skeleton {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.venue-skeleton span {
  height: 72px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--text-2) 12%, var(--bg-2));
  animation: venue-skeleton-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes venue-skeleton-pulse {
  to { opacity: 0.5; }
}

.venue-hub-list,
.venue-event-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.venue-hub-list {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.venue-hub {
  border-bottom: 1px solid var(--line-strong);
  background: var(--bg-1);
}

.venue-hub:last-child {
  border-bottom: 0;
}

.venue-hub__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 11px 8px;
  background: var(--bg-2);
}

.venue-hub__heading > button {
  min-width: 0;
  flex: 1 1 150px;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-0);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.venue-hub__heading > button:hover,
.venue-event-list button:hover .venue-event__name {
  color: var(--focus);
  text-decoration: underline;
}

.venue-hub__count,
.venue-hub__significance {
  display: inline-flex;
  min-height: 19px;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.venue-hub__count {
  background: var(--bg-3);
  color: var(--text-1);
}

.venue-hub__significance {
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line));
  color: var(--danger);
}

.venue-event-list {
  padding: 0 11px 6px;
}

.venue-event-list li {
  border-top: 1px solid var(--line);
}

.venue-event-list button {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 8px 1px;
  border: 0;
  background: transparent;
  color: var(--text-0);
  text-align: left;
}

.venue-event__name {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.venue-event__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
  font-size: 9px;
}

.timeline-row--event > strong {
  color: #e8849a;
}

.timeline-row__venue {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .venue-skeleton span { animation: none; }
}

/* GC10 / T37 immutable graph snapshots and state comparison */
.snapshots-panel {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  display: flex;
  width: min(560px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-1);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.3);
}

.focus-controls + .snapshots-panel {
  top: 76px;
  max-height: calc(100% - 88px);
}

.snapshots-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--line);
}

.snapshots-panel__header h2 {
  margin: 0;
  font-size: 15px;
  text-wrap: balance;
}

.snapshots-panel__header p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.4;
}

.snapshots-panel__body {
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

.snapshot-save {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.snapshot-save > label,
.snapshot-compare-controls label > span {
  color: var(--text-1);
  font-size: 11px;
  font-weight: 650;
}

.snapshot-save > div {
  display: flex;
  gap: 8px;
}

.snapshot-save input,
.snapshot-compare-controls select {
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 12px;
}

.snapshot-save input {
  flex: 1 1 auto;
  padding: 7px 9px;
}

.snapshot-save input::placeholder {
  color: var(--text-2);
  opacity: 1;
}

.snapshot-save input:hover:not(:disabled),
.snapshot-compare-controls select:hover:not(:disabled) {
  border-color: var(--text-2);
}

.snapshot-save input:focus,
.snapshot-compare-controls select:focus {
  border-color: var(--focus);
}

.snapshot-announcement {
  min-height: 16px;
  margin: 4px 0 0;
  color: var(--snapshot-added);
  font-size: 10px;
}

.snapshot-message {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.45;
}

.snapshot-message--error {
  color: var(--danger);
}

.snapshot-empty {
  padding: 16px 10px;
  text-align: center;
}

.snapshot-empty strong {
  font-size: 12px;
}

.snapshot-empty p {
  max-width: 46ch;
  margin: 4px auto 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.5;
  text-wrap: pretty;
}

.snapshot-compare-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
  align-items: end;
  gap: 6px;
  padding: 11px 0 13px;
  border-bottom: 1px solid var(--line);
}

.snapshot-compare-controls label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.snapshot-compare-controls select {
  width: 100%;
  padding: 6px 28px 6px 8px;
  text-overflow: ellipsis;
}

.snapshot-compare-controls__arrow {
  display: grid;
  height: 34px;
  place-items: center;
  color: var(--text-2);
  font-size: 15px;
}

.snapshot-version-list {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.snapshot-version-list > strong {
  color: var(--text-1);
  font-size: 10px;
}

.snapshot-version-list ol {
  max-height: 116px;
  margin: 7px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.snapshot-version-list li {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 2px;
}

.snapshot-version-list li + li {
  border-top: 1px solid var(--line);
}

.snapshot-version-list li span {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snapshot-version-list li small {
  flex: 0 0 auto;
  color: var(--text-2);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.snapshot-diff {
  padding-top: 12px;
}

.snapshot-diff__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.snapshot-diff__heading strong {
  font-size: 12px;
}

.snapshot-diff__heading span {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 9px;
  font-weight: 650;
}

.snapshot-diff-groups {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.snapshot-diff-groups > section {
  border-top: 1px solid var(--line);
}

.snapshot-diff-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 9px 2px 6px;
  color: var(--text-1);
  font-size: 10px;
  font-weight: 700;
}

.snapshot-diff-title span {
  font-variant-numeric: tabular-nums;
}

.snapshot-diff-title--added {
  color: var(--snapshot-added);
}

.snapshot-diff-title--removed {
  color: var(--danger);
}

.snapshot-diff-title--changed {
  color: var(--snapshot-changed);
}

.snapshot-diff-groups ul {
  margin: 0;
  padding: 0 0 5px;
  list-style: none;
}

.snapshot-diff-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-0);
  text-align: left;
}

button.snapshot-diff-row:hover:not(:disabled) {
  background: var(--bg-2);
}

button.snapshot-diff-row:disabled {
  cursor: default;
  opacity: 0.72;
}

.snapshot-diff-row__mark {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-3);
  font-size: 12px;
  font-weight: 800;
}

.snapshot-diff-row--added .snapshot-diff-row__mark {
  background: color-mix(in srgb, var(--snapshot-added) 14%, var(--bg-2));
  color: var(--snapshot-added);
}

.snapshot-diff-row--removed .snapshot-diff-row__mark {
  background: color-mix(in srgb, var(--danger) 14%, var(--bg-2));
  color: var(--danger);
}

.snapshot-diff-row--changed .snapshot-diff-row__mark {
  background: color-mix(in srgb, var(--snapshot-changed) 14%, var(--bg-2));
  color: var(--snapshot-changed);
}

.snapshot-diff-row__copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
}

.snapshot-diff-row__copy strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snapshot-diff-row__copy small {
  overflow: hidden;
  color: var(--text-2);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snapshot-diff-row__action {
  flex: 0 0 auto;
  color: var(--focus);
  font-size: 9px;
  font-weight: 650;
}

.snapshot-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
}

.snapshot-skeleton span {
  height: 34px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--text-2) 12%, var(--bg-2));
  animation: snapshot-skeleton-pulse 1.2s ease-in-out infinite alternate;
}

.snapshot-skeleton--diff span {
  height: 42px;
}

@keyframes snapshot-skeleton-pulse {
  to { opacity: 0.48; }
}

@media (max-width: 720px) {
  .snapshots-panel {
    top: 8px;
    left: 8px;
    width: calc(100% - 16px);
    max-height: calc(100% - 16px);
  }

  .snapshot-compare-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .snapshot-compare-controls__arrow {
    display: none;
  }

  .snapshot-version-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .snapshot-skeleton span {
    animation: none;
  }
}
/* GD2 / T46 vocabulary settings */
.settings-panel {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  display: flex;
  width: min(460px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-1);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.3);
}

.focus-controls + .settings-panel {
  top: 76px;
  max-height: calc(100% - 88px);
}

.settings-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--line);
}

.settings-panel__header h2 {
  margin: 0;
  font-size: 15px;
}

.settings-panel__header p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 10px;
}

.settings-panel__body {
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

.maintenance-readout {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-0);
}

.maintenance-readout__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.maintenance-readout__heading h3,
.maintenance-readout__heading p {
  margin: 0;
}

.maintenance-readout__heading h3 {
  color: var(--text-0);
  font-size: 12px;
}

.maintenance-readout__heading p {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 10px;
}

.maintenance-readout__facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  margin: 0;
}

.maintenance-readout__facts > div {
  min-width: 0;
}

.maintenance-readout__facts dt,
.maintenance-readout__summary dt {
  margin-bottom: 2px;
  color: var(--text-2);
  font-size: 9px;
  font-weight: 650;
  text-transform: uppercase;
}

.maintenance-readout__facts dd,
.maintenance-readout__summary dd {
  margin: 0;
  color: var(--text-0);
  font-size: 11px;
}

.maintenance-readout__facts dd,
.maintenance-readout__last-run dd {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.maintenance-readout__facts small,
.maintenance-readout__last-run time {
  color: var(--text-2);
  font-size: 9px;
}

.maintenance-readout__last-run {
  grid-column: 1 / -1;
}

.maintenance-readout__state {
  color: var(--text-1);
  font-weight: 650;
}

.maintenance-readout__state--enabled {
  color: var(--snapshot-added, #67d391);
}

.maintenance-readout__summary {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.maintenance-readout__summary > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-1);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
}

.maintenance-readout__summary > summary span {
  color: var(--text-2);
  font-size: 9px;
  font-weight: 500;
}

.maintenance-readout__summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 9px 0 0;
}

.maintenance-readout__summary dl > div {
  min-width: 0;
}

.maintenance-readout__summary dd {
  overflow-wrap: anywhere;
}

.maintenance-readout__metric--error dt,
.maintenance-readout__metric--error dd {
  color: var(--danger);
}

.maintenance-readout__loading,
.maintenance-readout__unavailable {
  margin: 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.maintenance-readout__unavailable {
  color: var(--danger);
}

.settings-panel__note {
  margin: 0 0 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.45;
}

.settings-panel__error {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line));
  border-radius: 7px;
  color: var(--danger);
  font-size: 11px;
  line-height: 1.45;
}

.settings-panel__skeleton {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.settings-panel__skeleton span {
  height: 46px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--text-2) 12%, var(--bg-2));
  animation: settings-skeleton-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes settings-skeleton-pulse {
  to { opacity: 0.48; }
}

.vocab-sections {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.vocab-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-0);
}

.vocab-section > summary {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  color: var(--text-0);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.vocab-section > summary::-webkit-details-marker,
.vocab-row__menu > summary::-webkit-details-marker {
  display: none;
}

.vocab-section > summary::before {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(-45deg);
  transition: transform 120ms ease-out;
}

.vocab-section[open] > summary::before {
  transform: rotate(45deg) translate(-1px, -1px);
}

.vocab-section__total {
  display: inline-grid;
  min-width: 22px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 650;
}

.vocab-section__content {
  border-top: 1px solid var(--line);
}

.vocab-empty {
  margin: 0;
  padding: 12px;
  color: var(--text-2);
  font-size: 11px;
}

.vocab-list {
  max-height: 220px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.vocab-row {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.vocab-row:last-child {
  border-bottom: 0;
}

.vocab-row__main {
  display: grid;
  min-height: 42px;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 9px;
  padding: 6px 7px 6px 11px;
}

.vocab-row__value {
  min-width: 0;
  overflow: hidden;
  color: var(--text-0);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vocab-row__count {
  color: var(--text-2);
  font-size: 10px;
  white-space: nowrap;
}

.vocab-row__menu {
  position: relative;
}

.vocab-row__menu > summary {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 1px;
  line-height: 1;
  list-style: none;
}

.vocab-row__menu > summary:hover,
.vocab-row__menu[open] > summary {
  border-color: var(--line);
  background: var(--bg-3);
  color: var(--text-0);
}

.vocab-row:has(.vocab-row__menu[open]) {
  padding-bottom: 88px;
}

.vocab-row__menu > div {
  position: absolute;
  z-index: 12;
  top: calc(100% + 3px);
  right: 0;
  display: flex;
  min-width: 126px;
  flex-direction: column;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
}

.vocab-row__menu button {
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-1);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  text-align: left;
}

.vocab-row__menu button:hover {
  background: var(--bg-3);
  color: var(--text-0);
}

.vocab-row__menu button:last-child {
  color: var(--danger);
}

.vocab-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 11px 11px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.vocab-action__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vocab-action__heading strong {
  color: var(--text-0);
  font-size: 11px;
}

.vocab-action label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vocab-action label > span {
  color: var(--text-1);
  font-size: 10px;
  font-weight: 650;
}

.vocab-action input,
.vocab-action select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 12px;
}

.vocab-action input:focus,
.vocab-action select:focus {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 24%, transparent);
  outline-offset: 1px;
}

.vocab-action p {
  margin: 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.45;
}

.vocab-action > .button {
  align-self: flex-start;
}

@media (max-width: 720px) {
  .settings-panel {
    top: 8px;
    left: 8px;
    width: calc(100% - 16px);
    max-height: calc(100% - 16px);
  }

  .vocab-list {
    max-height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .settings-panel__skeleton span { animation: none; }
  .vocab-section > summary::before { transition: none; }
}
/* GD3 dossier bias, compact density, and evidence integrity */
.fullscreen-dossier__header {
  min-height: 58px;
  gap: 16px;
  padding: 8px clamp(16px, 3vw, 40px);
}

.fullscreen-dossier__identity {
  gap: 12px;
}

.fullscreen-dossier__identity h1 {
  margin-right: 10px;
  font-size: 23px;
}

.fullscreen-dossier__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.dossier-layout-bias {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-1);
}

.dossier-layout-bias button {
  min-height: 30px;
  padding: 5px 9px;
  border: 0;
  background: transparent;
  color: var(--text-1);
  font-size: 11px;
  font-weight: 650;
}

.dossier-layout-bias button + button {
  border-left: 1px solid var(--line-strong);
}

.dossier-layout-bias button:hover {
  background: var(--bg-2);
  color: var(--text-0);
}

.dossier-layout-bias button[aria-pressed="true"] {
  background: var(--bg-3);
  color: var(--accent);
}

.dossier-layout-bias button:focus-visible {
  position: relative;
  z-index: 1;
}

.dossier-tabs {
  padding-inline: clamp(16px, 3vw, 40px);
}

.dossier-tab {
  min-height: 36px;
  padding-inline: 12px;
}

.dossier-content {
  width: min(1120px, calc(100% - 32px));
  padding: 16px 0 40px;
}

.dossier-content--overview {
  width: min(820px, calc(100% - 32px));
}

.dossier-content .narrative {
  padding-bottom: 16px;
}

.dossier-content .narrative__text,
.dossier-content .narrative__empty {
  font-size: 15px;
  line-height: 1.52;
}

.fullscreen-dossier--graph-dominant .dossier-content .narrative__text,
.fullscreen-dossier--graph-dominant .dossier-content .narrative__empty {
  font-size: 14px;
}

.dossier-content .panel-section {
  gap: 8px;
  padding-top: 12px;
}

.dossier-content .read-field {
  padding: 6px 0;
}

.dossier-content .read-field dt,
.dossier-content .read-field dd {
  font-size: 12px;
}

.dossier-backlinks {
  margin: -8px 0 16px;
}

.dossier-map-pane__head {
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
}

.dossier-map-pane__head .panel-kicker {
  min-width: 0;
  max-width: 100%;
  flex: 1 1 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dossier-map-pane__depth {
  padding: 0 8px 8px !important;
}

.dossier-map-pane__hint {
  padding: 6px 12px;
}

.dossier-section-heading {
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 10px;
}

.dossier-section-heading h2 {
  font-size: 20px;
}

.evidence-gallery__heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.evidence-gallery__heading-actions > span {
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
}

.evidence-group + .evidence-group {
  margin-top: 28px;
}

.evidence-group > h3 {
  margin-bottom: 10px;
}

.evidence-grid {
  gap: 12px;
}

.evidence-preview {
  height: 168px;
}

.evidence-card__body {
  padding: 12px;
}

.evidence-card__body h4 {
  margin-bottom: 10px;
  line-height: 1.38;
}

.evidence-custody {
  gap: 5px;
}

.evidence-custody > div {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 6px;
}

.evidence-filters {
  gap: 8px;
  margin-bottom: 18px;
  padding: 12px;
}

.evidence-filters__row {
  gap: 8px;
}

.evidence-filters__row--range .field {
  flex: 0 1 190px;
}

.evidence-filters__toggle {
  display: flex;
  min-width: 220px;
  min-height: 48px;
  flex: 1 1 260px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg-2);
  color: var(--text-0);
  cursor: pointer;
}

.evidence-filters__toggle:hover {
  border-color: var(--line-strong);
}

.evidence-filters__toggle input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.evidence-filters__toggle span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.evidence-filters__toggle strong {
  font-size: 11px;
  font-weight: 650;
}

.evidence-filters__toggle small {
  color: var(--text-2);
  font-size: 10px;
}

.evidence-integrity__action {
  width: 100%;
  margin-top: 10px;
}

.evidence-integrity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 10px;
  line-height: 1.4;
}

.evidence-integrity strong {
  font-size: 10px;
  letter-spacing: 0.04em;
}

.evidence-integrity span {
  overflow-wrap: anywhere;
  color: var(--text-1);
}

.evidence-integrity code {
  color: inherit;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.evidence-integrity .text-button {
  align-self: flex-start;
  padding: 2px 0;
  color: inherit;
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.evidence-integrity--verified {
  border-color: color-mix(in srgb, var(--snapshot-added) 45%, var(--line));
  background: color-mix(in srgb, var(--snapshot-added) 8%, var(--bg-1));
  color: var(--snapshot-added);
}

.evidence-integrity--mismatch {
  border-color: color-mix(in srgb, var(--danger) 65%, var(--line));
  background: color-mix(in srgb, var(--danger) 14%, var(--bg-1));
  color: var(--danger);
}

.evidence-integrity--unavailable {
  border-color: color-mix(in srgb, var(--snapshot-changed) 40%, var(--line));
  background: color-mix(in srgb, var(--snapshot-changed) 7%, var(--bg-1));
  color: var(--snapshot-changed);
}

.evidence-upload {
  gap: 12px;
  margin-top: 32px;
  padding: 16px;
}

@media (max-width: 1100px) {
  .fullscreen-dossier__header {
    align-items: flex-start;
  }

  .fullscreen-dossier__actions {
    max-width: 56%;
  }
}

@media (max-width: 850px) {
  .fullscreen-dossier__header {
    align-items: center;
  }

  .fullscreen-dossier__actions {
    max-width: none;
  }

  .dossier-map-pane {
    flex-basis: auto !important;
  }

  .fullscreen-dossier--graph-dominant .dossier-map-pane {
    height: min(42vh, 360px);
  }

  .fullscreen-dossier--dossier-dominant .dossier-map-pane {
    height: 220px;
  }
}

@media (max-width: 560px) {
  .fullscreen-dossier__header {
    padding: 8px 12px;
  }

  .fullscreen-dossier__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dossier-content {
    width: calc(100% - 24px);
    padding-top: 16px;
  }

  .evidence-filters__row--range .field,
  .evidence-filters__toggle {
    flex-basis: 100%;
  }
}
/* T18 post engagement capture */
.engagement-section {
  gap: 12px;
}

.engagement-section__intro {
  max-width: 62ch;
  margin: 0;
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.55;
  text-wrap: pretty;
}

.engagement-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: var(--bg-3);
}

.engagement-mode__option {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-1);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
}

.engagement-mode__option:hover:not(:disabled) {
  color: var(--text-0);
}

.engagement-mode__option--active {
  background: var(--bg-1);
  color: var(--text-0);
}

.engagement-mode__option:focus-visible,
.recurring-engager-list button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.engagement-mode__option:disabled {
  cursor: default;
  opacity: 0.55;
}

.engagement-stance {
  max-width: 180px;
}

.engagement-paste {
  min-height: 108px;
  resize: vertical;
  line-height: 1.5;
}

.engagement-submit {
  align-self: flex-start;
}

.engagement-notice {
  padding: 8px 10px;
  border-radius: 6px;
  background: color-mix(in srgb, #69c48d 13%, var(--bg-2));
  color: #a9dfbb;
  font-size: 12px;
  line-height: 1.45;
}

.recurring-engagers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.recurring-engagers__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.recurring-engagers__heading h4,
.recurring-engagers__heading p {
  margin: 0;
}

.recurring-engagers__heading h4 {
  color: var(--text-0);
  font-size: 12px;
  font-weight: 700;
}

.recurring-engagers__heading p {
  margin-top: 3px;
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.45;
}

.recurring-engagers__heading > span {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 10px;
  text-align: center;
}

.recurring-engagers__message {
  margin: 0;
  padding: 9px 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
}

.recurring-engagers__message--error {
  color: #ffb2b2;
}

.recurring-engagers__message .text-button {
  margin-left: 8px;
}

.recurring-engager-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.recurring-engager-list li + li {
  border-top: 1px solid var(--line);
}

.recurring-engager-list button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.recurring-engager-list button:hover {
  background: var(--bg-3);
}

.recurring-engager__identity {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.recurring-engager__identity strong {
  overflow: hidden;
  color: var(--text-0);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-engager__identity small {
  color: var(--text-2);
  font-size: 10px;
}

.recurring-engager__stances {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.engagement-stance-chip {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
}

.engagement-stance-chip--supportive {
  background: color-mix(in srgb, #69c48d 14%, var(--bg-3));
  color: #9bdab1;
}

.engagement-stance-chip--critical {
  background: color-mix(in srgb, #e97f86 14%, var(--bg-3));
  color: #f4a9ad;
}

.engagement-stance-chip--neutral {
  color: var(--text-1);
}

/* T20 selector lifecycle, migration, and archive recovery */
.identifier-entry {
  padding-bottom: 4px;
}

.identifier-entry--dead {
  background: color-mix(in srgb, var(--danger) 4%, transparent);
}

.identifier-link--dead {
  opacity: 0.58;
}

.identifier-link--dead .identifier-link__text > span {
  color: var(--text-2);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.selector-lifecycle {
  margin: 0 6px 4px;
  border-top: 1px solid var(--line);
}

.selector-lifecycle > summary {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 1px;
  color: var(--text-2);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  list-style: none;
}

.selector-lifecycle > summary::-webkit-details-marker {
  display: none;
}

.selector-lifecycle > summary::after {
  content: "›";
  color: var(--text-2);
  font-size: 15px;
  transform: rotate(90deg);
  transition: transform 180ms ease-out;
}

.selector-lifecycle[open] > summary::after {
  transform: rotate(-90deg);
}

.selector-lifecycle > summary:hover {
  color: var(--text-0);
}

.selector-status {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: capitalize;
}

.selector-status--active {
  background: color-mix(in srgb, var(--snapshot-added, #67d391) 12%, var(--bg-2));
  color: var(--snapshot-added, #67d391);
}

.selector-status--dead,
.selector-status--defunct {
  background: color-mix(in srgb, var(--danger) 12%, var(--bg-2));
  color: var(--danger);
}

.selector-status--suspended {
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-2));
  color: var(--accent);
}

.selector-lifecycle__body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 7px 0 9px;
}

.selector-lifecycle__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.selector-lifecycle__fields label:first-child {
  grid-column: 1 / -1;
}

.selector-lifecycle__fields label,
.selector-migration label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  color: var(--text-2);
  font-size: 9px;
  font-weight: 650;
}

.selector-lifecycle__fields input,
.selector-lifecycle__fields select,
.selector-migration select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 6px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 11px;
}

.selector-lifecycle__fields input:focus,
.selector-lifecycle__fields select:focus,
.selector-migration select:focus {
  border-color: var(--focus);
}

.selector-lifecycle__body > .button,
.selector-migration > .button {
  align-self: flex-start;
}

.selector-migration {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.selector-lifecycle__message {
  margin: 0;
  color: var(--snapshot-added, #67d391);
  font-size: 10px;
  line-height: 1.4;
}

.selector-lifecycle .field-hint code {
  overflow-wrap: anywhere;
  color: var(--text-1);
}

.archive-recovery {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 1px 6px 5px;
}

.selector-lifecycle .archive-recovery {
  padding: 0;
}

.archive-recovery__action {
  padding: 3px 5px;
  color: #80bdff;
}

.archive-recovery a {
  color: #80bdff;
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.archive-recovery__message {
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.4;
}

.archive-recovery__message--error {
  color: #e99a9a;
}

:root[data-theme="light"] .archive-recovery__action,
:root[data-theme="light"] .archive-recovery a {
  color: #1a66c2;
}

@media (prefers-reduced-motion: reduce) {
  .selector-lifecycle > summary::after {
    transition: none;
  }
}
/* GC9 / T36 structured saved graph queries and internal watchlist */
.saved-queries-panel {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  display: flex;
  width: min(580px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-1);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.3);
}

.focus-controls + .saved-queries-panel {
  top: 76px;
  max-height: calc(100% - 88px);
}

.saved-queries-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--line);
}

.saved-queries-panel__header h2 {
  margin: 0;
  font-size: 15px;
  text-wrap: balance;
}

.saved-queries-panel__header p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.4;
}

.saved-query-tabs {
  display: flex;
  gap: 2px;
  padding: 7px 12px 0;
  border-bottom: 1px solid var(--line);
}

.saved-query-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 650;
}

.saved-query-tab:hover {
  color: var(--text-0);
}

.saved-query-tab:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.saved-query-tab--active {
  border-bottom-color: var(--accent);
  color: var(--text-0);
}

.saved-query-tab span {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.saved-queries-panel__body {
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

.saved-query-message {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.45;
}

.saved-query-message--error {
  color: var(--danger);
}

.saved-query-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.saved-query-form__identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
}

.saved-query-form label,
.saved-query-filter-grid label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.saved-query-form label > span,
.saved-query-filter-grid label > span,
.saved-query-form legend {
  color: var(--text-1);
  font-size: 10px;
  font-weight: 650;
}

.saved-query-form label > span small {
  color: var(--text-2);
  font-size: 9px;
  font-weight: 450;
}

.saved-query-form input[type="text"],
.saved-query-form input:not([type]),
.saved-query-form input[type="number"],
.saved-query-form select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 11px;
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
}

.saved-query-form input::placeholder {
  color: var(--text-2);
  opacity: 1;
}

.saved-query-form input:hover:not(:disabled),
.saved-query-form select:hover:not(:disabled) {
  border-color: var(--text-2);
}

.saved-query-form input:focus,
.saved-query-form select:focus {
  border-color: var(--focus);
  outline: none;
}

.saved-query-form input:disabled,
.saved-query-form select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.saved-query-form fieldset {
  margin: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.saved-query-form legend {
  padding: 0 5px;
}

.saved-query-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 8px;
}

.saved-query-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.saved-query-watch-toggle {
  flex: 1 1 auto;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 8px !important;
  cursor: pointer;
}

.saved-query-watch-toggle input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.saved-query-watch-toggle > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.saved-query-watch-toggle strong {
  color: var(--text-0);
  font-size: 10px;
}

.saved-query-watch-toggle small {
  color: var(--text-2);
  font-size: 9px;
  font-weight: 450;
}

.saved-query-library,
.saved-query-watchlist {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.saved-query-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.saved-query-section-heading h3 {
  margin: 0;
  font-size: 12px;
}

.saved-query-section-heading p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 9px;
}

.saved-query-empty {
  padding: 18px 10px;
  text-align: center;
}

.saved-query-empty strong {
  font-size: 12px;
}

.saved-query-empty p {
  max-width: 48ch;
  margin: 4px auto 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.5;
  text-wrap: pretty;
}

.saved-query-list,
.watchlist-query-list,
.saved-query-matches {
  margin: 0;
  padding: 0;
  list-style: none;
}

.saved-query-list,
.watchlist-query-list {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.saved-query-row,
.watchlist-query-list > li {
  padding: 10px 11px;
  background: var(--bg-1);
}

.saved-query-row + .saved-query-row,
.watchlist-query-list > li + li {
  border-top: 1px solid var(--line);
}

.saved-query-row--open {
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-1));
}

.saved-query-row__heading,
.watchlist-query-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.saved-query-row__heading > div:first-child,
.watchlist-query-heading > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.saved-query-row__heading strong,
.watchlist-query-heading strong {
  overflow: hidden;
  color: var(--text-0);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-query-row__heading small,
.watchlist-query-heading small {
  overflow: hidden;
  color: var(--text-2);
  font-size: 9px;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.saved-query-row__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
}

.saved-query-row > p {
  margin: 7px 0 0;
  color: var(--text-1);
  font-size: 10px;
  line-height: 1.45;
}

.saved-query-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.saved-query-chips span {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 8px;
}

.saved-query-result {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.saved-query-result > div {
  color: var(--text-1);
  font-size: 9px;
}

.saved-query-result > div strong {
  color: var(--text-0);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.saved-query-matches {
  margin-top: 5px;
}

.saved-query-matches li + li {
  border-top: 1px solid var(--line);
}

.saved-query-matches button {
  display: flex;
  width: 100%;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-0);
  text-align: left;
}

.saved-query-matches button:hover {
  background: var(--bg-2);
}

.saved-query-matches button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.saved-query-matches span {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-query-matches small {
  flex: 0 0 auto;
  color: var(--text-2);
  font-size: 9px;
}

.saved-query-empty-copy,
.saved-query-more {
  margin: 7px 2px 0;
  color: var(--text-2);
  font-size: 9px;
}

.watchlist-query-heading > span {
  display: grid;
  min-width: 34px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-2));
  color: var(--text-0);
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.saved-query-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saved-query-skeleton span {
  height: 62px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--text-2) 12%, var(--bg-2));
  animation: saved-query-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes saved-query-pulse {
  to { opacity: 0.48; }
}

@media (max-width: 720px) {
  .saved-queries-panel {
    top: 8px;
    left: 8px;
    width: calc(100% - 16px);
    max-height: calc(100% - 16px);
  }

  .saved-query-form__identity,
  .saved-query-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .saved-query-form__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .saved-query-form__footer .button {
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .saved-query-skeleton span {
    animation: none;
  }
}
/* Web-capture candidate review */
.webcapture__body,
.webcapture__review,
.webcapture__group {
  display: flex;
  flex-direction: column;
}

.webcapture__body {
  gap: 12px;
}

.webcapture__review {
  gap: 16px;
}

.webcapture__group {
  gap: 7px;
}

.webcapture__group + .webcapture__group {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.webcapture__group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.webcapture__group-heading h4 {
  margin: 0;
  color: var(--text-0);
  font-size: 12px;
}

.webcapture__group-heading span {
  color: var(--text-2);
  font-size: 10px;
}

.webcapture__url-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.webcapture__url-row .field {
  min-width: 0;
}

.webcapture__url-row .button {
  flex: 0 0 auto;
}

.webcapture__summary,
.webcapture__message,
.webcapture__empty {
  margin: 0;
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.5;
}

.webcapture__message--error {
  color: var(--danger);
}

.webcapture__message--success {
  color: #83d3a1;
}

/* Commit finished, but with per-candidate or album-sync failures. */
.webcapture__message--warning {
  color: #d9a441;
}

.webcapture__message p {
  margin: 0;
}

.webcapture__message-problems {
  margin: 4px 0 0;
  padding-left: 16px;
  display: grid;
  gap: 2px;
}

.webcapture__candidate {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 7px 0;
  color: var(--text-1);
  font-size: 11px;
  cursor: pointer;
}

.webcapture__candidate + .webcapture__candidate {
  border-top: 1px solid var(--line);
}

.webcapture__candidate input,
.webcapture__page-option input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.webcapture__candidate-main {
  min-width: 0;
}

.webcapture__candidate-main strong,
.webcapture__candidate-main small {
  display: block;
}

.webcapture__candidate-main strong {
  overflow-wrap: anywhere;
  color: var(--text-0);
  font-size: 12px;
}

.webcapture__candidate-main small {
  margin-top: 2px;
  color: var(--text-2);
  line-height: 1.4;
}

.webcapture__match {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 9px;
  font-weight: 700;
}

.webcapture__match--new {
  color: #d7c47b;
}

.webcapture__image-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 7px;
}

.webcapture__image {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  padding: 7px;
  border-radius: 7px;
  background: var(--bg-0);
  color: var(--text-1);
  font-size: 10px;
  cursor: pointer;
}

.webcapture__image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 5px;
  object-fit: cover;
  background: var(--bg-3);
}

.webcapture__image-label {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 6px;
}

.webcapture__image-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.webcapture__commit-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.webcapture__page-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.4;
}

.webcapture__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 440px) {
  .webcapture__url-row {
    align-items: stretch;
    flex-direction: column;
  }

  .webcapture__url-row .button {
    align-self: flex-start;
  }
}

/* GF10 operator-requested dossier and active-case polish */
.brand-active-case {
  display: inline-flex;
  min-width: 0;
  max-width: min(24vw, 260px);
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.2;
}

.brand-active-case__label {
  flex: 0 0 auto;
  color: var(--text-2);
}

.brand-active-case__name {
  min-width: 0;
  overflow: hidden;
  color: var(--text-0);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dossier-map-pane__actions {
  display: flex;
  max-width: 100%;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.dossier-inset-toggle button {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 10px;
}

.fullscreen-edge .dossier-content {
  width: min(1040px, calc(100% - 40px));
}

.fullscreen-edge .edge-dossier {
  min-height: auto;
  padding: 0;
}

.fullscreen-edge .edge-dossier > .panel-heading {
  display: none;
}

.fullscreen-edge .endpoint-flow {
  margin-bottom: 4px;
}

@media (max-width: 850px) {
  .brand-active-case {
    max-width: 140px;
  }

  .brand-active-case__label {
    display: none;
  }
}

@media (max-width: 560px) {
  .brand-active-case {
    max-width: 88px;
    padding-inline: 6px;
  }

  .fullscreen-edge .dossier-content {
    width: calc(100% - 24px);
  }
}

/* GF12 canvas multi-select and intelligence case-file report */
.multi-select-chip {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  padding: 6px 7px 6px 12px;
  border: 1px solid #9b7d27;
  border-radius: 9px;
  background: color-mix(in srgb, var(--bg-1) 94%, var(--accent));
  color: var(--text-0);
}

.multi-select-chip--timebar {
  bottom: 156px;
}

.multi-select-chip strong {
  margin-right: 3px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.multi-select-chip .text-button {
  font-size: 11px;
}

.case-scope-controls__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
}

.case-report {
  position: relative;
  z-index: 16;
  display: flex;
  width: 100%;
  height: 100%;
  grid-column: 1;
  grid-row: 2;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: var(--bg-0);
  color: var(--text-0);
}

.case-report__header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 70px;
  padding: 10px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}

.case-report__header > div:first-child {
  min-width: 0;
}

.case-report__header p {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-report__header h1 {
  overflow: hidden;
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-wrap: balance;
  white-space: nowrap;
}

.case-report__header > div:first-child > span {
  display: block;
  margin-top: 3px;
  color: var(--text-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.case-report__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.report-neighbor-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
  white-space: nowrap;
}

.report-neighbor-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.report-neighbor-toggle:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.55;
}

.report-persistence-note,
.report-action-message {
  max-width: 320px;
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

.report-action-message {
  color: var(--snapshot-added);
}

.case-report__body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

.case-report__document {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 64px;
}

.case-report__section {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.case-report__section:first-of-type {
  padding-top: 14px;
}

.case-report__section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.case-report__section-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.case-report__section-heading > span {
  color: var(--text-2);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.case-report__section h3 {
  margin: 0 0 8px;
  color: var(--text-1);
  font-size: 11px;
  font-weight: 700;
}

.report-prose,
.report-narrative p,
.report-draft p,
.report-entity p {
  max-width: 72ch;
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  text-wrap: pretty;
}

.report-analyst-text {
  width: 100%;
  min-height: 128px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-1);
  color: var(--text-0);
  font-size: 13px;
  line-height: 1.6;
}

.report-analyst-text::placeholder {
  color: var(--text-1);
}

.report-draft {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg-1);
  color: var(--text-1);
}

.report-draft__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.report-draft__heading strong {
  color: var(--text-2);
  font-size: 10px;
  font-weight: 700;
}

.report-draft p {
  color: var(--text-1);
  font-size: 12px;
}

.report-sourcing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 20px;
}

.report-sourcing-grid > div {
  min-width: 0;
}

.report-gap-list {
  margin-top: 22px;
}

.report-compact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 19px;
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.5;
}

.report-fact-grid {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.report-fact-grid > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.report-fact-grid dt {
  color: var(--text-2);
  font-size: 11px;
  text-transform: capitalize;
}

.report-fact-grid dd {
  margin: 0;
  color: var(--text-1);
  font-size: 12px;
  text-align: right;
}

.report-table-block + .report-table-block {
  margin-top: 22px;
}

.report-table-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.report-table th,
.report-table td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.report-table tr:last-child td {
  border-bottom: 0;
}

.report-table th {
  background: var(--bg-1);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 700;
}

.report-table td {
  color: var(--text-1);
  line-height: 1.45;
}

.report-table th:first-child,
.report-table td:first-child {
  width: 24%;
}

.report-entity-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--focus);
  font-weight: 650;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--focus) 45%, transparent);
  text-underline-offset: 2px;
}

.report-entity-link:hover {
  color: var(--text-0);
}

.report-narrative {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.report-entity-list {
  border-top: 1px solid var(--line-strong);
}

.report-entity {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.report-entity header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 5px;
}

.report-entity header > span {
  color: var(--text-2);
  font-size: 10px;
  text-transform: capitalize;
}

.report-entity p {
  color: var(--text-1);
  font-size: 12px;
}

.report-entity__links {
  display: flex;
  gap: 10px;
  margin-top: 7px;
  color: var(--text-2);
  font-size: 10px;
}

.report-entity__links span {
  overflow-wrap: anywhere;
}

.report-evidence-list {
  margin: 0;
  padding-left: 30px;
}

.report-evidence-list li {
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
}

.report-evidence-list strong,
.report-evidence-list span {
  display: block;
  font-size: 12px;
  line-height: 1.5;
}

.report-evidence-list span {
  margin-top: 2px;
  color: var(--text-1);
}

.report-empty-inline {
  margin: 0;
  color: var(--text-2);
  font-size: 12px;
  font-style: italic;
}

.report-inline-notice,
.report-inline-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 12px;
}

.report-inline-notice {
  border: 1px solid #66572b;
  background: #262314;
  color: #e8d790;
}

.report-inline-error {
  padding: 10px 12px;
  border: 1px solid #6a3c45;
  border-radius: 7px;
  background: #2b1c23;
  color: var(--danger);
  font-size: 12px;
}

.report-state {
  width: min(540px, calc(100% - 32px));
  margin: 12vh auto 0;
  text-align: center;
}

.report-state strong {
  font-size: 18px;
}

.report-state p {
  color: var(--text-1);
  line-height: 1.5;
}

.report-state--error strong {
  color: var(--danger);
}

.report-loading {
  display: flex;
  width: min(1040px, calc(100% - 40px));
  margin: 20px auto;
  flex-direction: column;
  gap: 12px;
}

.report-loading span {
  display: block;
  height: 88px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--bg-1), var(--bg-2), var(--bg-1));
  background-size: 220% 100%;
  animation: report-loading-shimmer 1.4s ease-in-out infinite;
}

.report-loading span:nth-child(2) {
  height: 170px;
}

.report-loading span:nth-child(3) {
  height: 240px;
}

@keyframes report-loading-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (max-width: 900px) {
  .case-report__header {
    align-items: flex-start;
  }

  .case-report__actions {
    max-width: 58%;
    flex-wrap: wrap;
  }

  .report-persistence-note,
  .report-action-message {
    max-width: 100%;
  }
}

@media (max-width: 680px) {
  .multi-select-chip {
    right: 10px;
    bottom: 50px;
    left: 10px;
    justify-content: center;
    transform: none;
  }

  .multi-select-chip--timebar {
    bottom: 138px;
  }

  .case-report__header {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .case-report__header h1 {
    white-space: normal;
  }

  .case-report__actions {
    max-width: none;
    justify-content: flex-start;
  }

  .report-persistence-note,
  .report-action-message {
    width: 100%;
    text-align: left;
  }

  .case-report__document {
    width: calc(100% - 24px);
  }

  .report-sourcing-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .report-table {
    min-width: 620px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .report-loading span {
    animation: none;
  }
}

/* Faces quick glance and full-screen review workspace */
.faces-panel__workspace-button {
  width: 100%;
}

.faces-panel__loading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faces-panel__loading span {
  height: 52px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--bg-1), var(--bg-3), var(--bg-1));
  background-size: 220% 100%;
  animation: faces-loading-shimmer 1.3s ease-in-out infinite;
}

.faces-panel__empty,
.faces-panel__section-empty {
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.5;
}

.faces-panel__empty {
  padding: 14px 4px;
  text-align: center;
}

.faces-panel__empty strong {
  display: block;
  color: var(--text-0);
  font-size: 12px;
}

.faces-panel__empty p,
.faces-panel__section-empty {
  margin: 4px 0 0;
}

.faces-panel__queue-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.faces-panel__queue-row img,
.faces-panel__queue-row > span {
  width: 46px;
  height: 46px;
  border-radius: 7px;
  background: var(--bg-3);
}

.faces-panel__queue-row img {
  object-fit: cover;
}

.faces-panel__queue-row > span {
  display: grid;
  place-items: center;
  color: var(--text-1);
  font-size: 11px;
  font-weight: 700;
}

.faces-panel__identified-list {
  display: flex;
  flex-direction: column;
}

.faces-panel__identified-list > button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 7px 3px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text-0);
  text-align: left;
}

.faces-panel__identified-list > button:hover {
  background: var(--bg-2);
}

.faces-panel__identified-list img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--bg-3);
  object-fit: cover;
}

.faces-panel__identified-list span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.faces-panel__identified-list strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faces-panel__identified-list small {
  color: var(--text-2);
  font-size: 9px;
}

.faces-workspace {
  position: relative;
  z-index: 15;
  display: flex;
  width: 100%;
  height: 100%;
  grid-column: 1;
  grid-row: 2;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: var(--bg-0);
  color: var(--text-0);
}

.faces-workspace__header {
  display: flex;
  min-height: 70px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}

.faces-workspace__identity,
.faces-workspace__header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.faces-workspace__identity > div {
  min-width: 0;
}

.faces-workspace__identity p {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.faces-workspace__identity h1 {
  overflow: hidden;
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-wrap: balance;
  white-space: nowrap;
}

.faces-workspace__identity span {
  display: block;
  margin-top: 3px;
  color: var(--text-2);
  font-size: 11px;
}

.faces-workspace__header-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.faces-workspace__tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 0 clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}

.faces-workspace__tab {
  position: relative;
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  background: transparent;
  color: var(--text-1);
  font-size: 12px;
  font-weight: 650;
}

.faces-workspace__tab:hover {
  background: var(--bg-2);
  color: var(--text-0);
}

.faces-workspace__tab::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  content: "";
  background: transparent;
}

.faces-workspace__tab--active {
  color: var(--text-0);
}

.faces-workspace__tab--active::after {
  background: var(--accent);
}

.faces-workspace__tab span {
  display: inline-grid;
  min-width: 22px;
  min-height: 19px;
  margin-left: 5px;
  place-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 10px;
}

.faces-workspace__body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: clamp(18px, 3vw, 38px) clamp(18px, 4vw, 58px) 64px;
}

.faces-workspace__notice {
  max-width: 72ch;
  margin: 0 auto 18px;
  padding: 9px 11px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--snapshot-added) 10%, var(--bg-1));
  color: var(--text-0);
  font-size: 11px;
  text-align: center;
}

.faces-workspace__notice--error {
  background: color-mix(in srgb, var(--danger) 9%, var(--bg-1));
  color: var(--danger);
}

.faces-workspace__cluster-grid {
  display: grid;
  width: min(1180px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.faces-workspace__cluster {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-1);
  color: var(--text-0);
  transition: border-color 180ms ease-out, transform 180ms ease-out;
}

.faces-workspace__cluster:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.faces-workspace__cluster-main {
  display: flex;
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.faces-workspace__cluster-main:focus-visible {
  outline-offset: -3px;
}

.faces-workspace__cluster img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-3);
  object-fit: cover;
}

.faces-workspace__cluster-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px 13px;
}

.faces-workspace__cluster-copy strong {
  font-size: 13px;
}

.faces-workspace__cluster-copy small {
  overflow: hidden;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faces-workspace__cluster-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.faces-workspace__reappeared,
.faces-workspace__single-photo {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--text-0);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.4;
}

.faces-workspace__reappeared {
  background: color-mix(in srgb, var(--accent) 13%, var(--bg-2));
}

.faces-workspace__single-photo {
  background: color-mix(in srgb, var(--text-2) 12%, var(--bg-2));
}

.faces-workspace__cluster-actions {
  display: flex;
  justify-content: flex-end;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.faces-workspace__identified-list {
  width: min(920px, 100%);
  margin: 0 auto;
  border-top: 1px solid var(--line-strong);
}

.faces-workspace__person {
  display: grid;
  width: 100%;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text-0);
  text-align: left;
}

.faces-workspace__person:hover {
  background: var(--bg-1);
}

.faces-workspace__person img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--bg-3);
  object-fit: cover;
}

.faces-workspace__person > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.faces-workspace__person strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faces-workspace__person small,
.faces-workspace__person > span:last-child {
  color: var(--text-2);
  font-size: 11px;
}

.faces-workspace__detail {
  display: grid;
  width: min(1380px, 100%);
  margin: 0 auto;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 4vw, 54px);
}

.faces-workspace__detail--with-graph {
  grid-template-columns: minmax(220px, 260px) minmax(300px, 1fr) minmax(400px, 38%);
  gap: clamp(20px, 2vw, 32px);
}

.faces-workspace__subject {
  position: sticky;
  top: 0;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

.faces-workspace__subject > img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: var(--bg-3);
  object-fit: cover;
}

.faces-workspace__subject > div:not(.faces-workspace__assign) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.faces-workspace__subject > div > strong {
  font-size: 18px;
}

.faces-workspace__subject > div > span {
  color: var(--text-2);
  font-size: 11px;
}

.faces-workspace__assign {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 6px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.faces-workspace__assign h2,
.faces-workspace__photos-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.faces-workspace__assign > p,
.faces-workspace__photos-heading p {
  margin: 0;
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.5;
  text-wrap: pretty;
}

.faces-workspace__bound-warning,
.faces-workspace__inline-error {
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 10px !important;
  line-height: 1.45 !important;
}

.faces-workspace__bound-warning {
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-1));
  color: var(--text-0) !important;
}

.faces-workspace__inline-error {
  background: color-mix(in srgb, var(--danger) 8%, var(--bg-1));
  color: var(--danger) !important;
}

.faces-workspace__assign-empty {
  margin: 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.45;
}

.faces-workspace__create-person {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 3px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.faces-workspace__create-person > .button {
  width: 100%;
  justify-content: center;
}

.faces-workspace__create-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.faces-workspace__create-form h3 {
  margin: 0 0 1px;
  color: var(--text-0);
  font-size: 12px;
  font-weight: 650;
}

.faces-workspace__create-form .field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.faces-workspace__create-form .field > span small {
  color: var(--text-2);
  font-size: 9px;
  font-weight: 450;
}

.faces-workspace__create-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 68px;
  padding: 8px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-0);
  color: var(--text-0);
  font: inherit;
  font-size: 12px;
  font-weight: 450;
  line-height: 1.45;
  resize: vertical;
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
}

.faces-workspace__create-form textarea:hover:not(:disabled) {
  border-color: #536177;
}

.faces-workspace__create-form textarea:focus {
  border-color: var(--focus);
  background: #101722;
}

.faces-workspace__create-form textarea::placeholder {
  color: #929daf;
  opacity: 1;
}

.faces-workspace__create-form .faces-workspace__inline-error {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.faces-workspace__create-form .faces-workspace__inline-error code {
  overflow-wrap: anywhere;
  color: var(--text-0);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  user-select: all;
}

.faces-workspace__create-form .form-actions {
  flex-wrap: wrap;
}

.faces-workspace__photos {
  min-width: 0;
}

.faces-workspace__photos-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.faces-workspace__photos-heading > span {
  max-width: 40ch;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.4;
  text-align: right;
}

.faces-workspace__whole-graph {
  position: sticky;
  top: 0;
  display: flex;
  height: clamp(460px, calc(100vh - 190px), 720px);
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-1);
}

.faces-workspace__whole-graph-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px 11px;
  border-bottom: 1px solid var(--line);
}

.faces-workspace__whole-graph-header > div {
  min-width: 0;
}

.faces-workspace__whole-graph-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  text-wrap: balance;
}

.faces-workspace__whole-graph-header p,
.faces-workspace__whole-graph-hint {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.4;
}

.faces-workspace__whole-graph-stage {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  background: var(--bg-0);
}

.faces-workspace__whole-graph-hint {
  flex: 0 0 auto;
  margin: 0;
  padding: 9px 13px 10px;
  border-top: 1px solid var(--line);
}

.faces-workspace__photo-grid,
.faces-workspace__photo-loading,
.faces-workspace__loading {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.faces-workspace__loading {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.faces-workspace__loading span,
.faces-workspace__photo-loading span {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 9px;
  background: linear-gradient(90deg, var(--bg-1), var(--bg-2), var(--bg-1));
  background-size: 220% 100%;
  animation: faces-loading-shimmer 1.3s ease-in-out infinite;
}

.faces-workspace__photo {
  min-width: 0;
}

.faces-workspace__photo > button {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: var(--bg-3);
}

.faces-workspace__photo > button img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 200ms ease-out;
}

.faces-workspace__photo > button:hover img {
  transform: scale(1.025);
}

.faces-workspace__photo-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 8px 2px 0;
}

.faces-workspace__photo-meta strong,
.faces-workspace__photo-meta > span {
  overflow: hidden;
  max-width: 100%;
  color: var(--text-1);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faces-workspace__photo-meta a,
.faces-workspace__photo-meta p button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--focus);
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faces-workspace__photo-meta p {
  width: 100%;
  overflow: hidden;
  margin: 1px 0 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faces-workspace__state {
  width: min(560px, 100%);
  margin: 9vh auto 0;
  text-align: center;
}

.faces-workspace__state strong {
  font-size: 17px;
}

.faces-workspace__state p {
  margin: 7px auto 14px;
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.5;
  text-wrap: pretty;
}

.faces-workspace__state--error strong,
.faces-workspace__state--error p {
  color: var(--danger);
}


@keyframes faces-loading-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (max-width: 1150px) {
  .faces-workspace__detail--with-graph {
    grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
  }

  .faces-workspace__whole-graph {
    position: static;
    height: 520px;
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .faces-workspace__header {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .faces-workspace__identity h1 {
    white-space: normal;
  }

  .faces-workspace__header-actions {
    justify-content: flex-start;
  }

  .faces-workspace__detail {
    grid-template-columns: 1fr;
  }

  .faces-workspace__whole-graph {
    height: 440px;
    grid-column: auto;
  }

  .faces-workspace__subject {
    position: static;
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    align-items: center;
  }

  .faces-workspace__subject > img {
    grid-row: 1 / span 2;
  }

  .faces-workspace__assign {
    grid-column: 1 / -1;
  }
}

@media (max-width: 500px) {
  .faces-workspace__body {
    padding-inline: 12px;
  }

  .faces-workspace__tabs {
    padding-inline: 8px;
  }

  .faces-workspace__tab {
    flex: 1 1 33.333%;
    padding-inline: 6px;
  }

  .faces-workspace__photo-grid,
  .faces-workspace__photo-loading,
  .faces-workspace__cluster-grid {
    grid-template-columns: 1fr;
  }

  .faces-workspace__photos-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .faces-workspace__photos-heading > span {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faces-panel__loading span,
  .faces-workspace__loading span,
  .faces-workspace__photo-loading span {
    animation: none;
  }

  .faces-workspace__cluster,
  .faces-workspace__photo > button img {
    transition: none;
  }

  .faces-workspace__cluster:hover,
  .faces-workspace__photo > button:hover img {
    transform: none;
  }
}

/* PQ1 operator leads workspace and contextual topbar search */
.lead-inbox__workspace-button {
  width: 100%;
}

.topbar-location {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 7px;
}

.topbar-location__label {
  flex: 0 0 auto;
  color: var(--text-2);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-active-case--web {
  background: color-mix(in srgb, var(--bg-3) 58%, transparent);
}

.brand-active-case--web .brand-active-case__name {
  color: var(--text-1);
  font-weight: 550;
}

.topbar-search {
  position: relative;
  display: flex;
  min-width: 34px;
  flex: 0 0 auto;
  align-items: center;
}

.topbar-search--expanded {
  width: clamp(220px, 25vw, 360px);
}

.topbar-search .search-box {
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: 1 1 auto;
}

.topbar-search--expanded .search-box > input {
  padding-right: 56px;
}

.topbar-search--expanded .search-box__status {
  right: 35px;
}

.topbar-search__trigger svg {
  width: 18px;
  height: 18px;
}

.topbar-search__close {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 5px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-1);
  font-size: 18px;
  transform: translateY(-50%);
}

.topbar-search__close:hover {
  background: var(--bg-3);
  color: var(--text-0);
}

.leads-workspace {
  position: relative;
  z-index: 15;
  display: flex;
  width: 100%;
  height: 100%;
  grid-column: 1;
  grid-row: 2;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: var(--bg-0);
  color: var(--text-0);
}

.leads-workspace__header {
  display: flex;
  min-height: 70px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}

.leads-workspace__identity {
  display: flex;
  min-width: 0;
  flex: 1 1 260px;
  align-items: center;
  gap: 12px;
}

.leads-workspace__identity > div {
  min-width: 0;
}

.leads-workspace__identity p {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leads-workspace__identity h1 {
  overflow: hidden;
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-wrap: balance;
  white-space: nowrap;
}

.leads-workspace__identity span {
  display: block;
  margin-top: 3px;
  color: var(--text-2);
  font-size: 11px;
}

.leads-workspace__header-actions {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.leads-workspace__quick-add {
  display: grid;
  width: min(720px, 58vw);
  min-width: 0;
  grid-template-columns: minmax(150px, 1.4fr) minmax(130px, 1fr) 88px auto;
  align-items: center;
  gap: 7px;
}

.leads-workspace__quick-add input,
.leads-workspace__quick-add select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 11px;
}

.leads-workspace__quick-add input::placeholder {
  color: var(--text-1);
}

.leads-workspace__attachment {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  grid-column: 1 / -1;
  align-items: center;
  gap: 7px;
  padding: 3px 4px 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 13%, var(--bg-1));
  color: var(--text-1);
  font-size: 10px;
}

.leads-workspace__attachment > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leads-workspace__attachment strong {
  color: var(--text-0);
  font-weight: 650;
}

.leads-workspace__attachment button {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-1);
  font-size: 15px;
  line-height: 1;
}

.leads-workspace__attachment button:hover {
  background: var(--bg-3);
  color: var(--text-0);
}

.leads-workspace__quick-add-error {
  grid-column: 1 / -1;
  color: var(--danger);
  font-size: 10px;
  line-height: 1.35;
}

.leads-workspace__dup-hint {
  max-height: 132px;
  grid-column: 1 / -1;
  overflow-y: auto;
  font-size: 10px;
}

.leads-workspace__dup-hint .search-result {
  min-height: 28px;
  padding: 5px 8px;
}

.leads-workspace__dup-hint small {
  font-size: 9px;
}

.leads-workspace__dup-hint .lead-dup-hint__row--selected {
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-1));
}

.leads-workspace__toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}

.leads-workspace__tabs {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  gap: 2px;
  overflow-x: auto;
}

.leads-workspace__tab {
  position: relative;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 15px;
  border: 0;
  background: transparent;
  color: var(--text-1);
  font-size: 12px;
  font-weight: 650;
}

.leads-workspace__tab:hover {
  background: var(--bg-2);
  color: var(--text-0);
}

.leads-workspace__tab::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  content: "";
  background: transparent;
}

.leads-workspace__tab--active {
  color: var(--text-0);
}

.leads-workspace__tab--active::after {
  background: var(--accent);
}

.leads-workspace__tab span {
  display: inline-grid;
  min-width: 22px;
  min-height: 19px;
  margin-left: 5px;
  place-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 10px;
}

.leads-workspace__view-toggle {
  display: inline-flex;
  align-self: center;
  flex: 0 0 auto;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-0);
}

.leads-workspace__view-toggle button {
  min-height: 26px;
  padding: 4px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 650;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}

.leads-workspace__view-toggle button:hover {
  color: var(--text-0);
}

.leads-workspace__view-toggle button[aria-pressed="true"] {
  background: var(--bg-3);
  color: var(--text-0);
}

.leads-workspace__body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: clamp(18px, 3vw, 38px) clamp(18px, 4vw, 58px) 64px;
}

.leads-workspace__notice {
  display: flex;
  width: min(1180px, 100%);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto 14px;
  padding: 9px 11px;
  border-radius: 7px;
  background: var(--bg-2);
  font-size: 11px;
}

.leads-workspace__notice--error {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, var(--bg-1));
}

.leads-workspace__loading,
.leads-workspace__list,
.leads-workspace__grid {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.leads-workspace__loading {
  display: flex;
  flex-direction: column;
}

.leads-workspace__loading span {
  display: block;
  height: 72px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, var(--bg-2), transparent);
  background-size: 220% 100%;
  animation: leads-loading-shimmer 1.3s ease-in-out infinite;
}

.leads-workspace__list {
  border-top: 1px solid var(--line-strong);
}

.leads-workspace__list-heading,
.leads-workspace__row {
  display: grid;
  grid-template-columns: 100px minmax(240px, 1fr) minmax(160px, 0.6fr) 100px;
  align-items: center;
  gap: 16px;
}

.leads-workspace__list-heading {
  min-height: 32px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text-2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.leads-workspace__row {
  width: 100%;
  min-height: 76px;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text-0);
  text-align: left;
  transition: background-color 160ms ease-out;
}

.leads-workspace__row:hover {
  background: var(--bg-1);
}

.leads-workspace__row:active {
  background: var(--bg-2);
}

.leads-workspace__row .lead-chip {
  justify-self: start;
}

.leads-workspace__row-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.leads-workspace__row-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leads-workspace__row-copy small {
  overflow: hidden;
  color: var(--text-2);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leads-workspace__row-origin,
.leads-workspace__row-age {
  overflow: hidden;
  color: var(--text-1);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leads-workspace__row-age {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.leads-workspace__row-age span {
  color: var(--text-1);
  font-size: 15px;
}

.leads-workspace__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  align-items: stretch;
  gap: 14px;
}

.leads-workspace__card {
  display: flex;
  min-width: 0;
  min-height: 204px;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-1);
  color: var(--text-0);
  text-align: left;
  transition: border-color 160ms ease-out, background-color 160ms ease-out;
}

.leads-workspace__card:hover {
  border-color: var(--line-strong);
  background: var(--bg-2);
}

.leads-workspace__card:active {
  background: var(--bg-3);
}

.leads-workspace__card--selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-1));
  outline: 1px solid var(--accent);
  outline-offset: -2px;
}

.leads-workspace__card-open {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.leads-video-thumb {
  --leads-video-play-size: 48px;
  position: relative;
  display: block;
  width: 100%;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #05070a;
  color: #fff;
  line-height: 0;
}

.leads-video-thumb--card {
  --leads-video-play-size: 42px;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
}

.leads-video-thumb img {
  display: block;
  width: 100%;
}

.leads-video-thumb--card img {
  height: 100%;
  object-fit: cover;
}

.leads-video-thumb--detail img {
  max-height: min(58vh, 620px);
  object-fit: contain;
}

.leads-video-thumb--audio {
  min-height: 180px;
}

.leads-video-thumb--audio.leads-video-thumb--card {
  min-height: 0;
}

.leads-audio-waveform {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: inherit;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px;
  background: #05070a;
  color: #aeb9c8;
  line-height: 1.2;
}

.leads-audio-waveform svg {
  width: min(58%, 220px);
  height: auto;
  fill: var(--accent);
  opacity: 0.84;
}

.leads-audio-waveform > span {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.leads-video-thumb__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: var(--leads-video-play-size);
  height: var(--leads-video-play-size);
  place-items: center;
  border: 1px solid rgb(255 255 255 / 68%);
  border-radius: 50%;
  background: rgb(5 7 10 / 78%);
  box-shadow: 0 2px 8px rgb(0 0 0 / 42%);
  transform: translate(-50%, -50%);
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}

.leads-video-thumb__play::before {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
  content: "";
}

.leads-video-thumb:hover .leads-video-thumb__play {
  background: rgb(5 7 10 / 92%);
  transform: translate(-50%, -50%) scale(1.06);
}

.leads-video-thumb:active .leads-video-thumb__play {
  transform: translate(-50%, -50%) scale(0.98);
}

.leads-workspace__card-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.leads-workspace__card-copy {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-wrap: pretty;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.leads-workspace__card-origin {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--focus);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leads-workspace__card-origin > span {
  flex: 0 0 auto;
}

.leads-workspace__card-footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.leads-workspace__card-age {
  color: var(--text-2);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.leads-workspace__card-handoff {
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 999px;
  background: #16301f;
  color: #83d3a1;
  font-size: 9px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leads-workspace__state {
  width: min(560px, 100%);
  margin: 10vh auto 0;
  text-align: center;
}

.leads-workspace__state strong {
  font-size: 17px;
}

.leads-workspace__state p {
  margin: 7px auto 0;
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.5;
  text-wrap: pretty;
}

.leads-workspace__detail {
  display: grid;
  width: min(1280px, 100%);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
  gap: clamp(30px, 5vw, 72px);
}

.leads-workspace__brief {
  min-width: 0;
}

.leads-workspace__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--text-2);
  font-size: 10px;
}

.leads-workspace__lead-text {
  padding: 24px 0 28px;
}

.leads-workspace__lead-text h2,
.leads-workspace__section-heading h2,
.leads-workspace__actions h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.leads-workspace__lead-text p {
  max-width: 72ch;
  margin: 10px 0 12px;
  color: var(--text-0);
  font-size: 17px;
  line-height: 1.65;
  text-wrap: pretty;
  white-space: pre-wrap;
}

.leads-workspace__lead-text a,
.leads-workspace__evidence a {
  color: var(--focus);
  font-size: 11px;
}

.leads-workspace__evidence {
  margin: 0;
  padding: 22px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.leads-workspace__section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.leads-workspace__section-heading p {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 10px;
}

.leads-workspace__evidence > img {
  display: block;
  width: 100%;
  max-height: min(58vh, 620px);
  background: #05070a;
  object-fit: contain;
}

.leads-workspace__evidence-fallback {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 4px;
  background: var(--bg-1);
  color: var(--text-1);
  text-align: center;
}

.leads-workspace__evidence-fallback strong {
  color: var(--text-0);
}

.leads-workspace__evidence-fallback span {
  font-size: 11px;
}

.leads-workspace__origin-link {
  display: grid;
  width: 100%;
  min-height: 150px;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-1);
  color: var(--text-0);
  text-align: center;
}

.leads-workspace__origin-link:hover {
  border-color: var(--focus);
  background: var(--bg-2);
}

.leads-workspace__origin-link > span,
.leads-workspace__origin-link > small {
  color: var(--text-2);
  font-size: 10px;
}

.leads-workspace__origin-link > strong {
  font-size: 15px;
}

.leads-workspace__evidence figcaption {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 10px;
  color: var(--text-1);
  font-size: 11px;
}

.leads-workspace__evidence figcaption > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leads-workspace__evidence figcaption > div {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

.leads-workspace__notes {
  padding: 26px 0;
}

.leads-workspace__notes-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leads-workspace__notes-editor textarea {
  width: 100%;
  min-height: 156px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-1);
  color: var(--text-0);
  font: inherit;
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
}

.leads-workspace__notes-editor textarea::placeholder {
  color: var(--text-1);
}

.leads-workspace__notes-editor > div {
  display: flex;
  gap: 8px;
}

.leads-workspace__note-copy {
  max-width: 72ch;
  margin: 0;
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.leads-workspace__note-copy--empty {
  color: var(--text-2);
  font-style: italic;
}

.leads-workspace__actions {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.leads-workspace__actions > div {
  margin-bottom: 7px;
}

.leads-workspace__actions p {
  margin: 5px 0 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.5;
}

.leads-workspace__actions label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 5px;
}

.leads-workspace__actions label > span {
  color: var(--text-2);
  font-size: 10px;
  font-weight: 650;
}

.leads-workspace__actions select {
  width: 100%;
  height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-1);
  color: var(--text-0);
  font-size: 12px;
}

.leads-workspace__promoted-link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: baseline;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--focus);
  font-size: 11px;
  text-align: left;
}

.leads-workspace__promoted-link span:first-child {
  color: var(--text-1);
}

.leads-workspace__promoted-link strong {
  overflow: hidden;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--focus) 50%, transparent);
  text-underline-offset: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leads-workspace__promoted-link:hover strong {
  text-decoration-color: currentColor;
}

.leads-workspace__promoted-link--card {
  flex: 0 0 auto;
}

.leads-workspace__promoted-link--detail {
  margin-top: 14px;
}

.leads-workspace__promote-panel {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg-1);
}

.leads-workspace__promote-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.leads-workspace__promote-heading strong {
  font-size: 12px;
  font-weight: 650;
}

.leads-workspace__promote-paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-0);
}

.leads-workspace__promote-paths button {
  min-height: 28px;
  padding: 5px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 650;
}

.leads-workspace__promote-paths button[aria-pressed="true"] {
  background: var(--bg-3);
  color: var(--text-0);
}

.leads-workspace__promote-panel form,
.leads-workspace__promote-link-path {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.leads-workspace__promote-panel .field {
  margin: 0;
}

.leads-workspace__promote-panel input,
.leads-workspace__promote-panel textarea {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-0);
  color: var(--text-0);
  font: inherit;
  font-size: 11px;
}

.leads-workspace__promote-panel input {
  height: 34px;
}

.leads-workspace__promote-panel textarea {
  line-height: 1.45;
  resize: vertical;
}

.leads-workspace__promote-panel .button {
  width: 100%;
  justify-content: center;
}

.leads-workspace__promote-link-path > p {
  margin: -2px 0 0;
  color: var(--text-2);
  font-size: 9px;
  line-height: 1.45;
}

.leads-workspace__promote-error {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: var(--danger);
  font-size: 10px;
  line-height: 1.45;
}

.leads-workspace__promote-error > span {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.leads-workspace__promote-error .text-button {
  min-height: 0;
  flex: 0 0 auto;
  padding: 1px 2px;
  color: inherit;
  font-size: 9px;
}

.edge-rows-builder {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 3px;
}

.edge-rows-builder__heading,
.edge-rows-builder__row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.edge-rows-builder__heading > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.edge-rows-builder__heading strong,
.edge-rows-builder__row-heading strong {
  color: var(--text-1);
  font-size: 10px;
  font-weight: 650;
}

.edge-rows-builder__heading small {
  color: var(--text-2);
  font-size: 9px;
}

.edge-rows-builder__empty {
  margin: 0;
  padding: 7px 8px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--text-2);
  font-size: 9px;
  line-height: 1.4;
  text-align: center;
}

.edge-rows-builder__rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edge-rows-builder__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-0);
}

.edge-rows-builder__remove {
  width: auto;
  padding: 0;
  color: var(--danger);
  font-size: 9px;
}

.edge-rows-builder__direction {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-1);
  color: var(--text-1);
  font-size: 9px;
  font-weight: 650;
}

.edge-rows-builder__direction:hover:not(:disabled) {
  border-color: var(--focus);
  color: var(--text-0);
}

.edge-rows-builder__direction span:first-child {
  text-align: right;
}

.edge-rows-builder__direction span:nth-child(3) {
  text-align: left;
}

.edge-rows-builder__arrow {
  color: var(--focus);
  font-size: 13px;
}

.edge-rows-builder__swap {
  padding-left: 3px;
  color: var(--text-2);
  font-size: 13px;
}

.leads-workspace__promote-panel .edge-rows-builder .button {
  width: auto;
}

.leads-workspace__actions > .button {
  width: 100%;
  justify-content: center;
}

.leads-workspace__actions > .lead-confirm {
  flex-direction: column;
  align-items: stretch;
}

.leads-workspace__actions > .lead-confirm .lead-confirm__actions {
  justify-content: flex-end;
}

.leads-workspace__saving {
  color: var(--text-2);
  font-size: 10px;
  text-align: center;
}

.leads-workspace__video-modal {
  position: fixed;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(3, 5, 8, 0.9);
}

.leads-workspace__video-shell {
  display: flex;
  width: min(1120px, 100%);
  max-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #394556;
  border-radius: 10px;
  background: #0b1017;
  color: #edf3fb;
}

.leads-workspace__video-shell header {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 10px 8px 16px;
}

.leads-workspace__video-shell header > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.leads-workspace__video-shell header strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leads-workspace__video-shell header span {
  color: #aeb9c8;
  font-size: 10px;
}

.leads-workspace__video-shell video {
  width: 100%;
  min-height: 0;
  max-height: calc(100vh - 140px);
  background: #000;
}

.leads-workspace__audio-player {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: clamp(28px, 6vw, 72px);
  border-top: 1px solid #263142;
  background: #05070a;
}

.leads-workspace__audio-player audio {
  width: min(720px, 100%);
}

@keyframes leads-loading-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (max-width: 1180px) {
  .topbar-location {
    flex: 1 1 180px;
  }

  .topbar-search--expanded {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

  .leads-workspace__header {
    flex-wrap: wrap;
  }

  .leads-workspace__header-actions {
    width: 100%;
    flex-basis: 100%;
  }

  .leads-workspace__quick-add {
    width: auto;
    flex: 1 1 auto;
  }
}


@media (max-width: 760px) {
  .leads-workspace__header {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .leads-workspace__identity h1 {
    white-space: normal;
  }

  .leads-workspace__header-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .leads-workspace__quick-add {
    width: 100%;
    flex-basis: 100%;
  }

  .leads-workspace__toolbar {
    flex-wrap: wrap;
    gap: 0;
  }

  .leads-workspace__tabs {
    flex-basis: 100%;
  }

  .leads-workspace__view-toggle {
    margin: 0 0 8px auto;
  }

  .leads-workspace__detail {
    grid-template-columns: 1fr;
  }

  .leads-workspace__actions {
    position: static;
    grid-row: 1;
  }

  .leads-workspace__list-heading {
    display: none;
  }

  .leads-workspace__row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px 12px;
  }

  .leads-workspace__row-copy {
    grid-column: 2;
  }

  .leads-workspace__row-origin {
    grid-column: 2;
    grid-row: 2;
  }

  .leads-workspace__row-age {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 520px) {
  .topbar-location__label {
    display: none;
  }

  .topbar-location {
    flex: 1 1 100px;
  }

  .brand-active-case {
    max-width: 34vw;
  }

  .leads-workspace__body {
    padding-inline: 12px;
  }

  .leads-workspace__quick-add {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .leads-workspace__quick-add input,
  .leads-workspace__quick-add-error {
    grid-column: 1 / -1;
  }

  .leads-workspace__tabs {
    padding-inline: 8px;
  }

  .leads-workspace__tab {
    flex: 1 1 25%;
    padding-inline: 8px;
  }

  .leads-workspace__tab span {
    display: block;
    width: max-content;
    margin: 3px auto 0;
  }

  .leads-workspace__evidence figcaption,
  .leads-workspace__section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .leads-workspace__evidence figcaption > div {
    width: 100%;
    flex-wrap: wrap;
  }

  .leads-workspace__video-modal {
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leads-workspace__loading span {
    animation: none;
  }

  .leads-workspace__row,
  .leads-workspace__card,
  .leads-video-thumb__play,
  .leads-workspace__view-toggle button {
    transition: none;
  }
}
/* PQ14 web breadcrumb switcher */
.app--booting {
  place-items: center;
}

.web-bootstrap {
  display: flex;
  grid-row: 1 / -1;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-1);
  font-size: 13px;
}

.web-bootstrap strong {
  color: var(--text-0);
  font-size: 15px;
}

.web-switcher {
  position: relative;
  min-width: 0;
  flex: 0 1 auto;
}

.web-switcher > summary {
  list-style: none;
}

.web-switcher > summary::-webkit-details-marker {
  display: none;
}

.web-switcher__trigger,
.web-switcher--legacy {
  display: inline-flex;
  min-width: 0;
  max-width: min(22vw, 240px);
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-0);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.web-switcher__trigger {
  cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}

.web-switcher__trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-switcher__trigger svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: var(--text-2);
  transition: transform 160ms ease-out;
}

.web-switcher__trigger:hover,
.web-switcher[open] .web-switcher__trigger {
  background: var(--bg-3);
}

.web-switcher[open] .web-switcher__trigger svg {
  transform: rotate(180deg);
}

.web-switcher__trigger:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.web-switcher--legacy {
  color: var(--text-1);
  font-weight: 600;
}

.topbar-location__separator {
  flex: 0 0 auto;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1;
}

.web-switcher__menu {
  position: absolute;
  z-index: 19;
  top: calc(100% + 8px);
  left: 0;
  width: min(300px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg-1);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.32);
}

.web-switcher__heading {
  padding: 10px 12px 8px;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 700;
}

.web-switcher__list {
  max-height: min(320px, calc(100vh - 150px));
  overflow-y: auto;
  padding: 2px 6px 6px;
}

.web-switcher__row {
  display: flex;
  align-items: center;
  border-radius: 6px;
}

.web-switcher__row:hover,
.web-switcher__row:focus-within {
  background: var(--bg-3);
}

.web-switcher__item,
.web-switcher__create {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-1);
  font-size: 12px;
  text-align: left;
}

.web-switcher__row .web-switcher__item {
  min-width: 0;
  flex: 1 1 auto;
}

.web-switcher__item:hover,
.web-switcher__item:focus-visible,
.web-switcher__create:hover,
.web-switcher__create:focus-visible {
  background: var(--bg-3);
  color: var(--text-0);
}

.web-switcher__rename {
  flex: 0 0 auto;
  margin-right: 6px;
  padding: 4px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 650;
}

.web-switcher__rename:hover,
.web-switcher__rename:focus-visible {
  background: var(--bg-2);
  color: var(--text-0);
}

.web-switcher__rename:focus-visible,
.web-switcher__rename-input:focus-visible,
.web-switcher__rename-save:focus-visible,
.web-switcher__rename-cancel:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.web-switcher__rename-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px 8px;
}

.web-switcher__rename-input {
  min-width: 0;
  flex: 1 1 150px;
  height: 30px;
  padding: 5px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--bg-0);
  color: var(--text-0);
  font: inherit;
  font-size: 12px;
}

.web-switcher__rename-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.web-switcher__rename-save,
.web-switcher__rename-cancel {
  padding: 5px 7px;
  border: 0;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
}

.web-switcher__rename-save {
  background: var(--accent);
  color: var(--accent-ink);
}

.web-switcher__rename-save:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 86%, var(--text-0));
}

.web-switcher__rename-cancel {
  background: var(--bg-3);
  color: var(--text-1);
}

.web-switcher__rename-cancel:hover:not(:disabled) {
  background: var(--line);
  color: var(--text-0);
}

.web-switcher__rename-save:disabled,
.web-switcher__rename-cancel:disabled {
  cursor: wait;
  opacity: 0.6;
}

.web-switcher__rename-error {
  width: 100%;
  color: var(--danger);
  font-size: 10px;
  line-height: 1.35;
}

.web-switcher__item--active {
  color: var(--text-0);
}

.web-switcher__check {
  width: 14px;
  flex: 0 0 14px;
  color: var(--accent);
  font-weight: 800;
  text-align: center;
}

.web-switcher__name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-switcher__default {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-2);
  font-size: 9px;
}

.web-switcher__create {
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 14px;
  color: var(--text-0);
  font-weight: 650;
}

.web-switcher__create span {
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
}

.web-create-form {
  width: min(360px, 100%);
}

.web-create-form .form-actions {
  justify-content: flex-end;
}

.web-create-form .form-error {
  margin: 0;
}

.web-toast {
  position: fixed;
  z-index: 21;
  top: 66px;
  left: 50%;
  max-width: min(460px, calc(100vw - 28px));
  transform: translateX(-50%);
  padding: 9px 12px;
  border: 1px solid #66572b;
  border-radius: 7px;
  background: #262314;
  color: #f1df95;
  font-size: 12px;
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 850px) {
  .web-switcher__trigger,
  .web-switcher--legacy {
    max-width: 140px;
  }
}

@media (max-width: 520px) {
  .web-switcher__trigger,
  .web-switcher--legacy {
    max-width: 28vw;
    padding-inline: 4px;
  }

  .topbar-location__separator {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .web-switcher__trigger,
  .web-switcher__trigger svg {
    transition: none;
  }
}
