:root {
    --article-max: 760px;
    --rail-w: 300px;
    --ink: #e8e8e8;
    --meta: #9aa0a6;
    --muted: #9aa0a6;
    --accent: #8ab4f8;
    --border: rgba(255, 255, 255, .08);
    --bg: #0b0b0b;
    --panel: rgba(255, 255, 255, .035);
    --panel-2: rgba(138, 180, 248, .08);
    --shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

/* Page background + ambient texture */
body {
    background: radial-gradient(100% 120% at 80% -10%, #111 0%, #0b0b0b 40%, #060606 100%),
        radial-gradient(60% 80% at 0% 120%, rgba(138, 180, 248, .08), transparent 55%);
    color: var(--ink);
}

/* Progress bar */
.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #7af0ff);
    z-index: 1000;
    transition: width .1s linear;
}

/* Header */
#anita-header {
    background: linear-gradient(to bottom, rgba(0, 0, 0, .6), transparent);
}

/* Page grid: content + margin rail */
.page-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 96px 24px 80px;
}

@media (min-width:1200px) {
    .page-grid {
        grid-template-columns: minmax(0, var(--article-max)) var(--rail-w);
        justify-content: center;
    }
}

/* Vignette */
.page-grid::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(80% 60% at 30% 20%, rgba(255, 255, 255, .03) 0%, rgba(0, 0, 0, .85) 60%);
}

/* Article base */
.anita-article {
    margin: 0 auto;
    color: var(--ink);
    font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.68;
    font-size: 1.06rem;
    letter-spacing: .01em;
}

/* Hero band */
.hero {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .2)),
        radial-gradient(80% 140% at 110% -10%, rgba(138, 180, 248, .18), transparent 60%),
        url('img/albums/covers_512/album02.jpg') center/cover no-repeat;
    padding: 48px 28px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.hero .article-kicker {
    font-family: "Rajdhani", sans-serif;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--meta);
    margin-bottom: 8px;
}

.hero .article-title {
    font-family: "Rajdhani", sans-serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 3.8vw, 3.4rem);
    line-height: 1.08;
    margin: 0 0 12px;
    color: #fff;
}

.hero .article-meta {
    color: var(--meta);
    font-size: .95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero .article-meta span::before {
    content: "•";
    margin: 0 10px 0 6px;
    color: var(--border);
}

.hero .article-meta span:first-child::before {
    content: "";
    margin: 0;
}

/* Floating theme chips (auto from headings) */
.theme-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chip {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #dbe7ff;
    padding: 6px 9px;
    border: 1px solid rgba(138, 180, 248, .35);
    border-radius: 999px;
    background: rgba(138, 180, 248, .12);
    backdrop-filter: blur(2px);
}

/* Epigraph / Excerpt card */
.excerpt {
    border-left: 3px solid var(--accent);
    background: var(--panel-2);
    color: var(--ink);
    padding: 16px 18px;
    border-radius: 14px;
    margin: 18px 0 8px;
    font-style: italic;
    box-shadow: var(--shadow);
}

.excerpt cite {
    display: block;
    font-style: normal;
    color: var(--meta);
    font-size: .92rem;
    text-align: right;
    margin-top: 8px;
}

/* Sticky TOC (desktop) */
.toc-wrap {
    position: sticky;
    top: 98px;
    align-self: start;
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
}

.toc-title {
    font-weight: 700;
    letter-spacing: .06em;
    color: #ddd;
    margin-bottom: 8px;
    font-size: .95rem;
}

.article-toc ol {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px 14px;
    grid-template-columns: 1fr;
}

.article-toc a {
    text-decoration: none;
    color: #e0e0e0;
    border-bottom: 1px dotted var(--border);
}

.article-toc a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

@media (min-width:1200px) {
    .article-toc ol {
        grid-template-columns: 1fr;
    }
}

/* Section headings */
.article-body h2 {
    margin-top: 38px;
    margin-bottom: 10px;
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(1.5rem, 2.4vw, 1.9rem);
    line-height: 1.2;
    color: #fff;
    border-top: 1px solid var(--border);
    padding-top: 18px;
    position: relative;
}

.article-body h2 .tag {
    position: absolute;
    right: 0;
    top: -14px;
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #cfe1ff;
    background: rgba(138, 180, 248, .12);
    border: 1px solid rgba(138, 180, 248, .3);
    border-radius: 999px;
    padding: 4px 8px;
}

/* Paragraphs */
.article-body p {
    margin: 14px 0;
    max-width: 68ch;
}

.article-body h3 {
    margin-top: 20px;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 1.05rem;
    color: #f0f0f0;
}

.article-body a {
    color: var(--accent);
}

/* Dropcap (first paragraph of article only) */
.dropcap:first-letter {
    float: left;
    font-family: "Rajdhani", sans-serif;
    font-size: 3.2rem;
    line-height: .9;
    padding-right: 8px;
    padding-top: 6px;
    color: #fff;
}

/* Dynamic breakout for bold claims (no text edits required) */
.breakout {
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    padding: 14px 16px;
    border-radius: 12px;
    margin: 18px 0;
    font-size: 1.08rem;
    box-shadow: var(--shadow);
}

.breakout strong {
    font-size: 1.15em;
    letter-spacing: .01em;
}

/* Auto pullquote inside sections */
.pull-float {
    position: relative;
    float: right;
    width: 320px;
    max-width: 46%;
    margin: 6px 0 14px 18px;
    padding: 14px 16px;
    border-left: 3px solid var(--accent);
    border-radius: 12px;
    background: var(--panel-2);
    font-style: italic;
    color: var(--ink);
    box-shadow: var(--shadow);
}

.pull-float:before {
    content: "“";
    position: absolute;
    left: 8px;
    top: -8px;
    font-size: 3rem;
    color: rgba(138, 180, 248, .35);
    line-height: 1;
}

@media (max-width: 880px) {
    .pull-float {
        float: none;
        max-width: 100%;
        width: auto;
        margin: 16px 0;
    }
}

/* Note & footnotes (kept, upgraded) */
.note {
    background: var(--panel);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 18px 0;
    font-size: .98rem;
    color: var(--ink);
}

.footnotes {
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--ink);
    font-size: .96rem;
}

.footnotes ol {
    padding-left: 18px;
}

.fn-ref {
    text-decoration: none;
    font-size: .88em;
    vertical-align: super;
    border-bottom: 1px dotted var(--border);
    color: var(--accent);
}

/* Margin Rail: auto-gathered highlights */
.rail {
    display: none;
}

@media (min-width:1200px) {
    .rail {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .rail .card {
        background: var(--panel);
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 14px 14px;
        box-shadow: var(--shadow);
    }

    .rail .card h4 {
        margin: 0 0 8px;
        font-size: .9rem;
        letter-spacing: .14em;
        text-transform: uppercase;
        color: #d6e3ff;
    }

    .rail .sidenotes {
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-height: 60vh;
        overflow: auto;
    }

    .rail .sidenote {
        font-size: .92rem;
        line-height: 1.45;
        color: #e7ecff;
        border-left: 3px solid rgba(138, 180, 248, .45);
        padding-left: 10px;
        cursor: pointer;
    }

    .rail .sidenote:hover {
        color: #fff;
    }
}

/* Footnote popover */
.popover {
    position: fixed;
    max-width: 360px;
    z-index: 1001;
    background: #0f131a;
    color: #e8f0fe;
    border: 1px solid rgba(138, 180, 248, .35);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: var(--shadow);
    display: none;
}

/* Post navigation (unchanged, minor polish) */
.anita-album-nav-prev,
.anita-album-nav-next {
    mix-blend-mode: normal;
}