* {
    box-sizing: border-box;
}

.noto-kufi-arabic {
  font-family: "Noto Kufi Arabic", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

body, html {
    font-size: 16px;
    color: #888;
    margin:0;
    padding: 0;
    width: 100%;
    height: 100%;
    direction: rtl;
}

ul {
    list-style: none;
    padding-right: 3.25em;
    line-height: 1;
}

li:not(:has(> details) ) {
    padding: 5px 1.3em 5px 5px;
}

ul li {
    position: relative;
    white-space: pre;
}

ul li::before {
    position: absolute;
    top: 0;
    right: -1em;
    border-right: 1px dashed #aaa;
    border-bottom: 1px dashed #aaa;
    content: "";
    width: 1em;
    height: 1.2em;
}
ul li::after {
    position: absolute;
    bottom: 0;
    right: -1em;
    border-right: 1px dashed #aaa;
    content: "";
    width: 1em;
    height: 100%;
}

ul li:last-child::after, #family-tree > ul > li::after, #family-tree > ul > li::before {
    display: none;
}

#family-tree > ul {
    padding: 0;
}

summary {
    cursor: pointer;
    padding: 5px;
}
summary .parent-name {
    color: #aaa;
    font-weight: normal;
    padding-left: 2em;
}

details:not([open]) summary .parent-name {
    display: none;
}

details[open]:has(> ul > li > details[open]) > summary .parent-name {
    display: none !important;
}

details[open] > summary {
    font-weight: bold;
    color: #000;
}

.page-title {
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 15px 0; 
    text-align: center; 
    background:#96acc3;
    color: #000;
    font-size: 1em;
    height: 4em;
    margin: 0;
}

.page-footer {
    position: sticky;
    bottom: 0;
    width: 100%;
    line-height: 3.5em; 
    text-align: center; 
    background:#f0f0f0;
    color: #aaa;
    font-size: .8em;
    height: 3.5em;
}

#family-tree {
    padding: 1em;
}

.profile {
    margin-left: 0.5em;
    position: relative;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle; 
    border: 1px solid #ccc;
    border-radius: 5px;
    opacity: .6;
}
.profile img {
    width: 2em;
    height: auto;
    vertical-align: middle;
}

.member.male .name {
    
}
.member.female .name {
    color: #f98a8a;
}
.profile.dead img {
    filter: grayscale(1);
    opacity: 0.5;
}
.profile.dead::after {
    content: "";
    position: absolute;
    top: .1em;
    left: -.5em;
    transform: rotate(-45deg);
    width: 1.75em;
    height: .35em;
    background: #000;
}
.main-wrapper{
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1;
    overscroll-behavior: contain;
    overflow: auto;
}