.match-copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.match-filter-toggles { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.results-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -10px 0 24px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(105deg, #14231a, #101b14);
}

.results-summary-count {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.results-summary-count strong {
  color: var(--text);
  font: 800 20px/1 Manrope, sans-serif;
  letter-spacing: -.04em;
}

.results-summary-count strong span { color: #8fbe9d; font-size: 14px; }

.results-summary-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #38513e;
  border-radius: 999px;
  background: #17281d;
  color: #c4d2c6;
  font-size: 11px;
  line-height: 1.25;
}

.summary-chip i {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  background: #d9ee781c;
  color: var(--accent);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.summary-chip.is-active { border-color: #667d3b; color: #e1efaa; }
.summary-chip.is-muted { color: var(--muted); }
.summary-chip.is-muted i { background: #ffffff0c; color: var(--muted); }

.thc-range-rule {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text) !important;
  cursor: pointer;
}

.thc-range-rule input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.email-template-button {
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.email-template-button:hover,
.email-template-button.copied {
  border-color: var(--green);
  background: var(--panel2);
  color: var(--accent);
}

.email-template-button:disabled {
  cursor: default;
}

.email-template-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.match-copy-button {
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.match-copy-button:hover,
.match-copy-button.copied {
  border-color: var(--green);
  background: var(--panel2);
  color: var(--accent);
}

.match-copy-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.name-copy-dialog {
  width: min(560px, calc(100% - 28px));
  padding: 28px;
}

.name-copy-dialog h2 {
  margin: 7px 48px 20px 0;
  font-size: 25px;
}

.name-copy-options {
  display: grid;
  gap: 10px;
}

.name-copy-options button {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.name-copy-options button:hover,
.name-copy-options button:focus-visible {
  border-color: var(--accent);
  background: rgba(217, 238, 120, .1);
  outline: none;
}

.name-copy-options button:disabled { cursor: wait; opacity: .7; }
.name-copy-options strong { font: 800 14px Manrope, sans-serif; }
.name-copy-options small { color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.name-copy-status { margin: 12px 0 0; color: var(--accent); font-size: 12px; font-weight: 700; text-align: center; }

.selected-strain .match-copy-button {
  align-self: auto;
  width: 29px;
  height: 29px;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 7px;
  background: transparent !important;
  color: var(--muted) !important;
  font-weight: inherit;
}

.selected-strain .match-copy-button:hover,
.selected-strain .match-copy-button.copied {
  border-color: var(--green) !important;
  background: var(--panel2) !important;
  color: var(--accent) !important;
}

.compare-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 48px 16px 0;
}

.compare-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(217, 238, 120, .3);
  border-radius: 999px;
  background: rgba(217, 238, 120, .08);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.compare-score-badge strong {
  color: var(--accent);
  font: 800 13px Manrope;
}

.compare-column-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.compare-column-title > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.compare-column-title .match-copy-button {
  flex: 0 0 auto;
}

.compare-profile-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.compare-profile-item i {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.compare-profile-item.is-shared i {
  background: rgba(143, 190, 157, .2);
  color: #bfe4c8;
}

.compare-profile-item.is-unique i {
  background: rgba(237, 167, 105, .16);
  color: var(--orange);
}

.compare-grid .profile-row-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.profile-row-label small {
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
}

.compare-profile-cell {
  background: transparent;
}

.compare-profile-items {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 7px;
}

.compare-profile-item {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.compare-profile-item.is-shared {
  border-color: rgba(143, 190, 157, .42);
  background: rgba(71, 130, 85, .12);
  color: #c9e8d0;
}

.compare-profile-item.is-unique {
  border-color: rgba(237, 167, 105, .3);
  background: rgba(190, 122, 66, .08);
  color: #e7bea0;
}

.compare-profile-empty {
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
}

@media (max-width: 600px) {
  .match-controls { width: 100%; align-items: stretch; flex-direction: column; }
  .match-controls > label { width: 100%; justify-content: space-between; }
  .compare-toolbar { align-items: flex-start; flex-direction: column; margin-right: 42px; }
  .compare-column-title { align-items: flex-start; flex-direction: column; }
  .name-copy-dialog { padding: 24px 20px; }
}
