.tdf-shell {
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.14), transparent 22rem),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.99));
}

.tdf-toolbar,
.tdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.tdf-panel,
.tdf-card {
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.tdf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
}

.tdf-field textarea {
  width: 100%;
  min-height: 18rem;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

.tdf-banner {
  margin-top: 12px;
  border-radius: 12px;
  padding: 12px 14px;
}

.tdf-banner--ok {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.tdf-banner--warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.tdf-results-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 16px;
}

.tdf-metric {
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 14px;
  padding: 14px;
  background: rgba(248, 250, 252, 0.92);
}

.tdf-metric-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted, #64748b);
}

.tdf-metric-value {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
  font-weight: 800;
}

.tdf-row-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.tdf-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: start;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 14px;
  padding: 14px;
}

.tdf-row--added {
  background: rgba(236, 253, 245, 0.92);
}

.tdf-row--removed {
  background: rgba(254, 242, 242, 0.92);
}

.tdf-row--unchanged {
  background: rgba(248, 250, 252, 0.92);
}

.tdf-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tdf-badge,
.tdf-line-ref {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

.tdf-badge--added {
  background: #dcfce7;
  color: #166534;
}

.tdf-badge--removed {
  background: #fee2e2;
  color: #991b1b;
}

.tdf-badge--unchanged {
  background: #e2e8f0;
  color: #334155;
}

.tdf-line-ref {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.tdf-pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

@media (max-width: 960px) {
  .tdf-grid,
  .tdf-row {
    grid-template-columns: 1fr;
  }
}
