/* Minimalist CCTV News Archive */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 120px; /* Account for fixed header when scrolling to anchors */
}

/* Global Color Palette: The Confident Trend Follower */
:root {
    /* Primary Deep Teal - The Confident Trend Follower */
    --primary-teal-dark: #0A3A46;    /* Dark teal for headers */
    --primary-teal: #0F4C5C;         /* Primary brand teal */
    --primary-teal-medium: #1A6F7F;  /* Medium teal */
    --primary-teal-light: #26A5B5;   /* Bright teal accents */
    --primary-teal-bright: #4DD0E1;  /* Bright teal for CTAs */
    
    /* Complementary Orange - High-energy contrast */
    --complementary-orange-dark: #E55A2B;  /* Deep orange */
    --complementary-orange: #F97316;        /* Primary orange - more natural */
    --complementary-orange-medium: #FB8C4A; /* Medium orange */
    --complementary-orange-light: #FDB777;  /* Light orange */
    --complementary-orange-bright: #FED7AA; /* Pale orange for backgrounds */
    
    /* Data Colors - Muted and natural */
    --data-green: #059669;    /* Muted green for profits */
    --data-red: #DC2626;      /* Muted red for losses */
    
    /* Neutral Sophistication */
    --neutral-black: #0A0A0A;    /* Rich black */
    --neutral-dark: #374151;     /* Dark gray for text */
    --neutral-medium: #6B7280;   /* Medium gray */
    --neutral-light: #9CA3AF;    /* Light gray */
    --neutral-pale: #F3F4F6;     /* Light gray for backgrounds and borders */
    --neutral-white: #FFFFFF;     /* Pure white */
    
    /* Status Colors */
    --success-green: #059669;    /* Success green */
    --warning-orange: #F97316;   /* Warning orange */
    --error-red: #DC2626;        /* Error red */
    --info-teal: #26A5B5;        /* Info teal */

    /* Legacy mappings for compatibility */
    --bg-primary: var(--neutral-white);
    --bg-secondary: var(--neutral-pale);
    --bg-card: var(--neutral-white);
    --primary-blue: var(--primary-teal);
    --primary-light: var(--primary-teal-light);
    --primary-dark: var(--primary-teal-dark);
    --accent-gold: var(--complementary-orange);
    --accent-red: var(--data-red);
    --accent-orange: var(--primary-teal);
    --success: var(--data-green);
    --warning: var(--complementary-orange);
    --danger: var(--data-red);
    --info: var(--primary-teal-light);
    --text-primary: var(--neutral-dark);
    --text-secondary: var(--neutral-medium);
    --text-muted: var(--neutral-light);
    --border: var(--neutral-pale);
    --divider: var(--neutral-pale);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--neutral-dark);
    background-color: var(--neutral-white);
    transition: all 0.2s ease;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

h1 { 
    font-size: 2rem; 
    margin: 0 0 1rem 0;
}
h2 { font-size: 1.5rem; }
h3 { font-size: 1rem; }
h4 { font-size: 0.875rem; }

p {
    margin-bottom: 1rem;
    color: var(--neutral-medium);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.75rem;
}

/* Header - Modern Navigation */
header {
    padding: 0.75rem 0;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

.site-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-teal);
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    line-height: 1.2;
}

.site-title:hover {
    transform: scale(1.05);
    color: var(--primary-light);
}

.nav-menu {
    display: none;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(38, 165, 181, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-teal);
    background: linear-gradient(135deg, rgba(38, 165, 181, 0.1), rgba(15, 76, 92, 0.05));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(38, 165, 181, 0.15);
}

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.menu-toggle:hover {
    background: rgba(38, 165, 181, 0.1);
    color: var(--primary-teal);
}

.hamburger {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    position: absolute;
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    top: 6px;
}

/* Mobile menu toggle */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        order: 2;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 0 0 0.5rem 0.5rem;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        gap: 0.5rem;
        order: 3;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .menu-toggle.active .hamburger {
        background: transparent;
    }
    
    .menu-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }
    
    .menu-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        top: 0;
    }
}

/* Archive Navigation */
.archive-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.year-link {
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.year-link:hover {
    background-color: var(--neutral-pale);
    border-color: var(--primary-teal);
    color: var(--primary-teal-light);
}

/* Footer - Enhanced with Goldman Sachs + E Fund Palette */
footer {
    padding: 1.5rem 0 1rem;
    margin-top: 2rem;
    background: linear-gradient(135deg, var(--primary-teal-dark) 0%, var(--primary-teal) 100%);
    color: var(--neutral-white);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(38, 165, 181, 0.05) 50%, transparent 70%);
    pointer-events: none;
}

footer .container {
    position: relative;
    z-index: 1;
}

footer p {
    color: var(--neutral-white);
    font-size: 0.875rem;
}

footer a {
    color: var(--primary-teal-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-teal-light), var(--primary-teal));
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

footer a:hover {
    color: var(--primary-teal-bright);
    transform: translateY(-1px);
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

body.dark-mode .news-item {
    background: #2a2a2a;
    color: #e4e4e4;
}

body.dark-mode .news-item h2 {
    color: #e4e4e4;
}

.news-item .news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.news-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

body.dark-mode .news-content {
    color: #ccc;
}

.news-content p {
    margin-bottom: 1rem;
}

.news-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-primary, .btn-secondary {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    background: var(--neutral-pale);
    color: var(--neutral-dark);
    border: 1px solid var(--neutral-light);
}

.btn-secondary:hover {
    background: #e9ecef;
}

/* Section Styling */
section {
    margin-bottom: 4rem;
}

.opportunities-section {
    margin-bottom: 1rem;
}

section h2 {
    margin-bottom: 0.75rem;
    color: var(--neutral-dark);
    padding-bottom: 0;
    text-align: left;
}

/* Intro Section */
.intro-section {
    margin-bottom: 0.5rem;
    padding: 25rem 0;
    border-bottom: 1px solid rgba(38, 165, 181, 0.1);
}

.analysis-section {
    margin-bottom: 3rem;
}

.intro-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.intro-section h1 {
    font-weight: 700;
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary-teal-dark), var(--primary-teal), var(--primary-teal-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 1rem 0;
    line-height: 1.1;
    text-align: center;
    letter-spacing: -0.02em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Hero subtitle */
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--neutral-medium);
    text-align: center;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Call-to-action buttons container */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

/* Call-to-action button */
.cta-button {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(38, 165, 181, 0.3);
    flex: 1;
    min-width: 200px;
    max-width: 250px;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-light));
    color: white;
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(38, 165, 181, 0.4);
    background: linear-gradient(135deg, var(--primary-teal-dark), var(--primary-teal));
}

.cta-button.secondary {
    background: linear-gradient(135deg, var(--complementary-orange), var(--complementary-orange-light));
    color: white;
}

.cta-button.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
    background: linear-gradient(135deg, var(--complementary-orange-dark), var(--complementary-orange));
}

/* --- Very Small Mobile (< 601px) --- */
@media (max-width: 600px) {
    /* Force features list to column when space is too tight */
    .features-list {
        flex-direction: column;
        gap: 0;
        margin: 0.75rem 0;
    }
    
    .feature-item {
        margin: 0.25rem 0;
    }
    
    /* Smaller font sizes for very small phones */
    .intro-section h1 {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .cta-button {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }
    
    .intro-section {
        padding: 8rem 0;
    }
}

/* --- Mobile/Small Tablet (>= 481px) --- */
/* This is for slightly larger phones/portrait tablets, fixing the footer/cards back to flexible columns where possible. */
@media (min-width: 481px) {
    .container {
        padding: 0 1rem;
    }

    .site-title {
        font-size: 1.35rem;
        white-space: nowrap;
    }
    
    .intro-section h1 {
        font-size: 2.3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }

    /* Let the card containers go back to a more flexible 1-2 column layout */
    .analysis-summary,
    .cards-grid,
    .news-grid {
        /* This minmax allows two columns if they both fit, otherwise, it reverts to 1fr. */
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1rem;
    }
    
    .footer-content {
        /* Let the footer columns breathe a little */
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    /* Undo 100% width on buttons if they can fit side-by-side */
    .news-actions {
        flex-direction: row;
        gap: 1rem;
    }

    .btn-primary, .btn-secondary {
        width: auto;
    }
    
    .intro-section {
        padding: 15rem 0;
    }
}

/* --- Tablet/Small Desktop (>= 769px) --- */
@media (min-width: 769px) {
    /* Header/Nav: Revert to horizontal layout and hide the toggle */
    .menu-toggle {
        display: none;
    }

    .nav-menu {
        display: flex !important; /* Force display flex for non-mobile menu */
        flex-direction: row;
        gap: 1rem;
    }

    header .container {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .site-title {
        font-size: 1.5rem;
        flex: 0; /* Let it shrink based on content, not take up all space */
        white-space: nowrap;
    }

    .container {
        padding: 0 1.5rem;
    }
    
    .intro-section h1 {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }

    /* Features list switch to horizontal */
    .features-list {
        flex-direction: row; /* Switch to horizontal layout */
        gap: 2rem; /* Horizontal spacing */
        margin: 2rem 0;
        flex-wrap: wrap; /* Allow wrapping if items are too wide */
    }
    
    /* Card/Grid: Back to original large desktop layout with a wider minimum */
    .cards-grid,
    .analysis-summary {
        grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
        gap: 1.5rem;
    }

    /* News Grid, allowing 2-3 columns */
    .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    /* Footer: Wider columns */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }
}

/* --- Large Desktop (>= 1025px) --- */
@media (min-width: 1025px) {
    /* General content can be at max-width 1200px (already in base .container) */
    /* No additional styling needed here unless specifically targeting ultra-wide screens */
}

.value-proposition {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0.5rem 0 0.5rem 0;
    padding: 0;
    list-style: none;
    font-size: 1.2rem;
    color: var(--neutral-medium);
}

/* --- Modern Feature List Implementation (Mobile Default) --- */
.features-list {
    /* Use flexbox for the container */
    display: flex;
    justify-content: center; /* Center items horizontally */
    align-items: center; /* Center items vertically */
    
    /* Default: Stack items vertically for small screens */
    flex-direction: column; 
    gap: 0.75rem; /* Gap between vertical items */
    margin: 1.5rem 0; /* Vertical margin around the list */
    
    /* Prevents unwanted wrapping in the column layout */
    flex-wrap: nowrap; 
    padding: 0;
    list-style: none; /* Make sure it's a clean list */
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    margin: 0; /* Remove any previous margins that caused issues */
    text-align: center; /* Center the text inside the item */
}

.section-header {
    text-align: left;
    margin-bottom: 0.75rem;
}

.section-header h2 {
    border-bottom: 2px solid var(--primary-teal);
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
}

.section-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.theme-navigation {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.25rem 0;
    width: 100%;
    max-width: 800px;
}

.theme-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-light));
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(38, 165, 181, 0.3);
    white-space: nowrap;
    text-align: center;
}

.theme-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(38, 165, 181, 0.4);
    background: linear-gradient(135deg, var(--primary-teal-medium), var(--primary-teal));
}

.theme-nav-btn:active,
.theme-nav-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(38, 165, 181, 0.5);
}

.section-subtitle {
    color: var(--neutral-medium);
    margin-top: 0.25rem;
    text-align: left;
    font-size: 1rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.data-source {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--neutral-light);
}

.source-info {
    font-size: 0.9rem;
    color: var(--neutral-medium);
}

.news-source-link {
    display: inline-block;
    color: var(--primary-teal-light);
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
}

.news-source-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background: var(--primary-teal-dark);
}

.news-source-link:focus {
    outline: none !important;
    box-shadow: none !important;
}

.news-source-inline {
    color: var(--primary-teal-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.news-source-inline:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background: var(--primary-teal-dark);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--neutral-pale);
    border-radius: 12px;
    color: var(--neutral-medium);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Footer enhancements */
.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.footer-section {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(38, 165, 181, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-teal-light), var(--primary-teal), var(--primary-teal-medium));
}

.footer-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(15, 76, 92, 0.3);
    border-color: rgba(38, 165, 181, 0.4);
}

.footer-section h4 {
    color: var(--neutral-white);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section h4::before {
    content: '✦';
    color: var(--primary-teal-light);
    font-size: 1rem;
}

.footer-section p {
    color: var(--neutral-white);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.disclaimer {
    color: var(--neutral-white);
    font-size: 0.8rem;
    text-align: center;
    border-top: 1px solid rgba(38, 165, 181, 0.4);
    padding-top: 1.5rem;
    margin-top: 2rem;
    position: relative;
}

.disclaimer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-teal), transparent);
}

/* Analysis Summary */
.analysis-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.core-logic-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid rgba(38, 165, 181, 0.15);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.core-logic-card h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.core-logic-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
}

.daily-quote-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid rgba(38, 165, 181, 0.15);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.daily-quote-card h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.daily-quote-card p {
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    font-size: 1.5rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
}

.impact-text {
    color: var(--text-secondary);
    font-size: 0.875rem; /* match actionable advice */
    line-height: 1.5;
    margin-bottom: 0;
}

.meta-info {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: auto;
    padding-top: 1rem;
}

.daily-quote-card .meta-info {
    margin-top: auto;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    align-self: center;
    margin-top: 0;
}

.meta-info .btn-copy {
    display: inline-block;
    color: var(--primary-teal-light);
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
}

.meta-info .btn-copy:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background: var(--primary-teal-dark);
}

.meta-info .btn-copy:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Card Styles */
.opportunity-card {
    background: var(--neutral-white);
    border: 1px solid rgba(38, 165, 181, 0.15);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.opportunity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(38, 165, 181, 0.25), 0 0 0 2px rgba(38, 165, 181, 0.3);
    border-color: var(--primary-teal-light);
    background: #ffffff;
}

.opportunity-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.3;
    background: linear-gradient(135deg, var(--primary-teal-dark), var(--primary-teal), var(--primary-teal-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    text-shadow: 0 2px 4px rgba(15, 76, 92, 0.3);
    letter-spacing: -0.01em;
    position: relative;
    flex: 1;
}

.opportunity-card h4::after {
    content: '';
    position: absolute;
    bottom: -0.25rem;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-teal-light), var(--primary-teal));
    border-radius: 2px;
}

.opportunity-header {
    margin-bottom: 1rem;
}

.card-nav-btn {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, var(--complementary-orange), var(--complementary-orange-medium));
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.card-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.4);
    background: linear-gradient(135deg, var(--complementary-orange-dark), var(--complementary-orange));
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(38, 165, 181, 0.1);
}

.card-share-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--complementary-orange), var(--complementary-orange-medium));
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.card-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
    background: linear-gradient(135deg, var(--complementary-orange-dark), var(--complementary-orange));
}

.card-preview {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Stock and ETF tags */
.stocks-list, .etfs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.stock-tag, .etf-tag {
    background: var(--primary-teal-light);
    color: white;
    font-size: 0.875rem;
    font-weight: 400;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stock-tag:hover, .etf-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background: var(--primary-teal-dark);
}

/* Opportunity card sections */
.opportunity-card .investment-section {
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.opportunity-card .etf-section {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.opportunity-card .action-section {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.opportunity-card .news-interpretation {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.opportunity-card .investment-section h5,
.opportunity-card .etf-section h5,
.opportunity-card .action-section h5,
.opportunity-card .news-interpretation h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.actionable-advice {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    margin-bottom: 0;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: var(--neutral-white);
    border: 1px solid rgba(38, 165, 181, 0.15);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border-color: rgba(38, 165, 181, 0.06);
    background: #ffffff;
}

/* Cards Grid - Base layout for opportunity cards */
.cards-grid {
    display: grid;
    gap: 1.5rem;
    padding: 0;
    box-sizing: border-box;
}

/* Stock Tracking Page Styles */
.stock-table-container {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.stock-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    min-width: 800px; /* Minimum width to ensure readability */
}

/* Sticky first column for mobile responsiveness */
.sticky-column {
    position: sticky;
    background: var(--neutral-white);
    background-color: var(--neutral-white);
    z-index: 15;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sticky-column.checkbox-column {
    left: 0;
    min-width: 50px;
    max-width: 50px;
    width: 50px;
}

.sticky-column:not(.checkbox-column) {
    left: 50px;
    min-width: 150px;
    max-width: 200px;
}

.sticky-column::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: var(--border-color);
    z-index: 1;
}

/* Stock info styling in sticky column */
.stock-info {
    padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.5rem, 3vw, 1rem);
}

.stock-code-name {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stock-code-name .stock-code {
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: pre-line;
    font-size: inherit;
}

.stock-code-name .stock-code:hover {
    color: var(--accent-color);
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .stock-table-container {
        margin: 1rem -1rem 2rem -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .sticky-column {
        min-width: 120px;
        max-width: 160px;
    }
    
    .stock-info {
        padding: clamp(0.125rem, 0.75vw, 0.25rem) clamp(0.125rem, 1vw, 0.375rem);
    }
}

/* Table headers and cells */
.stock-table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    padding: clamp(0.75rem, 2.5vw, 1rem);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 5;
}

.stock-table th.sticky-column {
    z-index: 15; /* Higher than regular sticky */
}

.stock-table td {
    padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.5rem, 3vw, 1rem);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-align: center;
}

.stock-table td.sticky-column {
    padding: clamp(0.25rem, 1vw, 0.5rem) clamp(0.25rem, 1.5vw, 0.75rem);
}

.stock-table tbody tr:hover {
    background: var(--bg-hover);
}

.stock-table tbody tr:hover .sticky-column {
    background: var(--neutral-white);
    background-color: var(--neutral-white);
}

.stock-name {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stock-code {
    background: var(--accent-color);
    color: #1f2937;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.score-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.score-high {
    background: var(--primary-teal-light);
    color: white;
}

.score-medium {
    background: var(--primary-teal-bright);
    color: white;
}

.score-low {
    background: var(--error-red);
    color: white;
}

.rationale-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    max-width: 300px;
}

.rationale-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.rationale-leading {
    background: var(--primary-teal-light);
    color: white;
}

.rationale-excellent {
    background: var(--primary-teal-bright);
    color: white;
}

.tech-indicators {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.tech-indicator {
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.tech-strong-sell {
    /* Indicates a BIG expected loss (GREEN in China) */
    background: #059669; 
    color: white;
}

.tech-sell {
    /* Indicates an expected loss (GREEN in China) */
    background: #34D399;
    color: white;
}

.tech-neutral {
    background: #9CA3AF;
    color: white;
}

.tech-buy {
    /* Indicates an expected gain (RED in China) */
    background: #F87171;
    color: white;
}

.tech-strong-buy {
    /* Indicates a BIG expected gain (RED in China) */
    background: #DC2626;
    color: white;
}

.popularity-rank {
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
}

.popularity-change {
    font-weight: 500;
    text-align: center;
}

.popularity-change.positive {
    color: var(--primary-teal);
}

.popularity-change.negative {
    color: var(--complementary-orange);
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.selected-stocks-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    width: 100%;
}

.selected-stocks-section.collapsed {
    padding: 0.75rem 1.5rem;
}

.selected-stocks-section.collapsed .stock-table-container {
    display: none;
}

.selected-stocks-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 1rem;
}

.selected-stocks-header:hover {
    opacity: 0.8;
}

.collapse-toggle-btn {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collapse-toggle-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-color);
}

.selected-stocks-section.collapsed .investment-calculator {
    display: none;
}

.investment-calculator {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.investment-input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.investment-input-group label {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.investment-amount-input {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.25rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    width: 120px;
}

.investment-amount-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.calculate-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-light));
    color: white;
    border: none;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(38, 165, 181, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(38, 165, 181, 0.4);
    background: linear-gradient(135deg, var(--primary-teal-medium), var(--primary-teal));
}

.investment-results {
    margin-top: 1rem;
}

.results-header {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.result-item {
    background: var(--card-bg);
    padding: 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
}

.result-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.result-value {
    font-weight: 600;
    color: var(--accent-color);
}

.stock-checkbox {
    margin-right: 0.5rem;
}

.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    background: var(--bg-hover);
}

.sortable.sort-asc::after {
    content: ' ↑';
    opacity: 0.7;
}

/* Hide weight column from display but keep for sorting */
.stock-table th:nth-child(10),
.stock-table td:nth-child(10) {
    display: none;
}

