html {
    scroll-behavior: smooth;
}

.lf-note-ref {
    scroll-margin-top: 2.5em;
    margin-left: 2px;
    margin-right: 2px;
}

.lf-note-ref a {
    text-decoration: none;
    font-size: 0.75em;
    vertical-align: super;
    cursor: pointer;
    position: relative;
}

#lf-tooltip {
    display: none;
    position: absolute;
    background: #1a1a1a;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: normal;
    word-wrap: break-word;
    z-index: 9999;
    max-width: 500px;
    width: auto;
    min-width: 200px;
    line-height: 1.4;
    text-align: left;
    pointer-events: none;
}

#lf-tooltip p {
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: #fff;
}

#lf-tooltip i,
#lf-tooltip span {
    color: #fff;
}

#lf-tooltip .dfb-ref {
    color: #7aabcf;
    border-bottom: 1px dotted currentColor;
}

#lf-tooltip .dfb-tooltip-inner {
    background: #1a1a1a !important;
    color: #fff !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    #lf-tooltip { display: none !important; }
}

.lf-footnotes {
    margin-top: 40px;
    font-size: 0.95em;
}

.lf-footnotes ol {
    margin-left: 20px;
}

.lf-backlink {
    margin-left: 8px;
    text-decoration: none;
    font-size: 0.9em;
}

.text-image p > a::after {
    content: " →";
    position: relative;
    top: -5px;
    left: -3px;
    font-size: calc(1em - 5px);
}

.text-image p > a {
    text-decoration: none;
    color: inherit;
}
