/* ============================================
   Daily Market Briefing — Glassmorphism Design System
   Light gradient background, frosted glass cards, calm modern aesthetic
   ============================================ */

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #e8f5f3 0%, #eef3f9 50%, #f5f0f8 100%);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: #0A8F8A; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Sidebar (Frosted Glass) ---- */
nav.sidebar {
    position: fixed; left: 0; top: 0;
    width: 200px; height: 100vh;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255,255,255,0.5);
    padding: 28px 0 20px;
    overflow-y: auto; z-index: 1000;
    font-size: 13px;
}
nav.sidebar .nav-title {
    padding: 0 20px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.3px;
}
nav.sidebar .nav-section {
    font-size: 10px;
    color: #bbb;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 20px 20px 6px;
}
nav.sidebar a {
    display: block;
    padding: 7px 20px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    border-left: 2px solid transparent;
    transition: all 0.15s;
}
nav.sidebar a:hover {
    color: #111;
    background: rgba(255,255,255,0.4);
}
nav.sidebar a.active,
nav.sidebar a.page-active {
    color: #0A8F8A;
    font-weight: 600;
    border-left-color: #0A8F8A;
    background: rgba(10,143,138,0.1);
}

/* ---- Main ---- */
main { margin-left: 200px; }

/* ---- Hero / Date Header ---- */
.hero {
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 12px 48px;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 16px;
}
.hero h1 {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.hero .date {
    font-size: 13px;
    color: #0A8F8A;
    font-weight: 600;
    white-space: nowrap;
}
.hero .confidential {
    font-size: 10px;
    color: #ccc;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-left: auto;
}

/* ---- Section Dividers ---- */
.section-divider {
    padding: 32px 48px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.5);
}
.section-divider .section-num {
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #0A8F8A;
    font-weight: 600;
    margin-bottom: 4px;
}
.section-divider h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: #111;
    letter-spacing: -0.3px;
}
.section-divider .subtitle {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* ---- Content ---- */
.content {
    max-width: 1080px;
    margin: 0 auto;
    padding: 36px 48px;
}
.content h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: #111;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.5);
}
.content h3:first-child { margin-top: 0; }
.content h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 24px 0 12px;
}
.content p {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 16px;
}

/* ---- Cards (Frosted Glass) ---- */
.theme-box,
.section-description,
.philosophy-intro,
.synthesis-section,
.dominant-theme {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.5);
    border-left: 3px solid #0A8F8A;
    padding: 20px 24px;
    margin-bottom: 24px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.theme-box:hover,
.section-description:hover,
.philosophy-intro:hover,
.synthesis-section:hover,
.dominant-theme:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.theme-box h3,
.dominant-theme h3,
.dominant-theme h4 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: #0A8F8A;
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
}

.theme-box p,
.dominant-theme p { font-size: 14px; line-height: 1.65; color: #444; margin: 0; }

/* ---- Tables (Clean, Frosted) ---- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 13px;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

table thead th {
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: transparent;
    white-space: nowrap;
}

table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    color: #333;
    vertical-align: top;
}

table tbody td:first-child {
    font-weight: 600;
    color: #111;
}

table tbody tr:hover {
    background: rgba(10,143,138,0.05);
}

.table-scroll { overflow-x: auto; margin: 16px 0 24px; }
.table-scroll table { margin: 0; }
.small-table { font-size: 12px; }
.small-table thead th { font-size: 10px; padding: 8px 10px; }
.small-table tbody td { padding: 8px 10px; font-size: 12px; }

/* ---- Status Colors ---- */
.pos { color: #16a34a; font-weight: 600; }
.neg { color: #dc2626; font-weight: 600; }

/* ---- Tags ---- */
.tag {
    display: inline-block; padding: 2px 8px; border-radius: 3px;
    font-size: 10px; font-weight: 600; margin-right: 3px;
}
.tag { background: rgba(16,185,129,0.1); color: #059669; }
.tag.macro { background: rgba(194,65,12,0.1); color: #c2410c; }
.tag.tech { background: rgba(16,185,129,0.1); color: #059669; }
.tag.energy { background: rgba(234,88,12,0.1); color: #ea580c; }
.tag.geo { background: rgba(185,28,28,0.1); color: #b91c1c; }
.tag.fx { background: rgba(124,58,237,0.1); color: #7c3aed; }

.headline-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}
.headline-tag-tech { background: rgba(16,185,129,0.1); color: #059669; }
.headline-tag-ai { background: rgba(37,99,235,0.1); color: #2563eb; }
.headline-tag-energy { background: rgba(234,88,12,0.1); color: #ea580c; }
.headline-tag-macro { background: rgba(124,58,237,0.1); color: #7c3aed; }
.headline-tag-geo { background: rgba(185,28,28,0.1); color: #dc2626; }
.headline-tag-fx { background: rgba(219,39,119,0.1); color: #db2777; }

/* ---- Charts ---- */
.chart-container { margin: 28px 0; position: relative; height: 400px; }
.chart-container canvas { max-width: 100%; height: 100%; }
.chart-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 28px 0; }
.chart-grid-item { position: relative; height: 300px; }
.chart-grid-item canvas { max-width: 100%; height: 100%; }
.chart-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 28px 0; }
.chart-grid-2-item { position: relative; height: 300px; }

/* ---- Range Buttons ---- */
.range-btns { display: flex; gap: 4px; margin-bottom: 12px; }
.range-btns button {
    font-size: 11px;
    padding: 4px 12px;
    border: 1px solid rgba(10,143,138,0.3);
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(8px);
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.15s;
}
.range-btns button:hover {
    border-color: #0A8F8A;
    color: #0A8F8A;
    background: rgba(10,143,138,0.1);
}
.range-btns button.active {
    background: #0A8F8A;
    color: #fff;
    border-color: #0A8F8A;
}

/* ---- Live Ticker (Frosted Glass) ---- */
.ticker-container {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.5);
    color: #333;
    padding: 24px;
    border-radius: 10px;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.ticker-header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px; font-size: 14px; font-weight: 600; color: #0A8F8A;
}
.live-dot { width: 6px; height: 6px; background: #ef4444; border-radius: 50%; animation: blink 1.5s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.ticker-item {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
}
.ticker-item:last-child { border-bottom: none; }
.ticker-time { font-size: 12px; color: #0A8F8A; min-width: 70px; font-weight: 600; }
.ticker-content { flex: 1; padding: 0 16px; font-size: 13px; line-height: 1.5; color: #555; }
.ticker-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; min-width: 120px; }

/* ---- Live Ticker (Old styles for compatibility) ---- */
.live-ticker-container {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.5);
    margin: 24px 0;
    border-radius: 10px;
    overflow: hidden;
}
.live-ticker-header {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    color: #0A8F8A;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.live-ticker-header .live-dot {
    width: 6px; height: 6px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:0.3 } }
.live-ticker-body { max-height: 300px; overflow-y: auto; }

/* ---- Commentary Cards (Frosted Glass) ---- */
.commentary {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px; margin: 24px 0;
}
.commentary-card {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.5);
    border-left: 3px solid #0A8F8A;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}
.commentary-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.commentary-author {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px; font-weight: 600; color: #111; margin-bottom: 4px;
}
.commentary-role { font-size: 12px; color: #999; margin-bottom: 12px; }
.commentary-quote { font-style: italic; line-height: 1.6; color: #555; font-size: 13px; margin: 0; }

/* ---- Social Feed ---- */
.social-feed {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.5);
    margin: 24px 0;
    border-radius: 10px;
    overflow: hidden;
}
.social-feed-header {
    background: rgba(0,0,0,0.02);
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.social-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    font-size: 13px;
}
.social-item:last-child { border-bottom: none; }
.social-author { font-weight: 600; color: #111; }
.social-handle { color: #0A8F8A; font-size: 12px; }
.social-text { color: #555; margin-top: 4px; line-height: 1.5; }
.social-meta { color: #bbb; font-size: 11px; margin-top: 4px; }

/* ---- Section ---- */
section {
    padding: 40px 0;
    border-bottom: 1px solid rgba(255,255,255,0.5);
}
section:last-of-type { border-bottom: none; }
section h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #111;
    margin: 0 0 20px;
    letter-spacing: -0.3px;
}

/* ---- Misc ---- */
.source-note { font-size: 11px; color: #999; font-style: italic; margin: 8px 0 20px; }
.pub-freq { font-size: 10px; color: #999; font-style: italic; }
.rank-col { text-align: center; color: #0A8F8A; font-weight: 600; }

/* ---- Spec Box (Frosted Glass) ---- */
.spec-box {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.spec-box h4 { color: #0A8F8A; margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.spec-item {
    background: rgba(255,255,255,0.5);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #0A8F8A;
}
.spec-item .spec-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; color: #999; }
.spec-item .spec-value { font-size: 14px; font-weight: 600; color: #111; margin-top: 2px; }

/* ---- Book / Philosophy Cards (Frosted Glass) ---- */
.book-card {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 10px;
    padding: 28px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.book-card h3 { border-bottom: 2px solid #0A8F8A; color: #111; margin-top: 0; }
.book-meta { font-size: 13px; color: #999; margin-bottom: 14px; }
.principle-list { counter-reset: principle; }
.principle-item {
    padding: 12px 0 12px 40px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    position: relative;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}
.principle-item:last-child { border-bottom: none; }
.principle-item::before {
    counter-increment: principle;
    content: counter(principle);
    position: absolute; left: 0; top: 12px;
    background: #0A8F8A; color: #fff;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
}
blockquote.philosophy-quote {
    border-left: 3px solid #0A8F8A;
    padding: 12px 20px;
    margin: 16px 0;
    background: rgba(10,143,138,0.05);
    font-style: italic;
    color: #666;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    line-height: 1.6;
}

/* ---- Wealth Grid ---- */
.wealth-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 20px 0; }

/* ---- Footer ---- */
footer {
    padding: 32px 48px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.5);
    margin-top: 48px;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
}
footer .confidential { font-size: 11px; color: #ccc; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
footer p { font-size: 13px; color: #999; margin: 6px 0; }
footer .sources { font-size: 11px; color: #aaa; margin-top: 12px; }

/* ---- Mobile ---- */
.hamburger {
    display: none;
    position: fixed; top: 12px; left: 12px; z-index: 1001;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.5);
    color: #333;
    padding: 6px 10px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

@media (max-width: 1024px) {
    nav.sidebar { width: 180px; }
    main { margin-left: 180px; }
    .hero, .section-divider { padding-left: 36px; padding-right: 36px; }
    .content { padding: 28px 36px; }
    .chart-grid { grid-template-columns: repeat(2, 1fr); }
    .chart-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    nav.sidebar { width: 0; transform: translateX(-100%); transition: transform 0.3s; }
    nav.sidebar.open { transform: translateX(0); width: 200px; box-shadow: 4px 0 20px rgba(0,0,0,0.08); }
    .hamburger { display: block; }
    main { margin-left: 0; }
    .hero, .section-divider { padding: 28px 20px; }
    .content { padding: 24px 20px; }
    .chart-grid { grid-template-columns: 1fr; }
    .wealth-grid { grid-template-columns: 1fr; }
    .commentary { grid-template-columns: 1fr; }
}
