/* --- diagrams.css --- */
.concept-diagram { min-height: 250px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5rem; font-size: 0.9rem; }
.diag-card { background-color: #f8f9fa; border: 1px solid #e9ecef; padding: 1.5rem; border-radius: 0.75rem; text-align: center; width: 100%; max-width: 280px;}
.diag-card h4 { font-weight: 700; margin-bottom: 1rem; font-size: 1.1rem; } 
.diag-card .step { background-color: #e9ecef; padding: 0.75rem; border-radius: 0.5rem; margin: 0.5rem 0; }
.diag-arrow { font-size: 2rem; color: #adb5bd; align-self: center; }
.pipeline .data { padding: 1rem; border-radius: 0.5rem; border: 2px dashed; }
.knn-space { position: relative; width: 100%; max-width: 350px; height: 220px; border: 1px solid var(--border-color); border-radius: 0.75rem; background-color: #f8f9fa; }
.knn-dot { position: absolute; width: 12px; height: 12px; border-radius: 50%; }
.knn-unknown { position: absolute; width: 16px; height: 16px; background-color: #e5484d; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; color: white; font-size: 0.7rem; font-weight: bold; }
.knn-neighbor-circle { position: absolute; border: 2px dashed #f08c00; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.svm-space { position: relative; width: 100%; height: 250px; border: 1px solid var(--border-color); border-radius: 0.75rem; background-color: #f8f9fa; }
.svm-dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; }
.support-vector { border: 3px solid #f08c00; }
.svm-line { position: absolute; left: 10%; width: 80%; height: 2px; }
.regression-plot { position: relative; width: 100%; height: 250px; } 
.dot { position: absolute; width: 10px; height: 10px; background-color: #0056b3; border-radius: 50%; opacity: 0.7;}
.regression-line { position: absolute; width: 80%; height: 3px; background-color: #c92a2a; top: 50%; left: 10%; transform: rotate(-20deg); }
.cluster-area { display: flex; gap: 1.25rem; align-items: center; } .cluster-box { position: relative; width: 200px; height: 200px; border: 1px dashed #ced4da; border-radius: 0.75rem; }
.cluster-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; }
.centroid { position: absolute; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-weight: bold; color: white; border-radius: 4px; }
.confusion-matrix { display: grid; grid-template-columns: 60px repeat(2, 1fr); grid-template-rows: 50px repeat(2, 1fr); gap: 5px; width: 100%; max-width: 400px; }
.cm-cell { border-radius: 0.5rem; padding: 1rem; text-align: center; } .cm-header { font-weight: 700; }
