/* ============================================
   diplomacy.day — Vintage Broadsheet Newspaper
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --newsprint: #faf5e8;
    --ink-black: #1a1a1a;
    --editorial-red: #c1272d;
    --column-gray: #e8e3d8;
    --aged-paper: #f0e8d4;
    --blue-link: #1a4480;
    --rule-dark: #2a2a2a;
}

body {
    background-color: var(--newsprint);
    color: var(--ink-black);
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
}

/* --- Masthead --- */
#masthead {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
}

.masthead-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.masthead-left,
.masthead-right {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 160px;
}

.masthead-right {
    text-align: right;
}

.edition-label,
.edition-sub,
.masthead-price {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--rule-dark);
}

.masthead-date {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-black);
}

.masthead-center {
    text-align: center;
    flex: 1;
}

.masthead-title {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-weight: 900;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
    color: var(--ink-black);
    line-height: 1.1;
}

.masthead-subtitle {
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--rule-dark);
    margin-top: 0.25rem;
}

/* --- Double Rule --- */
.double-rule {
    border: none;
    border-top: 3px solid var(--ink-black);
    border-bottom: 1px solid var(--ink-black);
    height: 5px;
    margin: 1rem 0;
}

/* --- Thin Rule --- */
.thin-rule {
    border: none;
    border-top: 1px solid var(--rule-dark);
    margin: 0.5rem 0;
}

/* --- Page Wrapper --- */
#page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

/* --- Lead Story --- */
#lead-story {
    position: relative;
    padding: 1.5rem 0;
}

.breaking-stamp {
    display: inline-block;
    background-color: var(--editorial-red);
    color: #ffffff;
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: 0.15em;
    padding: 0.25rem 1rem;
    transform: rotate(-3deg);
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.25);
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    z-index: 10;
}

.lead-headline {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-weight: 900;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ink-black);
    max-width: 85%;
    margin-bottom: 0.5rem;
}

.lead-story-content {
    column-count: 2;
    column-gap: 2rem;
    column-rule: 1px solid var(--rule-dark);
}

.lead-story-body,
.lead-story-continued {
    break-inside: avoid;
}

.lead-text {
    text-align: justify;
    hyphens: auto;
}

.lead-story-content p {
    margin-bottom: 0.8rem;
    text-align: justify;
    hyphens: auto;
}

/* --- Drop Cap --- */
.drop-cap {
    float: left;
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-weight: 900;
    font-size: 4.5rem;
    line-height: 0.8;
    padding-right: 0.1em;
    padding-top: 0.05em;
    color: var(--ink-black);
}

/* --- Pull Quote --- */
.pull-quote {
    break-inside: avoid;
    background-color: var(--aged-paper);
    border-left: 4px solid var(--editorial-red);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.pull-quote p {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-weight: 700;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--ink-black);
    text-align: left;
    hyphens: none;
}

.pull-quote cite {
    display: block;
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-style: normal;
    font-size: 0.8rem;
    color: var(--rule-dark);
    margin-top: 0.5rem;
}

/* --- Dateline --- */
.dateline {
    display: inline;
}

.dateline-location {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    font-variant: small-caps;
}

/* --- Content Layout (stories + sidebar) --- */
#content-layout {
    display: flex;
    gap: 2rem;
}

/* --- Multi-column stories --- */
#stories-columns {
    flex: 1;
    column-count: 3;
    column-gap: 2rem;
    column-rule: 1px solid var(--rule-dark);
}

/* --- Story --- */
.story {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.story-headline {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--ink-black);
    margin-bottom: 0.25rem;
}

.story p {
    text-align: justify;
    hyphens: auto;
    margin-bottom: 0.6rem;
    font-size: 0.92rem;
    line-height: 1.55;
}

/* --- Diplomatic Index Sidebar --- */
#diplomatic-index {
    width: 220px;
    min-width: 220px;
    padding: 1rem;
    background-color: var(--column-gray);
    border-left: 2px solid var(--ink-black);
}

.index-title {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: 1.3rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-black);
    text-align: center;
}

.index-subtitle {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--rule-dark);
    text-align: center;
    margin-bottom: 0.75rem;
}

.index-list {
    list-style: none;
}

.index-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(42, 42, 42, 0.2);
    font-size: 0.82rem;
}

.index-rank {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--rule-dark);
    min-width: 1.2rem;
    text-align: center;
}

.index-country {
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-weight: 600;
    flex: 1;
    color: var(--ink-black);
}

.index-score {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--ink-black);
    min-width: 2.2rem;
    text-align: right;
}

.index-arrow {
    font-size: 0.85rem;
    min-width: 1rem;
    text-align: center;
}

.index-arrow.up {
    color: #2e7d32;
}

.index-arrow.down {
    color: var(--editorial-red);
}

.index-footer {
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-size: 0.7rem;
    color: var(--rule-dark);
    text-align: center;
    margin-top: 0.5rem;
}

.source-link {
    color: var(--blue-link);
    text-decoration: none;
}

.source-link:hover {
    text-decoration: underline;
}

/* --- Diplomatic Seal Watermark --- */
#lead-story::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 40%, rgba(26, 26, 26, 0.015) 41%, rgba(26, 26, 26, 0.015) 43%, transparent 44%, transparent 55%, rgba(26, 26, 26, 0.01) 56%, rgba(26, 26, 26, 0.01) 58%, transparent 59%);
    border: 2px solid rgba(26, 26, 26, 0.03);
    pointer-events: none;
    z-index: 0;
}

#lead-story > * {
    position: relative;
    z-index: 1;
}

/* --- Footer --- */
#page-footer {
    padding: 1rem 0;
    text-align: center;
}

.footer-text,
.footer-edition {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--rule-dark);
}

.footer-edition {
    margin-top: 0.25rem;
    font-size: 0.65rem;
}

/* --- Mobile Responsive (< 768px) --- */
@media (max-width: 768px) {
    #masthead {
        padding: 1rem;
    }

    .masthead-top {
        flex-direction: column;
        text-align: center;
    }

    .masthead-left,
    .masthead-right {
        text-align: center;
        min-width: auto;
    }

    .masthead-title {
        font-size: 2rem;
    }

    #page-wrapper {
        padding: 0 1rem 1.5rem;
    }

    .lead-headline {
        max-width: 100%;
        font-size: 1.5rem;
    }

    .breaking-stamp {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 0.75rem;
    }

    .lead-story-content {
        column-count: 1;
    }

    #content-layout {
        flex-direction: column;
    }

    #stories-columns {
        column-count: 1;
    }

    #diplomatic-index {
        width: 100%;
        min-width: auto;
        border-left: none;
        border-top: 2px solid var(--ink-black);
    }
}

/* --- Tablet (769px - 1024px) --- */
@media (min-width: 769px) and (max-width: 1024px) {
    #stories-columns {
        column-count: 2;
    }

    #diplomatic-index {
        width: 180px;
        min-width: 180px;
    }
}

/* --- Print Stylesheet --- */
@media print {
    body {
        background-color: #ffffff;
        color: #000000;
    }

    .breaking-stamp {
        background-color: #000000;
    }

    #stories-columns {
        column-count: 3;
        column-rule-color: #000000;
    }

    .lead-story-content {
        column-count: 2;
        column-rule-color: #000000;
    }

    .double-rule {
        border-color: #000000;
    }

    .thin-rule {
        border-color: #000000;
    }

    .pull-quote {
        background-color: #ffffff;
        border-left-color: #000000;
    }

    #diplomatic-index {
        background-color: #ffffff;
        border-left-color: #000000;
    }

    .index-arrow.up {
        color: #000000;
    }

    .index-arrow.down {
        color: #000000;
    }

    #lead-story::before {
        display: none;
    }
}
