
/* Global Search: stop screenshot previews stretching into full-height rails and
   keep expanded evidence inside the result card instead of blowing up the page. */
body[data-r158-view="search"] .r158-search-grid{
  gap:12px!important;align-items:start!important;
}
body[data-r158-view="search"] .r158-result-card{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  align-self:start!important;align-items:start!important;
  border-radius:11px!important;overflow:hidden!important;
  box-shadow:0 4px 16px rgba(18,55,64,.035)!important;
}
body[data-r158-view="search"] .r158-result-shot{
  display:block!important;width:100%!important;max-width:none!important;flex:none!important;
  height:142px!important;min-height:142px!important;align-self:start!important;
  border-bottom:1px solid #e2e9e5!important;background:#eaf0e6!important;
}
body[data-r158-view="search"] .r158-result-shot .r158-shot{
  width:100%!important;height:142px!important;min-height:142px!important;border-radius:0!important;
}
body[data-r158-view="search"] .r158-result-main{
  padding:14px 16px 16px!important;
}
body[data-r158-view="search"] .r158-result-title h3{
  font-size:14px!important;margin-bottom:7px!important;
}
body[data-r158-view="search"] .r158-match-preview{
  margin:9px 0!important;font-size:10px!important;line-height:1.5!important;
}
body[data-r158-view="search"] .r158-result-card details{
  margin:4px 0 8px!important;padding:8px 0!important;
}
body[data-r158-view="search"] .r158-result-card .r158-records{
  max-height:280px!important;overflow:auto!important;padding-right:4px!important;
}
body[data-r158-view="search"] .r158-records>div{
  margin-top:7px!important;padding:8px 9px!important;border-radius:6px!important;
}
body[data-r158-view="search"] .r158-records code{
  max-height:94px!important;overflow:auto!important;font-size:9px!important;
}
body[data-r158-view="search"] .r158-results-heading{
  margin:18px 0 14px!important;
}
body[data-r158-view="search"] .r158-results-toolbar{
  margin-bottom:12px!important;
}
@media(max-width:760px){
 body[data-r158-view="search"] .r158-search-grid{grid-template-columns:1fr!important}
 body[data-r158-view="search"] .r158-result-shot,
 body[data-r158-view="search"] .r158-result-shot .r158-shot{height:125px!important;min-height:125px!important}
}

/* Trace2Trace OPS R217 — Connections UI repair + visual consolidation */
.r212-connections .c2-workflow-divider{
  margin:34px 0 12px!important;padding:0 2px!important;align-items:flex-end!important;
}
.r212-connections .c2-workflow-divider h2{
  margin:5px 0 4px!important;font-size:28px!important;line-height:1.08!important;letter-spacing:-.045em!important;color:#143842!important;
}
.r212-connections .c2-workflow-divider p{
  max-width:940px!important;margin:0!important;font-size:10px!important;line-height:1.55!important;color:#71868b!important;
}
.r212-connections .c2-workflow-num{
  font-size:8px!important;letter-spacing:.16em!important;color:#aa8751!important;
}
.r212-connections .c2-workflow-icon{display:none!important}

/* Rebuild the research command bar. R212 had made it white while the base
   status copy remained light, and the dark primary button inherited dark text. */
.r212-connections .r212-search{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(260px,320px)!important;
  gap:22px!important;align-items:center!important;
  margin:0 0 10px!important;padding:18px 20px!important;
  background:
    radial-gradient(circle at 92% 20%,rgba(108,151,148,.15),transparent 34%),
    linear-gradient(135deg,#12353e 0%,#163f47 72%,#194951 100%)!important;
  border:1px solid #173f47!important;border-radius:14px!important;
  box-shadow:0 12px 32px rgba(18,55,64,.10)!important;color:#fff!important;
}
.r212-connections .r212-search form{max-width:none!important;min-width:0!important}
.r212-connections .r212-search label{
  margin-bottom:7px!important;color:#d8bd7b!important;font-size:8px!important;letter-spacing:.15em!important;font-weight:820!important;
}
.r212-connections .r212-search .c2-search-row{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:9px!important;align-items:stretch!important;
}
.r212-connections .r212-search .c2-search-field{
  height:49px!important;background:#fff!important;border:1px solid rgba(255,255,255,.7)!important;
  border-radius:9px!important;box-shadow:0 2px 10px rgba(2,25,32,.08)!important;
}
.r212-connections .r212-search .c2-search-field>span{color:#82979a!important;font-size:19px!important}
.r212-connections .r212-search .c2-search-field input{
  color:#173840!important;-webkit-text-fill-color:#173840!important;font-size:12px!important;font-weight:560!important;
}
.r212-connections .r212-search #c2RunBtn{
  min-width:190px!important;height:49px!important;padding:0 17px!important;
  border-radius:9px!important;border:1px solid #d9b46f!important;
  background:#d9b46f!important;color:#12343b!important;-webkit-text-fill-color:#12343b!important;
  font-size:10px!important;font-weight:820!important;box-shadow:0 3px 10px rgba(0,0,0,.08)!important;
}
.r212-connections .r212-search #c2RunBtn span{
  color:inherit!important;-webkit-text-fill-color:inherit!important;font-size:15px!important;
}
.r212-connections .r212-search #c2RunBtn:hover{
  background:#e4c07b!important;border-color:#e4c07b!important;transform:translateY(-1px);
}
.r212-connections .r212-search #c2RunBtn:disabled{
  opacity:.68!important;cursor:wait!important;transform:none!important;
}
.r212-connections .r212-search .c2-search-side{
  min-width:0!important;padding:4px 0 4px 20px!important;
  border-left:1px solid rgba(255,255,255,.16)!important;
  grid-template-columns:9px minmax(0,1fr)!important;column-gap:9px!important;row-gap:4px!important;
}
.r212-connections .r212-search .c2-status-dot{
  width:9px!important;height:9px!important;box-shadow:0 0 0 4px rgba(98,190,155,.12)!important;
}
.r212-connections .r212-search #c2Status{
  color:#edf7f5!important;-webkit-text-fill-color:#edf7f5!important;font-size:10px!important;font-weight:760!important;
}
.r212-connections .r212-search #c2Substatus{
  color:#aac1c3!important;-webkit-text-fill-color:#aac1c3!important;font-size:8px!important;line-height:1.45!important;
}

/* Compact evidence counters instead of five oversized empty cards. */
.r212-connections .r212-metrics{
  margin:8px 0 16px!important;gap:8px!important;
}
.r212-connections .r212-metrics article{
  min-height:86px!important;padding:13px 14px 12px!important;border-radius:10px!important;
  border:1px solid #dce5e1!important;border-top:2px solid #c8d7d1!important;
  background:#fff!important;box-shadow:0 3px 12px rgba(18,55,64,.025)!important;
}
.r212-connections .r212-metrics article>span{
  font-size:7px!important;letter-spacing:.11em!important;color:#71868b!important;
}
.r212-connections .r212-metrics article>div{margin-top:8px!important;gap:3px!important}
.r212-connections .r212-metrics strong{
  font-size:24px!important;letter-spacing:-.04em!important;color:#193f47!important;
}
.r212-connections .r212-metrics small{font-size:8px!important;line-height:1.35!important;color:#8b999c!important}

/* Stronger hierarchy for the actual investigation workspace. */
.r212-connections .c2-layout{
  grid-template-columns:minmax(0,1.72fr) minmax(300px,.76fr)!important;
  gap:10px!important;align-items:stretch!important;
}
.r212-connections .r212-graph,
.r212-connections .r212-inspector,
.r212-connections .r212-candidates{
  border-radius:12px!important;border-color:#dce5e1!important;
  box-shadow:0 5px 18px rgba(18,55,64,.035)!important;
}
.r212-connections .r212-graph .c2-section-head,
.r212-connections .r212-candidates .c2-section-head{
  padding:18px 20px 14px!important;
}
.r212-connections .r212-graph .c2-section-head h2,
.r212-connections .r212-candidates .c2-section-head h2{
  font-size:18px!important;letter-spacing:-.03em!important;
}
.r212-connections .r212-graph .c2-network-field{
  height:420px!important;margin:0 12px!important;border-radius:10px!important;
}
.r212-connections .r212-graph .c2-graph-foot{padding:9px 15px 13px!important}
.r212-connections .r212-inspector .c2-inspector-top{padding:18px 18px 11px!important}
.r212-connections .r212-inspector .c2-inspector-blank{min-height:390px!important}

/* Candidate review reads like one workspace rather than a second page. */
.r212-connections .r212-candidates{margin-top:10px!important}
.r212-connections .r212-candidates .c2-filter-row{
  padding:8px 20px 10px!important;background:#f7f9f7!important;border-top:1px solid #edf1ef!important;
}
.r212-connections .r212-candidates .c2-tabs{
  background:#edf3ef!important;border:1px solid #e0e7e3!important;padding:3px!important;
}
.r212-connections .r212-candidates .c2-tabs button{min-height:31px!important;padding:0 10px!important}
.r212-connections .r212-candidates .c2-toolbar-right input,
.r212-connections .r212-candidates .c2-toolbar-right select{min-height:35px!important;background:#fff!important}
.r212-connections .r212-candidates .c2-review-buttons button{
  border-radius:8px!important;background:#fff!important;color:#315a62!important;
}
.r212-connections .r212-candidates .c2-table th{
  background:#f6f8f6!important;color:#71868b!important;font-size:7px!important;letter-spacing:.09em!important;
}
.r212-connections .r212-candidates .c2-table td{padding-top:10px!important;padding-bottom:10px!important}

/* Stop the collapsed Method card stretching to the Saved Groups card height. */
.r212-connections .c2-lowgrid{
  align-items:start!important;gap:10px!important;margin-top:12px!important;
}
.r212-connections .r212-method-details,
.r212-connections .r212-saved-groups{
  align-self:start!important;min-height:0!important;height:auto!important;
}
.r212-connections .r212-method-details:not([open]) #method{display:none!important}
.r212-connections .r212-method-details>summary{
  min-height:74px!important;padding:14px 16px!important;background:#fff!important;
}
.r212-connections .r212-saved-groups .c2-section-head{padding:17px 18px 12px!important}
.r212-connections .r212-saved-groups .c2-group-list{max-height:300px!important}

/* Button contrast safeguards across Connections. */
.r212-connections button,
.r212-connections a{transition:background .13s ease,border-color .13s ease,transform .13s ease,box-shadow .13s ease}
.r212-connections #c2RunBtn,
.r212-connections #c2RunBtn *{opacity:1!important;visibility:visible!important}
.r212-connections .c2-modal-close{color:#244d55!important;-webkit-text-fill-color:#244d55!important}

@media(max-width:1050px){
 .r212-connections .r212-search{grid-template-columns:1fr!important}
 .r212-connections .r212-search .c2-search-side{border-left:0!important;border-top:1px solid rgba(255,255,255,.14)!important;padding:12px 0 0!important}
 .r212-connections .c2-layout{grid-template-columns:1fr!important}
 .r212-connections .r212-inspector .c2-inspector-blank{min-height:220px!important}
}
@media(max-width:760px){
 .r212-connections .r212-search .c2-search-row{grid-template-columns:1fr!important}
 .r212-connections .r212-search #c2RunBtn{width:100%!important}
 .r212-connections .r212-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:520px){
 .r212-connections .r212-metrics{grid-template-columns:1fr!important}
}
@media(prefers-reduced-motion:reduce){
 .r212-connections button,.r212-connections a{transition:none!important}
}
