.pmc-identity-footer {
    position: relative;
    z-index: 3;
    padding: .85rem 1rem 1.25rem;
    color: #64748b;
    font-size: .78rem;
    text-align: center;
}
.pmc-identity-footer a { margin-left: .25rem; color: var(--pmc-lime-dark); font-weight: 700; }
.pmc-identity-footer a:hover,
.pmc-identity-footer a:focus { color: #365314; }

/* PlagueMC BookStack theme: Supported assets only, no layout replacement or DOM scripting. */
:root {
    --pmc-charcoal: #25292b;
    --pmc-sky-soft: #e8f6fb;
    --pmc-surface: #ffffff;
    --pmc-text: #1e293b;
    --pmc-line: #cfdee6;
    --pmc-lime: #84cc16;
    --pmc-lime-dark: #4d7c0f;
    --pmc-lime-soft: #ecfccb;
    --color-primary: #4d7c0f;
    --color-primary-light: #ecfccb;
    --color-link: #4d7c0f;
}

html, body, button, input, select, textarea {
    font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    color: var(--pmc-text);
    isolation: isolate;
    background-color: var(--pmc-sky-soft);
}

/* Fixed viewport layers avoid mobile browsers scrolling body backgrounds. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(135, 206, 235, .78) 0, rgba(213, 239, 249, .92) 430px, #eef7fb 920px);
    pointer-events: none;
}

/* The website's fixed horizon artwork sits above the sky gradient. */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1;
    background: url('../horizon.png') top center / cover no-repeat;
    opacity: .2;
    pointer-events: none;
}

/* Decorative leaves stay behind BookStack's interface and never intercept input. */
.pmc-falling-leaves {
    position: fixed;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.pmc-falling-leaf {
    position: absolute;
    top: -24px;
    background: center / contain no-repeat;
    will-change: transform;
}

body > #header,
body > #content,
body > footer {
    position: relative;
    z-index: 3;
}

#header.primary-background {
    color: #f8fafc;
    background: rgba(37, 41, 43, .97) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 5px 18px rgba(15, 23, 42, .18);
}

#header a, #header button { color: #e5e7eb; }
#header a:hover, #header a:focus, #header button:hover, #header button:focus { color: #bef264; }

#header .header-search {
    color: #f8fafc;
    background: rgba(0, 0, 0, .2);
    border-color: rgba(255, 255, 255, .18);
}

#header .header-search input { color: #f8fafc; }
#header .header-search input::placeholder { color: #cbd5e1; }

h1, h2, h3, h4, h5, h6 {
    color: #172033;
    font-family: 'Nunito', system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: -.015em;
}

a {
    color: var(--pmc-lime-dark);
    text-decoration-thickness: .08em;
    text-underline-offset: .14em;
}
a:hover, a:focus { color: #365314; }

html:not(.dark-mode) .card,
html:not(.dark-mode) .content-wrap.card {
    background: var(--pmc-surface);
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(30, 64, 92, .1);
}

html:not(.dark-mode) .page-content { color: var(--pmc-text); }
html:not(.dark-mode) .content-wrap.card .page-content {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
html:not(.dark-mode) .page-content h2 { border-bottom-color: var(--pmc-line); }

html:not(.dark-mode) .tri-layout-left .card,
html:not(.dark-mode) .tri-layout-right .card {
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 5px 18px rgba(30, 64, 92, .08);
}

.button, .button-base { border-radius: 5px; font-weight: 800; }
.button.primary, .button-base.primary, button.primary {
    color: #fff;
    background: #65a30d;
    border-color: #4d7c0f;
    box-shadow: 0 3px 0 #3f6212;
}
.button.primary:hover, .button-base.primary:hover, button.primary:hover { color: #fff; background: #84cc16; }

.callout { border-radius: 6px; }
.callout.info, .callout.success { border-left-color: var(--pmc-lime); }
html:not(.dark-mode) .breadcrumb-list { color: #476173; }

html:not(.dark-mode) .book-tree a.selected,
html:not(.dark-mode) .book-tree a:hover,
html:not(.dark-mode) .sidebar-page-nav a:hover {
    color: #365314;
    background: var(--pmc-lime-soft);
}

html.dark-mode body {
    background-color: #0f172a;
}
html.dark-mode body::before { background: linear-gradient(180deg, #1f3b50 0, #111b2c 480px, #0f172a 1000px); }
html.dark-mode h1, html.dark-mode h2, html.dark-mode h3,
html.dark-mode h4, html.dark-mode h5, html.dark-mode h6 { color: #f8fafc; }
html.dark-mode a { color: #bef264; }
html.dark-mode a:hover, html.dark-mode a:focus { color: #d9f99d; }

@media screen and (max-width: 600px) {
    body::before { background: linear-gradient(180deg, rgba(135, 206, 235, .78), #eef7fb 650px); }
    html.dark-mode body::before { background: linear-gradient(180deg, #1f3b50, #0f172a 650px); }
    html:not(.dark-mode) .card,
    html:not(.dark-mode) .content-wrap.card { border-radius: 7px; }
}

@media (prefers-reduced-motion: reduce) {
    .pmc-falling-leaves { display: none; }
}

@media print {
    body { color: #000; background: #fff; }
    body::before,
    body::after,
    .pmc-falling-leaves { display: none; }
}
