﻿:root {
    --node-font-size: 14px; /* كان 12px */
    --node-font-weight: 700; /* أثقل قليلاً */
    --node-width: 150px; /* كان 120px */
    --node-height: 44px; /* كان 38px */
}

#treeContainer {
    position: relative;
    border: 1px dashed #e5e7eb;
    border-radius: 1rem;
    background: linear-gradient(#fafafa,#fff) padding-box, repeating-linear-gradient(90deg,transparent 0 39px,#f3f4f6 39px 40px), repeating-linear-gradient(0deg,transparent 0 39px,#f3f4f6 39px 40px);
    min-height: 70vh;
    overflow: hidden;
}

#treeSvg {
    display: block;
    width: 100%;
    height: 70vh;
    /* 🔎 تُحسّن دقة المتجهات والنص */
    shape-rendering: geometricPrecision;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.node-title {
    font-family: "Tajawal","Noto Kufi Arabic","Cairo",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
    font-size: var(--node-font-size);
    font-weight: var(--node-font-weight);
    letter-spacing: 0; /* عربي */
    paint-order: stroke; /* يمنع تسريب الخلفية داخل الحروف */
    direction: rtl;
}

.link {
    stroke: #c5c8ce;
    stroke-width: 1.6;
    fill: none;
}

.node-card {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.08));
    rx: 12;
    ry: 12;
}

.node-chip {
    rx: 8;
    ry: 8;
    opacity: .18;
}

.node:hover .node-card {
    filter: drop-shadow(0 4px 10px rgba(0,0,0,.12));
}

/* تكبير بسيط على الشاشات الكبيرة */
@media (min-width: 1400px) {
    :root {
        --node-font-size: 15px;
        --node-width: 164px;
        --node-height: 48px;
    }
}
