/* monopole.news -- Editorial broadsheet, high-contrast B&W */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --paper-white: #FAFAFA;
    --ink-black: #1A1A1A;
    --newsprint-gray: #F0F0F0;
    --rule-gray: #D0D0D0;
    --ticker-black: #0A0A0A;
    --red-alert: #C02020;
    --link-blue: #1A4A80;
}

html, body {
    background: var(--paper-white);
    color: var(--ink-black);
    font-family: "Source Serif 4", Georgia, serif;
    font-weight: 400;
    line-height: 1.75;
    font-size: clamp(15px, 1vw, 17px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
    padding-top: 36px; /* room for fixed ticker */
}

/* ================= TICKER BAR ================= */
.ticker-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: var(--ticker-black);
    color: var(--paper-white);
    display: flex;
    align-items: center;
    z-index: 100;
    font-family: "Space Mono", "Courier New", monospace;
    font-size: 12px;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--ink-black);
}

.ticker-flag {
    background: var(--red-alert);
    color: var(--paper-white);
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    letter-spacing: 0.15em;
    flex-shrink: 0;
}

.ticker-window {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    height: 100%;
}

.ticker-stream {
    display: inline-block;
    padding-left: 100%;
    animation: tickerScroll 60s linear infinite;
    white-space: nowrap;
    height: 100%;
    line-height: 36px;
}

.ticker-item {
    margin: 0 18px;
    color: var(--paper-white);
}

.ticker-bullet {
    color: var(--rule-gray);
    margin: 0 4px;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ================= MASTHEAD ================= */
.masthead {
    text-align: center;
    padding: 48px 32px 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.masthead-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: "Space Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-black);
    border-top: 1px solid var(--ink-black);
    border-bottom: 1px solid var(--ink-black);
    padding: 8px 0;
    margin-bottom: 32px;
}

.meta-edition {
    font-weight: 700;
}

.meta-date {
    color: var(--ink-black);
}

.meta-volume {
    color: var(--ink-black);
}

.masthead-title {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-weight: 900;
    font-size: clamp(56px, 9vw, 130px);
    line-height: 0.9;
    letter-spacing: -0.03em;
    color: var(--ink-black);
    margin-bottom: 12px;
}

.masthead-dot {
    color: var(--red-alert);
    display: inline-block;
}

.masthead-tagline {
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: clamp(14px, 1.2vw, 17px);
    color: var(--ink-black);
    margin-bottom: 22px;
}

.masthead-rule {
    width: 100%;
    height: 0;
}

.masthead-rule.double-rule {
    border-top: 1px solid var(--ink-black);
    border-bottom: 1px solid var(--ink-black);
    height: 4px;
    width: 0;
    transition: width 800ms cubic-bezier(0.6, 0, 0.4, 1);
    margin: 0 auto;
}

.masthead-rule.double-rule.drawn {
    width: 100%;
}

/* ================= GRID ================= */
.front-page,
.dataviz-section,
.below-fold,
.editorial-notes {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 32px 16px;
}

.paper-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 32px;
    position: relative;
}

.paper-grid.second-row {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--rule-gray);
}

.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }

/* Front page layout */
.story-lead { grid-column: span 3; }
.story-side { grid-column: span 2; }
.story-brief { grid-column: span 1; }

/* Column rules between stories */
.story + .story {
    border-left: 1px solid var(--rule-gray);
    padding-left: 32px;
    margin-left: -16px;
}

/* ================= STORIES ================= */
.story {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.story.revealed {
    opacity: 1;
    transform: translateY(0);
}

.story-tag {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-black);
    border-bottom: 2px solid var(--ink-black);
    padding-bottom: 6px;
    margin-bottom: 14px;
    display: inline-block;
}

/* Lead headline -- typography as art */
.lead-headline {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: clamp(40px, 6vw, 80px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: var(--ink-black);
    margin-bottom: 20px;
}

.headline-accent {
    color: var(--red-alert);
    font-style: italic;
}

.lead-deck {
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.4;
    color: var(--ink-black);
    margin-bottom: 18px;
    border-left: 3px solid var(--ink-black);
    padding-left: 16px;
}

.story-byline {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-black);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule-gray);
}

.byline-author {
    font-weight: 700;
}

.byline-bullet {
    margin: 0 8px;
    color: var(--rule-gray);
}

.story-body {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(15px, 1vw, 16px);
    line-height: 1.75;
    color: var(--ink-black);
    margin-bottom: 14px;
    text-align: justify;
    hyphens: auto;
}

.story-body.drop-cap::first-letter {
    font-family: "Playfair Display", serif;
    font-weight: 900;
    font-size: 4em;
    line-height: 0.9;
    float: left;
    padding: 4px 8px 0 0;
    color: var(--ink-black);
}

.story-continue {
    font-family: "Space Mono", monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--link-blue);
    text-decoration: none;
    border-bottom: 1px solid var(--link-blue);
    display: inline-block;
    margin-top: 6px;
    padding-bottom: 2px;
    transition: color 200ms, border-color 200ms;
}

.story-continue:hover {
    color: var(--red-alert);
    border-bottom-color: var(--red-alert);
}

/* Side & secondary headlines */
.side-headline,
.secondary-headline {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--ink-black);
    margin-bottom: 14px;
}

.brief-headline {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: clamp(16px, 1.4vw, 18px);
    line-height: 1.25;
    color: var(--ink-black);
    margin-bottom: 10px;
}

/* ================= SECTION HEAD ================= */
.section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    border-top: 3px double var(--ink-black);
    padding-top: 12px;
    margin-bottom: 28px;
}

.section-title {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: clamp(20px, 2vw, 26px);
    color: var(--ink-black);
    flex-shrink: 0;
}

.section-rule-line {
    flex: 1;
    height: 1px;
    background: var(--ink-black);
}

.section-meta {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-black);
    flex-shrink: 0;
}

/* ================= RULE DIVIDERS ================= */
.rule-divider {
    max-width: 1280px;
    margin: 32px auto;
    height: 0;
}

.rule-divider.thin {
    border-top: 1px solid var(--rule-gray);
    margin: 24px auto;
}

.rule-divider.major {
    border-top: 1px solid var(--ink-black);
    border-bottom: 1px solid var(--ink-black);
    height: 4px;
    margin: 48px auto;
}

/* ================= CHARTS ================= */
.chart-frame {
    background: var(--newsprint-gray);
    padding: 24px;
    margin-top: 18px;
    border: 1px solid var(--rule-gray);
}

.line-chart,
.bar-chart {
    width: 100%;
    height: auto;
    display: block;
    font-family: "Space Mono", monospace;
}

.grid-lines line {
    stroke: var(--rule-gray);
    stroke-width: 0.5;
}

.axis-labels text {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    fill: var(--ink-black);
    letter-spacing: 0.05em;
}

.chart-line {
    stroke: var(--ink-black);
    fill: none;
    stroke-width: 1.5;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-line.drawn {
    stroke-dashoffset: 0;
}

.chart-points circle {
    fill: var(--ink-black);
    opacity: 0;
    transition: opacity 400ms ease;
}

.chart-points.revealed circle {
    opacity: 1;
}

.annotation-line {
    stroke: var(--red-alert);
    stroke-width: 1;
    opacity: 0;
    transition: opacity 400ms ease 1500ms;
}

.annotation-line.revealed {
    opacity: 1;
}

.annotation-text {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    fill: var(--red-alert);
    opacity: 0;
    transition: opacity 400ms ease 1500ms;
}

.annotation-text.revealed {
    opacity: 1;
}

.bar {
    fill: var(--ink-black);
    transition: y 800ms cubic-bezier(0.4, 0, 0.2, 1), height 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-caption {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.05em;
    line-height: 1.5;
    color: var(--ink-black);
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--rule-gray);
}

/* ================= PULL QUOTE ================= */
.pullquote-section {
    max-width: 1280px;
    margin: 56px auto;
    padding: 0 32px;
}

.pullquote {
    text-align: center;
    padding: 40px 8%;
}

.pullquote p {
    font-family: "Playfair Display", serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--ink-black);
    margin-bottom: 22px;
}

.pullquote-cite {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-black);
    font-style: normal;
}

/* ================= FOOTER ================= */
.site-footer {
    margin-top: 48px;
    background: var(--ink-black);
    color: var(--paper-white);
}

.footer-rule {
    height: 4px;
    background: var(--red-alert);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 32px 40px;
    text-align: center;
}

.footer-masthead {
    font-family: "Playfair Display", serif;
    font-weight: 900;
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: var(--paper-white);
}

.footer-dot {
    color: var(--red-alert);
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rule-gray);
    border-top: 1px solid var(--rule-gray);
    padding-top: 28px;
}

.footer-nav a {
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: 16px;
    color: var(--paper-white);
    text-decoration: none;
    transition: color 200ms;
}

.footer-nav a:hover {
    color: var(--red-alert);
}

.footer-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-family: "Space Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rule-gray);
}

.footer-tag {
    font-style: italic;
    font-family: "Playfair Display", serif;
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    color: var(--paper-white);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
    .paper-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    .story-lead { grid-column: span 3; }
    .story-side { grid-column: span 3; }
    .story-brief { grid-column: span 1; }
    .col-3 { grid-column: span 3; }
    .col-2 { grid-column: span 3; }
    .col-1 { grid-column: span 1; }

    .story + .story {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        padding-top: 24px;
        border-top: 1px solid var(--rule-gray);
    }
}

@media (max-width: 640px) {
    body { padding-top: 36px; }

    .paper-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .story-lead,
    .story-side,
    .story-brief,
    .col-3, .col-2, .col-1 {
        grid-column: span 1;
    }

    .masthead {
        padding: 32px 20px 16px;
    }
    .masthead-meta {
        flex-direction: column;
        gap: 4px;
        align-items: center;
    }

    .front-page,
    .dataviz-section,
    .below-fold,
    .editorial-notes,
    .pullquote-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .footer-meta {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .story + .story {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        padding-top: 24px;
        border-top: 1px solid var(--rule-gray);
    }

    .lead-headline { font-size: clamp(36px, 8vw, 56px); }
}
