/* ─── DDD cover concept grid ─────────────────────────────────────────────── */
.ddd-concepts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 1.5rem;
}
.ddd-concept-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.6rem;
  text-align: center;
}
.ddd-concept-card .dcc-icon {
  display: block;
  font-size: 1.3rem;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.ddd-concept-card .dcc-name {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── DDD concept comparison panels (non-good/bad) ──────────────────────── */
.solid-diag-panel--entity {
  border-color: #93c5fd;
  background: #eff6ff;
}
.solid-diag-panel--entity .solid-diag-label {
  background: #dbeafe;
  color: #1d4ed8;
}
.solid-diag-panel--vo {
  border-color: #c4b5fd;
  background: #f5f3ff;
}
.solid-diag-panel--vo .solid-diag-label {
  background: #ede9fe;
  color: #6d28d9;
}
.solid-diag-panel--neutral {
  border-color: var(--border);
  background: var(--bg);
}
.solid-diag-panel--neutral .solid-diag-label {
  background: #f1f5f9;
  color: #475569;
}

/* ─── DDD: layer stack diagram ───────────────────────────────────────────── */
.ddd-layer-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1.1rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--border);
}
.ddd-layer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}
.ddd-layer:last-child { border-bottom: none; }
.ddd-layer--presentation { background: #eff6ff; }
.ddd-layer--application  { background: #f5f3ff; }
.ddd-layer--domain       { background: var(--accent-soft); }
.ddd-layer--infra        { background: #fffbeb; }
.ddd-layer-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}
.ddd-layer-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.ddd-layer-rule {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  white-space: nowrap;
}
.ddd-layer--presentation .ddd-layer-rule { background: #dbeafe; color: #1d4ed8; }
.ddd-layer--application  .ddd-layer-rule { background: #ede9fe; color: #6d28d9; }
.ddd-layer--domain       .ddd-layer-rule { background: var(--accent-soft); color: var(--accent-ink); }
.ddd-layer--infra        .ddd-layer-rule { background: #fef3c7; color: #92400e; }

/* ─── DDD: bounded context map ───────────────────────────────────────────── */
.ddd-ctx-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.1rem;
}
@media (min-width: 560px) {
  .ddd-ctx-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.ddd-ctx-card {
  border-radius: 10px;
  border: 2px dashed var(--border);
  padding: 0.85rem;
}
.ddd-ctx-card-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.ddd-ctx-card ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.ddd-ctx-card--auth  { border-color: #93c5fd; }
.ddd-ctx-card--auth  .ddd-ctx-card-title { color: #1d4ed8; }
.ddd-ctx-card--billing { border-color: #86efac; }
.ddd-ctx-card--billing .ddd-ctx-card-title { color: #15803d; }
.ddd-ctx-card--profile { border-color: #c4b5fd; }
.ddd-ctx-card--profile .ddd-ctx-card-title { color: #6d28d9; }
