/* Page-specific layouts that used to live in inline <style> blocks. */

/* ---------- Home (docs/index.md) ---------- */
body.home-layout .md-footer {
    display: none !important;
}

body.home-layout .md-main__inner,
body.home-layout .md-content,
body.home-layout .md-content__inner {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

body.home-layout .md-content__inner::before,
body.home-layout .md-content__inner::after {
    display: none !important;
    content: none !important;
}

body.home-layout .minimal-home {
    position: relative;
    box-sizing: border-box;
    min-height: calc(100svh - 3rem);
    padding: 0 1rem 3.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.home-layout .minimal-home-hero {
    width: 100%;
    transform: translateY(-2.2rem);
}

.zdd-home-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1.05rem;
    text-align: center;
    font-size: 0.62rem;
    line-height: 1.4;
    color: var(--zdd-surface-muted);
    opacity: 0.72;
    user-select: none;
}

.zdd-home-footer a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.zdd-home-footer a:hover {
    border-bottom-color: currentColor;
}

body.home-layout .minimal-home:has(.minimal-search-results:not([hidden])) .zdd-home-footer {
    display: none;
}

body.home-layout.home-search-active .minimal-home {
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 1.05rem;
}

body.home-layout.home-search-active .minimal-home-hero {
    transform: none;
}

body.home-layout.home-search-active .minimal-home-line {
    display: none;
}

/* ---------- 404 (docs/404.md) ---------- */
body:has(.zdd-404-only) :is(.md-footer, .md-sidebar, .md-typeset h1, .md-content__inner h1, .md-source-file, .md-content__button) {
    display: none !important;
}

html:has(.zdd-404-only),
body:has(.zdd-404-only),
body:has(.zdd-404-only) :is(.md-container, .md-main, .md-main__inner, .md-content, .md-content__inner) {
    background: var(--zdd-canvas) !important;
    background-image: none !important;
}

body:has(.zdd-404-only) :is(.md-main__inner, .md-content, .md-content__inner) {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

body:has(.zdd-404-only) .md-content__inner::before,
body:has(.zdd-404-only) .md-content__inner::after {
    display: none !important;
    content: none !important;
}

.zdd-404-only {
    min-height: calc(100vh - 3rem);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding-top: 4rem;
    padding-bottom: 8rem;
    background: var(--zdd-canvas);
    color: var(--zdd-display-ink);
    font-size: clamp(3.5rem, 14vw, 10rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
}

/* ---------- Footer credit (overrides/main.html) ---------- */
.zdd-footer-credit {
    font-size: 0.8rem;
}

.zdd-footer-heart {
    display: inline-block;
    color: var(--zdd-heart);
    animation: zdd-heartbeat 1.5s ease-in-out infinite;
}

@keyframes zdd-heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
    .zdd-footer-heart { animation: none; }
}
