/* ravn.news shared styles */

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

body {
    background-color: #ffffff;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.7;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1;
}

.container--narrow {
    max-width: 680px;
}

/* Header */
.header {
    padding: 48px 0 32px 0;
    border-bottom: 3px solid #1a1a1a;
    margin-bottom: 40px;
}

.brand {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 8px;
}

.brand a {
    color: inherit;
    text-decoration: none;
}

.brand a:hover {
    color: #1a1a1a;
}

.title {
    font-size: 42px;
    font-weight: 400;
    color: #1a1a1a;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 8px;
}

.subtitle {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

/* Main content */
.main {
    padding: 0 0 48px 0;
}

.description {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 32px;
}

/* Newsletter Grid (homepage) */
.newsletter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.newsletter-card {
    border: 2px solid #e5e5e5;
    border-radius: 4px;
    padding: 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.newsletter-card:hover {
    border-color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.newsletter-card__header {
    margin-bottom: 16px;
}

.newsletter-card__name {
    font-size: 24px;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.newsletter-card__tagline {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.newsletter-card__description {
    font-size: 15px;
    color: #444;
    line-height: 1.6;
    margin-bottom: 20px;
}

.newsletter-card__headlines {
    margin-bottom: 20px;
}

.newsletter-card__headline-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 12px;
}

.newsletter-card__headline-item {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}

.newsletter-card__headline-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 6px;
    height: 6px;
    background-color: #1a1a1a;
    border-radius: 50%;
}

.newsletter-card__cta {
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    padding: 12px 24px;
    border: 2px solid #1a1a1a;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.newsletter-card__cta:hover {
    background-color: #1a1a1a;
    color: #fff;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton--text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton--text:last-child {
    width: 70%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* No data state */
.no-data {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #888;
    font-style: italic;
    padding: 12px 0;
}

/* Subscribe form */
.subscribe-section {
    background-color: #f8f8f8;
    padding: 32px;
    border-radius: 4px;
    margin-bottom: 32px;
}

.subscribe-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 16px;
}

.subscribe-form {
    display: flex;
    gap: 12px;
}

.email-input {
    flex: 1;
    padding: 14px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.email-input:focus {
    border-color: #1a1a1a;
}

.email-input::placeholder {
    color: #999;
}

.submit-button {
    padding: 14px 28px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background-color: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-button:hover {
    background-color: #333;
}

.submit-button:disabled {
    background-color: #999;
    cursor: not-allowed;
}

/* Feedback messages */
.message {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 4px;
    margin-top: 16px;
    display: none;
}

.message.success {
    background-color: #d1fae5;
    color: #065f46;
    display: block;
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    display: block;
}

/* Section labels */
.section-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 16px;
}

/* Headlines section */
.headlines-section {
    margin-bottom: 40px;
}

.headlines-section__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

.headline-item {
    margin-bottom: 20px;
}

.headline-item__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.headline-item__title a {
    color: inherit;
    text-decoration: none;
}

.headline-item__title a:hover {
    text-decoration: underline;
}

.headline-item__summary {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

.headline-item__source {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Market snapshot */
.market-snapshot {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.market-snapshot__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 16px;
}

.market-snapshot__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stock-card {
    background-color: #fff;
    border-radius: 4px;
    padding: 12px;
    text-align: center;
    border: 1px solid #e5e5e5;
    min-width: 0; /* Allow flex/grid children to shrink below content size */
    overflow: hidden;
}

.stock-card--up {
    border-color: #10b981;
    background-color: #ecfdf5;
}

.stock-card--down {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.stock-card__symbol {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 10px;
    color: #666;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-card__subtitle {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 9px;
    color: #888;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-card__name {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-card__price {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.stock-card__change {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12px;
    font-weight: 600;
}

.stock-card__change--up {
    color: #10b981;
}

.stock-card__change--down {
    color: #ef4444;
}

/* Last updated */
.last-updated {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12px;
    color: #888;
    margin-bottom: 24px;
}

/* Features list */
.features {
    margin-bottom: 40px;
}

.feature {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #444;
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
}

.feature::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background-color: #1a1a1a;
    border-radius: 50%;
}

/* Footer */
.footer {
    padding: 24px 0;
    border-top: 3px solid #1a1a1a;
    margin-top: auto;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12px;
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .title { font-size: 32px; }
    .header { padding: 32px 0 24px 0; }

    .newsletter-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .market-snapshot__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .subscribe-form {
        flex-direction: column;
    }

    .submit-button {
        width: 100%;
    }

    .subscribe-section {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .market-snapshot__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
