.cd-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter, 1.25em);
  padding: var(--gutter, 1.25em);
  border-bottom: 1px solid var(--border-color);
}
.cd-side {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3, 0.75em);
}
.cd-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2, 0.5em);
  flex-wrap: wrap;
}
.cd-side-title {
  font-weight: 700;
  color: var(--text-color);
}
.cd-side-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2, 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(--panel-bg);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-strong);
  border-right: 1px solid var(--border-color);
  padding: 0.6em 0.7em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.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-cards {
  display: none;
  flex-direction: column;
  gap: 0.75em;
  padding: 0.75em;
}
.cd-card {
  border: 1px solid var(--border-strong);
  background: var(--card-bg);
  padding: 0.75em 1em;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.12);
}
.cd-card header {
  display: flex;
  justify-content: space-between;
  gap: 0.5em;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4em;
  margin-bottom: 0.5em;
}
.cd-card dl {
  margin: 0;
  display: grid;
  gap: 0.35em;
}
.cd-card dl div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.5em;
  font-size: 0.88rem;
}
.cd-card dt {
  color: var(--muted-text);
  font-weight: 700;
}
.cd-card dd {
  margin: 0;
  color: var(--text-color);
  overflow-wrap: anywhere;
}
.cd-table-wrap,
.cd-cards,
.tpanel {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
@media (min-width: 761px) {
  .cd-table-wrap {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 440px;
  }
}
@media (max-width: 760px) {
  .cd-table-wrap {
    overflow: visible;
    max-height: none;
  }
  .cd-table {
    table-layout: fixed;
  }
  .cd-table th,
  .cd-table td {
    white-space: normal;
    max-width: none;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .cd-cards {
    display: flex;
  }
  .stepper {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2, 0.5em);
    overflow: visible;
  }
  .stepper li {
    flex: 1 1 auto;
    width: 100%;
    white-space: normal;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    justify-content: flex-start;
  }
  .cd-key {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5em;
  }
  .cd-key .tlabel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.4em;
  }
  .cd-key select,
  .cd-key .tlabel select {
    width: 100%;
    max-width: none;
  }
  .cd-side select {
    width: 100%;
    max-width: none;
  }
}
.cd-rail {
  justify-content: center;
}
.cd-hint {
  display: block;
  text-align: center;
  margin: 0.6em auto 0;
}
