/* Newsletter Public View - Clean Design */
:root {
    --magpie-primary: #10B981;
    --magpie-dark: #059669;
    --accent: #ea5686;
    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--bg-dark);
    color: white;
}

.header-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-title:hover {
    opacity: 0.9;
}

.header-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--magpie-primary);
    text-decoration: none;
}

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

/* Sponsor Banner - Top */
.sponsor-banner {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-bottom: 1px solid #bbf7d0;
}

.sponsor-banner-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0.625rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}

.sponsor-banner-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.sponsor-banner-logo {
    display: flex;
    align-items: center;
    transition: opacity 0.15s;
}

.sponsor-banner-logo:hover {
    opacity: 0.8;
}

.sponsor-banner-logo img {
    height: 22px;
}

/* Main */
.main {
    flex: 1;
    padding: 2rem 1.5rem;
}

.newsletter {
    max-width: 680px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border);
    border-top-color: var(--magpie-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Newsletter Banner */
.newsletter-banner {
    width: 100%;
    overflow: hidden;
}

.newsletter-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* Newsletter Content */
.newsletter-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.newsletter-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: right;
    margin-bottom: 0.5rem;
}

.newsletter-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0;
    line-height: 1.3;
}

.newsletter-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.newsletter-intro {
    padding: 1.5rem 2rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.03) 0%, transparent 100%);
}

.newsletter-intro p {
    margin-bottom: 0.75rem;
}

.newsletter-intro p:last-child {
    margin-bottom: 0;
}

.newsletter-intro a {
    color: var(--magpie-primary);
}

/* Articles */
.newsletter-articles {
    padding: 0;
}

.article-card {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.article-card:hover {
    background: rgba(248, 250, 252, 0.5);
}

.article-card:last-child {
    border-bottom: none;
}

.article-card-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

.article-card-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
    line-height: 1.35;
}

.article-card-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.875rem;
}

.article-card-summary {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.article-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--magpie-primary);
    text-decoration: none;
    transition: gap 0.15s;
}

.article-card-link:hover {
    gap: 0.5rem;
}

/* Section Images */
.section-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

/* Text Sections */
.text-section {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.text-section:last-child {
    border-bottom: none;
}

.text-section-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.text-section-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.text-section-content p {
    margin-bottom: 0.875rem;
}

.text-section-content p:last-child {
    margin-bottom: 0;
}

.text-section-content a {
    color: var(--magpie-primary);
}

.text-section-content ul,
.text-section-content ol {
    margin-bottom: 0.875rem;
    padding-left: 1.5rem;
}

.text-section-content li {
    margin-bottom: 0.375rem;
}

/* Video Sections */
.video-section {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.video-section:last-child {
    border-bottom: none;
}

.video-section-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--bg-dark);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Commentary */
.article-commentary {
    background: linear-gradient(135deg, rgba(234, 86, 134, 0.08) 0%, rgba(234, 86, 134, 0.02) 100%);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
    margin-top: 1.25rem;
}

.commentary-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.commentary-text {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text);
    font-style: italic;
}

/* Footer Content */
.newsletter-footer {
    padding: 2rem;
    background: var(--bg-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.newsletter-footer p {
    margin-bottom: 0.75rem;
}

.newsletter-footer p:last-child {
    margin-bottom: 0;
}

.newsletter-footer a {
    color: var(--magpie-primary);
}

/* Error State */
.error-state {
    max-width: 480px;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
}

.error-state h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.error-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-flex;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--magpie-primary), var(--magpie-dark));
    border-radius: 100px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* Page Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
}

.footer-content {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
    .newsletter-header {
        padding: 2rem 1.25rem 1.5rem;
    }

    .newsletter-intro,
    .article-card,
    .text-section,
    .video-section,
    .newsletter-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .newsletter-title {
        font-size: 1.5rem;
    }

    .article-card-title,
    .text-section-title,
    .video-section-title {
        font-size: 1.25rem;
    }
}
