:root {
    --bg-page: #f8fafc; /* Crisp white/light gray background */
    --canvas-bg: #ffffff;
    --card-bg: #ffffff;
    
    --text-dark: #111827;
    --text-muted: #6b7280;
    
    /* New Global Theme Colors */
    --primary-maroon: #800000;
    --light-maroon: #fdf2f2;
    --gold: #d4af37;
    --light-gold: #fcf9f2;
    
    --border-color: #e5e7eb;
    
    --shadow-subtle: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-heavy: 0 25px 50px -12px rgba(128, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    padding: 2rem;
    min-height: 100vh;
}

/* Outer Presentation Canvas */
.presentation-canvas {
    width: 100%;
    max-width: 1600px;
    background-color: var(--canvas-bg);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-heavy);
}

.presentation-header {
    text-align: center;
    padding: 3rem 4rem 1rem;
}
.presentation-header h1 {
    font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.5rem; color: var(--text-dark);
}
.presentation-header p {
    color: var(--text-muted); font-size: 1rem; max-width: 800px; margin: 0 auto; line-height: 1.5;
}

/* Showcase Grid Layout */
.showcase-grid {
    padding: 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 2rem;
}

#panel-global { grid-column: 1 / 2; }
#panel-financial { grid-column: 2 / 3; }
#panel-community { grid-column: 1 / 3; }

/* Mockup Panel Shared Base */
.mockup-panel {
    background: #f9fafb; 
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    display: flex;
    height: 600px; 
}

/* UI Wrapper Architecture */
.ui-wrapper { display: flex; flex-direction: column; width: 100%; height: 100%; }

/* Topbar */
.ui-topbar {
    display: flex; justify-content: space-between; align-items: center; 
    padding: 0.8rem 1.5rem; background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.03); 
    z-index: 10;
}
.topbar-left { display: flex; align-items: center; gap: 2rem;}
.ui-topbar .logo { font-size: 1.2rem; color: var(--primary-maroon); }
.ui-topbar .logo b { font-weight: 800; color: var(--gold);}

.ui-topbar nav { display: flex; align-items: center; gap: 0.2rem;}
.ui-topbar nav a { text-decoration: none; color: var(--text-muted); padding: 0.4rem 0.6rem; border-radius: 6px; font-size: 0.85rem; font-weight: 600; transition: 0.2s;}
.ui-topbar nav a:hover { background: #f3f4f6; color: var(--text-dark);}
.ui-topbar nav a.active { background: var(--light-maroon); color: var(--primary-maroon); }

.topbar-right { display: flex; align-items: center; gap: 1rem;}
.search { display: flex; align-items: center; gap: 0.5rem; background: #f3f4f6; padding: 0.4rem 0.8rem; border-radius: 8px; width: 200px; border: 1px solid var(--border-color);}
.search input { border: none; background: transparent; outline: none; font-family: inherit; font-size: 0.85rem; width: 100%;}
.avatar { width: 32px; height: 32px; background: #e5e7eb; border-radius: 50%; border: 2px solid var(--gold);}

/* Breaking Ticker */
.breaking-ticker { display: flex; align-items: center; background: var(--primary-maroon); color: white; padding: 0.4rem 1rem; font-size: 0.75rem;}
.b-badge { background: var(--gold); color: var(--primary-maroon); padding: 0.2rem 0.5rem; border-radius: 4px; font-weight: 800; margin-right: 1rem; text-transform: uppercase; letter-spacing: 0.05em;}
.breaking-ticker marquee { flex: 1; font-weight: 500; color: var(--light-gold);}

/* Main UI */
.ui-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.ui-content { padding: 1.5rem; overflow-y: auto; flex: 1;}

/* Widget Card - Generic styling */
.widget-card { background: var(--card-bg); border-radius: 12px; box-shadow: var(--shadow-subtle); border: 1px solid var(--border-color); padding: 1.2rem; display: flex; flex-direction: column;}
.widget-card h3 { font-size: 0.95rem; color: var(--text-dark); margin-bottom: 1rem; font-weight: 700; border-bottom: 2px solid var(--light-maroon); padding-bottom: 0.5rem;}


/* --- Global Chronicle Specifics --- */
.dense-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem;}
.main-column { display: flex; flex-direction: column; gap: 1.5rem;}
.side-column { display: flex; flex-direction: column; gap: 1.5rem;}

.hero-section { border-radius: 12px; overflow: hidden; position: relative; height: 260px; box-shadow: var(--shadow-subtle); border: 1px solid var(--border-color);}
.hero-img { width: 100%; height: 100%; position: relative;}
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-text { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.5rem; background: linear-gradient(transparent, rgba(128, 0, 0, 0.9)); color: white;}
.cat-tag { background: var(--gold); color: var(--primary-maroon); padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; margin-bottom: 0.5rem; display: inline-block;}
.hero-text h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.4rem; line-height: 1.2; color: #fff;}
.hero-text p { font-size: 0.85rem; color: var(--light-gold); }

.headline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;}
.news-card { background: var(--card-bg); padding: 1rem; border-radius: 12px; box-shadow: var(--shadow-subtle); border: 1px solid var(--border-color); display: flex; gap: 1rem; align-items: flex-start;}
.n-img { width: 60px; height: 60px; border-radius: 8px; flex-shrink: 0; object-fit: cover;}
.gray-bg { background: var(--light-maroon); }
.news-card h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.3rem; line-height: 1.3; color: var(--text-dark);}
.news-card span { font-size: 0.75rem; color: var(--primary-maroon); font-weight: 600;}

.opinion ul { list-style: none; display: flex; flex-direction: column; gap: 1rem;}
.opinion li b { font-size: 0.85rem; color: var(--primary-maroon); display: block; margin-bottom: 0.2rem;}
.opinion li p { font-size: 0.85rem; color: var(--text-dark); line-height: 1.4; font-weight: 500;}

.trending ol { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.8rem; font-size: 0.85rem; font-weight: 600; color: var(--text-dark);}
.trending li::marker { color: var(--gold); font-weight: 800; }



/* --- FINANCIAL LEDGER (PREMIUM LIGHT MODE GLASS) --- */
/* The user wanted the same dense layout but with the new color palette (white, maroon, gold) */
.ledger-theme {
    background: #f9fafb;
}
.ledger-topbar {
    background: rgba(255, 255, 255, 0.98);
}
.ledger-ticker-strip {
    display: flex; align-items: center; gap: 1.5rem; background: #ffffff; color: var(--text-dark); padding: 0.6rem 1.5rem; font-size: 0.8rem; border-bottom: 1px solid var(--border-color); overflow: hidden; box-shadow: var(--shadow-subtle);
}
.ledger-ticker-strip span { display: flex; gap: 0.5rem; align-items: center; white-space: nowrap;}
.ledger-ticker-strip b { color: var(--primary-maroon); }

/* In a maroon/gold theme, Gold = Gains, Maroon = Losses */
.trend-up { color: var(--gold); font-weight: 700;}
.trend-down { color: var(--primary-maroon); font-weight: 700;}

.ledger-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.l-col-main { display: flex; flex-direction: column; gap: 1.5rem; }
.l-col-side { display: flex; flex-direction: column; gap: 1.5rem; }

/* Light Glass Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,1);
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03), inset 0 1px 0 rgba(255,255,255,0.8);
    display: flex; flex-direction: column;
}
.glass-card .card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; border-bottom: 2px solid var(--light-gold); padding-bottom: 0.8rem;}
.glass-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-dark); margin: 0; border: none; padding: 0;}
.glass-card a { color: var(--primary-maroon); text-decoration: none; font-size: 0.8rem; font-weight: 600;}

/* Main Chart */
.chart-card { padding: 1.5rem; }
.chart-card .card-head h2 { font-size: 2rem; font-weight: 800; margin-top: 0.3rem;}
.chart-card .card-head h2 span { font-size: 1rem; font-weight: 600; margin-left: 0.5rem;}
.chart-tabs { display: flex; gap: 0.5rem; background: var(--light-maroon); padding: 0.2rem; border-radius: 6px;}
.chart-tabs span { font-size: 0.75rem; font-weight: 600; padding: 0.3rem 0.6rem; border-radius: 4px; cursor: pointer; color: var(--primary-maroon);}
.chart-tabs span.active { background: white; color: var(--primary-maroon); box-shadow: var(--shadow-subtle);}

.chart-area { width: 100%; height: 200px; margin: 1rem 0; position: relative;}
.neon-chart { width: 100%; height: 100%; }
.grid-line { stroke: var(--border-color); stroke-width: 1; }
.chart-stroke { stroke: var(--gold); stroke-width: 3; }
.chart-fill { fill: rgba(212, 175, 55, 0.1); }

.chart-stats { display: flex; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--border-color);}
.chart-stats .stat { display: flex; flex-direction: column; gap: 0.2rem;}
.chart-stats .stat span { font-size: 0.75rem; color: var(--text-muted); font-weight: 600;}
.chart-stats .stat b { font-size: 0.95rem; color: var(--text-dark);}

/* Financial News */
.news-card-list { flex: 1; }
.fn-list { display: flex; flex-direction: column; gap: 1.2rem; }
.fn-item { display: flex; gap: 1rem; }
.fn-item .time { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; min-width: 60px;}
.fn-text h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.3rem; color: var(--text-dark);}
.fn-text p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 0.5rem;}
.tags { display: flex; gap: 0.5rem; }
.tag { background: var(--light-gold); color: var(--gold); padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.65rem; font-weight: 700; border: 1px solid rgba(212, 175, 55, 0.3);}

/* Side Column Cards */
.icon-btn { background: var(--light-maroon); border: none; color: var(--primary-maroon); width: 24px; height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 800;}
.wl-item { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--border-color);}
.wl-item:last-child { border-bottom: none; padding-bottom: 0;}
.wl-sym { display: flex; flex-direction: column; gap: 0.1rem;}
.wl-sym b { font-size: 0.9rem; color: var(--text-dark);}
.wl-sym span { font-size: 0.75rem; color: var(--text-muted);}
.wl-price { display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem;}
.wl-price b { font-size: 0.9rem; color: var(--text-dark);}
.wl-price span { font-size: 0.75rem; font-weight: 600;}

.movers-row { display: flex; flex-direction: column; gap: 0.5rem;}
.mover { display: flex; justify-content: space-between; padding: 0.6rem 0.8rem; border-radius: 6px; background: var(--bg-page); border: 1px solid var(--border-color);}
.mover b { font-size: 0.85rem; color: var(--text-dark);}
.mover span { font-size: 0.85rem; font-weight: 700;}

.eco-calendar { flex: 1; }
.ec-item { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.8rem;}
.ec-time { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; width: 40px;}
.ec-desc { font-size: 0.85rem; color: var(--text-dark); display: flex; flex-direction: column; gap: 0.2rem; font-weight: 500;}
.impact { font-size: 0.65rem; padding: 0.2rem 0.4rem; border-radius: 3px; font-weight: 800; width: max-content;}
.impact.high { background: var(--light-maroon); color: var(--primary-maroon); border: 1px solid rgba(128,0,0,0.2);}
.impact.med { background: var(--light-gold); color: var(--gold); border: 1px solid rgba(212,175,55,0.2);}


/* --- Community Sentinel Specifics --- */
.submit-btn { background: var(--primary-maroon); color: white; border: none; padding: 0.5rem 1rem; border-radius: 6px; font-weight: 600; font-size: 0.85rem; cursor: pointer;}
#panel-community { height: 480px; }
.dense-comm { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 1.5rem; }
.comm-col { display: flex; flex-direction: column; gap: 1.5rem; }
.span-2 { grid-column: span 1; } 

.w-info { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem;}
.w-icon { font-size: 2.5rem; line-height: 1;}
.w-temp { display: flex; flex-direction: column;}
.w-temp b { font-size: 1.8rem; font-weight: 800; color: var(--primary-maroon); line-height: 1.1;}
.w-temp span { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; margin-top: 0.2rem;}
.w-forecast { display: flex; justify-content: space-between; border-top: 1px solid var(--border-color); padding-top: 0.8rem;}
.w-forecast div { display: flex; flex-direction: column; align-items: center; gap: 0.2rem;}
.w-forecast span { font-size: 0.7rem; color: var(--text-muted); font-weight: 600;}
.w-forecast b { font-size: 0.85rem; color: var(--text-dark);}

.cam-grid { display: flex; flex-direction: column; gap: 0.8rem;}
.cam { height: 80px; background: #e5e7eb; border-radius: 8px; display: flex; align-items: flex-end; padding: 0.5rem; font-size: 0.75rem; font-weight: 700; color: var(--text-dark); border: 1px solid var(--border-color);}

.local-news .ln-story { display: flex; gap: 1rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1.2rem;}
.local-news .ln-story:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0;}
.ln-img { width: 120px; height: 80px; background: var(--light-maroon); border-radius: 8px; flex-shrink: 0; object-fit: cover;}
.ln-text h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--text-dark);}
.ln-text p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4;}

.blotter ul { list-style: none; display: flex; flex-direction: column; gap: 0.8rem;}
.blotter li { font-size: 0.85rem; line-height: 1.4; color: var(--text-dark); font-weight: 500;}
.alert-tag { background: var(--primary-maroon); color: white; padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.65rem; font-weight: 800;}

.cal-list { display: flex; flex-direction: column; gap: 0.8rem;}
.c-item { display: flex; align-items: flex-start; gap: 0.8rem;}
.c-item b { background: var(--light-gold); color: var(--gold); padding: 0.4rem; border-radius: 6px; min-width: 32px; text-align: center; font-size: 0.85rem; border: 1px solid rgba(212,175,55,0.3);}
.c-item div { display: flex; flex-direction: column;}
.c-item span { font-size: 0.85rem; font-weight: 700; color: var(--text-dark);}
.c-item small { font-size: 0.75rem; color: var(--text-muted);}

.sports .score-card { background: var(--bg-page); padding: 0.8rem; border-radius: 8px; border: 1px solid var(--border-color); margin-bottom: 0.8rem;}
.team { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; margin-bottom: 0.4rem;}
.team span { color: var(--text-muted); font-weight: 600;}
.team b { font-size: 1rem; color: var(--text-dark);}
.final { display: block; text-align: center; font-size: 0.7rem; font-weight: 700; color: var(--gold); margin-top: 0.6rem; border-top: 1px solid var(--border-color); padding-top: 0.5rem; text-transform: uppercase;}


/* Tech Stack Footer */
.tech-footer {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    margin-top: auto;
}
.stack-logos {
    display: flex; justify-content: center; gap: 4rem;
}
.t-logo {
    display: flex; align-items: center; gap: 0.8rem; font-size: 0.95rem; font-weight: 600; color: var(--text-muted);
}
.t-logo span { font-size: 1.4rem; }
