main {
    padding: 0 1rem;
    margin: 0 auto;
}

footer {
    text-align: center;
    padding: 0 10px;
    background-color: var(--dark);
    color: white;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.topic {
    margin-bottom: 2rem;
    background-color: #f5f5f5;
}

.topic[id],
.subtopic[id] { scroll-margin-top: calc(54px + var(--notice-height, 0px) + 6px); }

.footer-content { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0; }
.footer-column   { display: flex; justify-content: center; }
.social-links    { display: flex; align-items: center; }

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.social-link,
.has-popover {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    padding: 4px 10px 0px;
}

.icon-fa {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    color: white;
    transition: color 0.3s ease;
    vertical-align: middle;
    display: inline-block;
}

.social-link:hover .icon-fa,
.has-popover:hover .icon-fa { color: var(--accent); }

.has-popover { position: relative; }

.popover-text {
    visibility: hidden;
    opacity: 0;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: var(--radius);
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.popover-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.has-popover:hover .popover-text { visibility: visible; opacity: 1; bottom: 130%; }

#notification-host {
    position: fixed;
    bottom: 58px;
    right: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 8px;
    pointer-events: none;
    max-width: min(520px, calc(100vw - 16px));
}

.notif {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    background: var(--dark);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    padding: 6px 10px;
    border-left: 3px solid var(--accent);
    pointer-events: auto;
    word-break: break-word;
}

.notif--error { border-left-color: var(--danger); }

.notif-text { flex: 1; }

.notif-btn {
    background: none;
    border: none;
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    opacity: 0.65;
}

.notif-btn:hover { opacity: 1; color: var(--accent); }

input[type="checkbox"] { accent-color: var(--accent); }
