/* economics.day - Soft Serif Editorial Blog */
/* Design: high-end financial broadsheet with modern digital enhancements */

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    --paper: #fefcf8;
    --deep-navy: #0a1628;
    --reading-black: #1a1a1a;
    --salmon-accent: #e8785a;
    --light-tint: #f0ece4;
    --caption-gray: #6b6b6b;
    --chart-blue: #2c5f8a;

    --font-body: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-data: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;

    --baseline: 1.75rem;
    --column-width: 660px;
    --breakout-width: 1000px;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: var(--baseline);
    color: var(--reading-black);
    background-color: var(--paper);
    font-feature-settings: 'liga', 'kern', 'onum';
}

/* ============================================
   Masthead
   ============================================ */
.masthead {
    max-width: var(--breakout-width);
    margin: 0 auto;
    padding: calc(var(--baseline) * 2) 2rem var(--baseline);
}

.masthead-inner {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.masthead-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--deep-navy);
    letter-spacing: -0.02em;
    text-align: center;
    flex: 1;
}

.masthead-date,
.masthead-edition {
    font-family: var(--font-data);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--caption-gray);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.masthead-rule {
    width: 100%;
    height: 2px;
    background-color: var(--deep-navy);
    margin-top: var(--baseline);
}

/* ============================================
   Content Column
   ============================================ */
.content-column {
    max-width: var(--column-width);
    margin: 0 auto;
    padding: calc(var(--baseline) * 2) 1.5rem;
}

/* ============================================
   Lead Story
   ============================================ */
.lead-story {
    margin-bottom: calc(var(--baseline) * 2);
}

.lead-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.15;
    color: var(--deep-navy);
    margin-bottom: calc(var(--baseline) * 0.5);
    letter-spacing: -0.01em;
}

.lead-deck {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--caption-gray);
    margin-bottom: var(--baseline);
}

/* ============================================
   Byline
   ============================================ */
.byline {
    font-family: var(--font-data);
    font-size: 0.8rem;
    color: var(--caption-gray);
    margin-bottom: var(--baseline);
    letter-spacing: 0.05em;
}

.author {
    font-variant: small-caps;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* ============================================
   Body Text
   ============================================ */
.body-text {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: var(--baseline);
    color: var(--reading-black);
    margin-bottom: var(--baseline);
    font-feature-settings: 'liga', 'kern', 'onum';
}

/* ============================================
   Drop Cap
   ============================================ */
.drop-cap {
    float: left;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 4.2rem;
    line-height: 0.8;
    color: var(--salmon-accent);
    padding-right: 0.15em;
    padding-top: 0.08em;
}

/* ============================================
   Pull Quotes
   ============================================ */
.pull-quote {
    position: relative;
    width: 120%;
    margin-left: -10%;
    padding: calc(var(--baseline) * 1.5) calc(var(--baseline) * 1.5);
    padding-left: calc(var(--baseline) * 2);
    border-left: 4px solid var(--salmon-accent);
    margin-top: calc(var(--baseline) * 1.5);
    margin-bottom: calc(var(--baseline) * 1.5);
}

.pull-quote::before {
    content: "\201C";
    font-family: var(--font-display);
    font-size: 6rem;
    color: var(--salmon-accent);
    opacity: 0.15;
    position: absolute;
    top: -0.2em;
    left: 0.15em;
    line-height: 1;
}

.pull-quote p {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--deep-navy);
    font-style: italic;
}

.pull-quote cite {
    display: block;
    font-family: var(--font-data);
    font-size: 0.8rem;
    font-style: normal;
    color: var(--caption-gray);
    margin-top: calc(var(--baseline) * 0.5);
    letter-spacing: 0.03em;
}

/* ============================================
   Section Divider (Three Dots)
   ============================================ */
.section-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: calc(var(--baseline) * 2) 0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--deep-navy);
}

.section-divider::before {
    box-shadow: -16px 0 0 var(--deep-navy);
}

.section-divider::after {
    box-shadow: 16px 0 0 var(--deep-navy);
}

/* ============================================
   Regular Stories
   ============================================ */
.story {
    margin-bottom: calc(var(--baseline) * 2);
}

.story-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.3;
    color: var(--deep-navy);
    margin-bottom: calc(var(--baseline) * 0.5);
}

.section-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.3;
    color: var(--deep-navy);
    margin-bottom: var(--baseline);
    padding-bottom: calc(var(--baseline) * 0.5);
    border-bottom: 1px solid var(--deep-navy);
}

/* ============================================
   Data Breakout Panels
   ============================================ */
.breakout {
    width: var(--breakout-width);
    margin-left: calc((var(--column-width) - var(--breakout-width)) / 2);
    margin-bottom: calc(var(--baseline) * 2);
}

.chart-panel {
    background-color: var(--light-tint);
    padding: calc(var(--baseline) * 1.5) calc(var(--baseline) * 1.5);
    font-feature-settings: 'liga', 'kern', 'tnum';
}

.chart-title {
    font-family: var(--font-data);
    font-size: 1rem;
    font-weight: 600;
    color: var(--deep-navy);
    margin-bottom: 0.25rem;
}

.chart-subtitle {
    font-family: var(--font-data);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--caption-gray);
    margin-bottom: var(--baseline);
}

.chart-container {
    width: 100%;
    margin-bottom: calc(var(--baseline) * 0.5);
}

.inline-chart {
    width: 100%;
    height: auto;
}

.chart-label {
    font-family: var(--font-data);
    font-size: 11px;
    fill: var(--caption-gray);
    text-anchor: middle;
}

.chart-label-y {
    text-anchor: end;
}

.grid-line {
    stroke: var(--caption-gray);
    stroke-width: 0.5;
    stroke-opacity: 0.3;
    stroke-dasharray: 2, 4;
}

.axis-line {
    stroke: var(--caption-gray);
    stroke-width: 1;
}

.data-line {
    fill: none;
    stroke: var(--chart-blue);
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.data-line-secondary {
    stroke: var(--salmon-accent);
    stroke-dasharray: 6, 3;
}

.data-line-tertiary {
    stroke: var(--caption-gray);
    stroke-dasharray: 2, 2;
}

.data-point {
    fill: var(--chart-blue);
    stroke: var(--paper);
    stroke-width: 1.5;
}

.chart-source {
    font-family: var(--font-data);
    font-size: 0.7rem;
    color: var(--caption-gray);
    font-style: italic;
}

/* ============================================
   Briefs Section
   ============================================ */
.briefs {
    margin-bottom: calc(var(--baseline) * 2);
}

.brief-item {
    margin-bottom: calc(var(--baseline) * 1.5);
}

.brief-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.4;
    color: var(--deep-navy);
    margin-bottom: calc(var(--baseline) * 0.25);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    max-width: var(--column-width);
    margin: 0 auto;
    padding: 0 1.5rem calc(var(--baseline) * 3);
}

.footer-rule {
    width: 100%;
    height: 2px;
    background-color: var(--deep-navy);
    margin-bottom: var(--baseline);
}

.footer-inner {
    text-align: center;
}

.footer-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--deep-navy);
    letter-spacing: -0.01em;
}

.footer-small {
    font-family: var(--font-data);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--caption-gray);
    margin-top: 0.25rem;
    letter-spacing: 0.05em;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1040px) {
    .breakout {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }

    .chart-panel {
        padding: var(--baseline) 1.5rem;
    }
}

@media (max-width: 720px) {
    .content-column {
        padding: var(--baseline) 1.25rem;
    }

    .masthead {
        padding: var(--baseline) 1.25rem calc(var(--baseline) * 0.5);
    }

    .masthead-inner {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }

    .masthead-date {
        order: -1;
    }

    .masthead-edition {
        order: 1;
    }

    .lead-headline {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }

    .pull-quote {
        width: 100%;
        margin-left: 0;
        padding-left: calc(var(--baseline) * 1.25);
    }

    .site-footer {
        padding: 0 1.25rem calc(var(--baseline) * 2);
    }
}
