.cd-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25em;
  padding: 1.25em;
  border-bottom: 1px solid var(--border-color);
}

.cd-side {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}

.cd-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  flex-wrap: wrap;
}

.cd-side-title {
  font-weight: 700;
  color: var(--text-color);
}

.cd-side-actions {
  display: flex;
  align-items: center;
  gap: 0.5em;
  flex-wrap: wrap;
}

.cd-area {
  min-height: 140px;
  resize: vertical;
  padding: 0.55em 0.65em;
  border: 1px solid var(--border-strong);
  background: var(--card-bg);
  color: var(--text-color);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.cd-area:focus {
  outline: none;
  border-color: var(--link-color);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.cd-key {
  display: flex;
  gap: 0.5em;
}

.cd-results {
  margin-top: 1.25em;
}

.cd-tabs {
  display: flex;
  gap: 0.4em;
  flex-wrap: wrap;
}

.cd-tab {
  border: 1px solid var(--border-strong);
  background: transparent;
  padding: 0.4em 0.85em;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-color);
  border-radius: var(--border-radius);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.cd-tab:hover {
  background: var(--surface-hover);
}

.cd-tab.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.cd-table-wrap {
  max-height: 440px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.cd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.cd-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  background: var(--section-bg);
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-strong);
  border-right: 1px solid var(--border-color);
  padding: 0.55em 0.7em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cd-table th:last-child {
  border-right: none;
}

.cd-table td {
  padding: 0.45em 0.7em;
  border-bottom: 1px solid var(--border-color);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cd-table tr.row-added td {
  background: #f0fdf4;
}

.cd-table tr.row-removed td {
  background: #fef2f2;
}

.cd-table tr.row-changed td {
  background: #fffbeb;
}

@media (max-width: 820px) {
  .cd-sides {
    grid-template-columns: 1fr;
  }
}
.cd-rail {
  justify-content: center;
}
.cd-hint {
  display: block;
  text-align: center;
  margin: 0.6em auto 0;
}
