/* ============================================
   Manifesto Page Styles
   ============================================ */

.manifesto-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.manifesto-bg-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 55vh;
    background-image: url('../assets/generated/manifesto-header.png');
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    z-index: 0;
    pointer-events: none;
}

.manifesto-toc {
    position: relative;
    z-index: 10;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.manifesto-body {
    position: relative;
    z-index: 2;
    background: rgba(10, 14, 23, 0.88);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

[data-theme="light"] .manifesto-toc {
    background: rgba(241, 245, 249, 0.95);
}

[data-theme="light"] .manifesto-body {
    background: rgba(250, 251, 252, 0.88);
}

.manifesto-downloads {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.download-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

/* Table of Contents — Smart Sticky Behavior */
.manifesto-toc {
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) 0;
    z-index: 50;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* When TOC becomes sticky (via JS) */
.manifesto-toc.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm) 0;
}

/* When TOC auto-collapses (scrolled past enough content) */
.manifesto-toc.is-collapsed {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* Spacer to prevent content jump when TOC goes fixed */
.manifesto-toc-spacer {
    display: none;
    height: 0;
}

.manifesto-toc-spacer.is-active {
    display: block;
}

[data-theme="light"] .manifesto-toc {
    background: rgba(250, 251, 252, 0.9);
}

.manifesto-toc summary {
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9375rem;
    user-select: none;
}

.manifesto-toc ol {
    margin-top: var(--space-sm);
    columns: 2;
    column-gap: var(--space-xl);
    list-style-type: none;
    counter-reset: toc;
}

.manifesto-toc > .container > details > ol > li {
    counter-increment: toc;
}

.manifesto-toc > .container > details > ol > li::before {
    content: counter(toc) ". ";
    color: var(--accent);
    font-weight: 600;
}

.manifesto-toc ol ol {
    columns: 1;
    margin-left: var(--space-lg);
    margin-top: var(--space-xs);
}

.manifesto-toc a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.8;
}

.manifesto-toc a:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .manifesto-toc ol {
        columns: 1;
    }
}

/* Manifesto Body */
.manifesto-body {
    font-size: 1.0625rem;
}

.manifesto-body section {
    margin-bottom: var(--space-xl);
}

.manifesto-body h2 {
    color: var(--accent);
}

.manifesto-body h3 {
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.manifesto-body h4 {
    margin-top: var(--space-lg);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    font-weight: 700;
}

.section-rule {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--space-2xl) 0;
    position: relative;
}

.section-rule::after {
    content: '⊛';
    position: absolute;
    top: -0.6em;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    padding: 0 var(--space-md);
    color: var(--accent);
    font-size: 1rem;
}

/* Closing Section */
.manifesto-closing {
    text-align: center;
    margin: var(--space-xl) 0;
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.manifesto-closing p {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin: var(--space-sm) 0;
}

.manifesto-closing p:last-child {
    color: var(--accent);
    font-size: 1.25rem;
    font-style: normal;
    margin-top: var(--space-lg);
}

.manifesto-meta {
    text-align: center;
    margin-top: var(--space-xl);
    color: var(--text-muted);
    font-size: 0.9375rem;
}
