/* --- FONTS & RESETS --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --ft-pink: #fff1e5;
    --ft-black: #1a1a1a;
    --ft-red: #990f3d;
    --ft-border: #cec6b9;
    --ft-grey-text: #505050;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Roboto', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    background-color: var(--ft-pink);
    color: var(--ft-black);
    font-family: var(--font-serif);
    margin: 0; padding: 0;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
a:hover { color: var(--ft-red); }

/* --- HEADER --- */
header {
    border-bottom: 1px solid var(--ft-black);
    padding: 25px 0 15px 0;
    text-align: center;
    background: var(--ft-pink);
    margin-bottom: 2rem;
}

.logo {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    letter-spacing: -1.5px;
    font-weight: 900;
    text-transform: uppercase;
    border-bottom: 1px solid var(--ft-border);
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 5px;
}

.sub-header {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--ft-grey-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- LAYOUT CONTAINERS --- */
.container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- SECTION 1: THE HERO (The "Tri-Pane") --- */
.hero-section {
    display: grid;
    grid-template-columns: 240px 1fr 280px; /* Precise broadsheet ratios */
    gap: 25px;
    border-bottom: 1px solid var(--ft-black);
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.hero-sidebar-left { border-right: 1px solid var(--ft-border); padding-right: 20px; }
.hero-sidebar-right { border-left: 1px solid var(--ft-border); padding-left: 20px; }

/* Main Feature Styling */
.hero-main .img-container {
    position: relative;
    margin-bottom: 15px;
}
.hero-main img {
    width: 100%;
    height: auto;
    display: block;
    filter: sepia(10%) contrast(110%); /* Subtle "print" look */
}
.headline-hero {
    font-size: 2.8rem;
    line-height: 1;
    font-weight: 700;
    margin: 10px 0;
}
.hero-summary {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: var(--ft-grey-text);
    line-height: 1.5;
    max-width: 90%;
}

/* Sidebar Styling */
.sidebar-item {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--ft-border);
    padding-bottom: 15px;
}
.sidebar-item:last-child { border-bottom: none; }

.headline-sm {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 5px 0;
}

/* --- SECTION 2: THE INFINITE NEWS GRID (Masonry) --- */
.section-header {
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--ft-red);
    text-transform: uppercase;
    font-size: 0.9rem;
    border-top: 4px solid var(--ft-black);
    padding-top: 10px;
    margin-bottom: 20px;
    display: inline-block;
}

/* This is the magic "Puzzle Board" layout */
.news-masonry {
    column-count: 4; /* Creates 4 newspaper columns */
    column-gap: 25px;
}

.news-card {
    break-inside: avoid; /* Prevents card from splitting across columns */
    background: white;
    border: 1px solid #e0dbd3;
    padding: 20px;
    margin-bottom: 25px; /* Space between items in column */
    box-shadow: 2px 2px 0px rgba(0,0,0,0.05);
}

.news-card:hover {
    border-color: var(--ft-black);
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

/* Card Typography */
.category-tag {
    color: var(--ft-red);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.headline-md {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 10px 0;
}

.card-excerpt {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 12px;
}

.card-meta {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: #888;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

/* --- RESPONSIVENESS --- */
@media (max-width: 1024px) {
    .hero-section { grid-template-columns: 1fr 1fr; }
    .hero-sidebar-right { display: none; } /* Hide right bar on tablets */
    .news-masonry { column-count: 3; }
}

@media (max-width: 768px) {
    .hero-section { grid-template-columns: 1fr; }
    .hero-sidebar-left { border-right: none; border-bottom: 1px solid var(--ft-border); margin-bottom: 20px; }
    .news-masonry { column-count: 1; } /* Stack vertically on mobile */
    .logo { font-size: 2.5rem; }
}
/* --- ARTICLE PAGE SPECIFICS --- */

/* This restricts the reading area to a comfortable width, like a newspaper column */
.article-container {
    max-width: 740px;       /* Standard readability width (approx 60-75 chars per line) */
    margin: 60px auto;      /* Generous top/bottom margin to separate from header/footer */
    padding: 0 20px;        /* Side padding prevents text hitting edge on mobile */
    background-color: white; /* Optional: Makes the article pop against the pink background */
    padding-top: 50px;      /* internal padding if using white background */
    padding-bottom: 50px;
    border: 1px solid #e0dbd3; /* Subtle border to define the page */
    box-shadow: 0 4px 20px rgba(0,0,0,0.03); /* Very subtle lift */
}

/* Typography for the article body */
.article-body {
    font-family: 'Georgia', 'Times New Roman', serif; /* Classic serif for body text */
    font-size: 1.2rem;      /* Larger than UI text for easy reading */
    line-height: 1.8;       /* Generous line height (leading) is key for the "premium" feel */
    color: #333;            /* Dark grey is softer on eyes than pure black */
    margin-top: 30px;
}

/* Spacing between paragraphs */
.article-body p {
    margin-bottom: 24px;
}

/* Blockquotes (if the AI generates them) */
.article-body blockquote {
    border-left: 4px solid var(--ft-red);
    margin: 30px 0;
    padding-left: 20px;
    font-style: italic;
    color: #555;
    font-size: 1.3rem;
}

/* Subheadings inside articles */
.article-body h2 {
    font-family: var(--font-sans);
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 15px;
    font-size: 1.4rem;
    color: #000;
}

/* Responsive adjustment for mobile */
@media (max-width: 768px) {
    .article-container {
        margin: 0;           /* Remove outer margin on mobile */
        width: 100%;         /* Full width */
        max-width: 100%;
        border: none;        /* Remove border on mobile for cleaner look */
        box-shadow: none;
        padding: 30px 20px;
    }
}
/* --- EXECUTIVE BRIEFING & SENTIMENT --- */
.executive-brief {
    background-color: #f3f2ee; /* Slightly darker than page */
    border: 1px solid #cec6b9;
    padding: 20px;
    margin: 20px 0 30px 0;
    border-left: 5px solid var(--ft-red);
}

.brief-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.brief-header h3 {
    margin: 0;
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--ft-grey-text);
}

.sentiment-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
}

.meter-track {
    width: 60px;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.tldr-list {
    margin: 0;
    padding-left: 20px;
}

.tldr-list li {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* --- LINK STYLING FIX --- */
.article-body a {
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 2px solid rgba(153, 15, 61, 0.4); /* Faint FT Red */
    transition: all 0.2s ease;
}

.article-body a:hover {
    background-color: rgba(153, 15, 61, 0.1);
    border-bottom-color: var(--ft-red);
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    line-height: 1.1;
}

.article-divider {
    border: 0;
    border-top: 1px solid var(--ft-black);
    margin-bottom: 30px;
}

.article-footer {
    margin-top: 50px;
}

.article-footer a {
    color: var(--ft-red);
    border-bottom: 1px solid transparent;
}

.article-footer a:hover {
    border-bottom-color: var(--ft-red);
}
