:root {
    --surface-0: #ffffff;
    --surface-1: #ffffff;
    --surface-2: #ffffff;
    --table-row-odd: #edeff8;
    /* etc… */
}

/*─────────────────────────────*/
/*          Base Styles        */
/*─────────────────────────────*/
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Source Serif Pro', Georgia, 'Times New Roman', serif;
    background: var(--surface-0);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: hidden;
    touch-action: pan-y;
    overscroll-behavior-x: none;
    max-width: 100%;
}

body {
    padding-top: 60px;
    /* default top padding */
}

body.sticky-header {
    padding-top: 100px;
    /* when header sticks */
}

ol li, ul li {
    margin-top: 10px;
}

/*─────────────────────────────*/
/*        Headings & Titles    */
/*─────────────────────────────*/
h1, .article-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    line-height: 1.2;
}

.brand-title {
    font-size: 2.25rem;
    font-weight: 600;
    color: white;
    margin: 0;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    transition: all 0.3s ease;
}

.brand-tagline {
    font-style: italic;
    font-size: 11pt;
    color: rgba(255,255,255,0.85);
    margin: 0.25rem 0 0;
    font-family: 'Source Serif Pro', Georgia, 'Times New Roman', serif;
    transition: all 0.3s ease;
}

.sticky .brand-title {
    font-size: 1.75rem;
}

.sticky .brand-tagline {
    font-size: 10pt;
}

/*─────────────────────────────*/
/*            Main             */
/*─────────────────────────────*/
main {
    padding-top: 10px;
}

/*─────────────────────────────*/
/*    Container & Content      */
/*─────────────────────────────*/
.research-container {
    background: var(--surface-0);
    min-height: 80vh;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
}

.research-content {
    padding: 2rem 1.5rem;
    line-height: 1.6;
}

/*
  Research Article Content
*/
#articleBody {
    h3 {
        margin-top: 20px;
        margin-bottom: 20px;
    }

    ol li, ul li {
        margin-top: 20px !important;
    }

    font-size: 18px;
    del {
        display: none;
    }
}

    #researchTabsContent {
        height: calc(100vh - 200px);
        overflow-y: scroll;
        overflow-x: scroll;
    }

    .tab-pane {
        height: 100%;
    }


    /* Desktop scrolling */
    .research-container {
        height: 100vh;
        overflow: hidden;
    }



.loading-state, .error-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

/*─────────────────────────────*/
/*     Banner / Header         */
/*─────────────────────────────*/
.research-banner {
    background: linear-gradient(to bottom, #0a1c3a 0%, #030b1f 100%);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
    padding-top: 10px;
    padding-bottom: 10px;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1000;
}

.research-banner.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 5px 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/*─────────────────────────────*/
/*    Logo & Branding Swap     */
/*─────────────────────────────*/
.brand-container {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.brand-container {
    flex-direction: column;
    margin: 0 auto 0 50px;
}

.site-logo, .site-logo-small, .site-logo-mobile {
    margin-right: 15px;
    transition: all 0.3s ease;
}

.site-logo {
    height: 140px;
}

.site-logo-small {
    height: 80px;
}

.site-logo-mobile {
    height: 40px;
}

.sticky .site-logo {
    display: none !important;
}

.sticky .site-logo-small {
    display: block !important;
}

/* Hide logo-container in mobile mode */
@media (max-width: 768px) {
    .logo-container {
        display: none !important;
    }
}

/*─────────────────────────────*/
/*      Navbar Toggler         */
/*─────────────────────────────*/
.navbar-toggler {
    padding: 0.5rem;
    font-size: 1.25rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    color: white;
    cursor: pointer;
}

.navbar-toggler:hover {
    background-color: rgba(255,255,255,0.1);
}

/*─────────────────────────────*/
/*      Hidden Toolbar         */
/*─────────────────────────────*/
.research-toolbar {
    display: none;
    /* intentionally hidden */
    background: var(--surface-1);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
    justify-content: space-between;
    align-items: center;
}

.toolbar-actions {
    display: flex;
    gap: 1rem;
}

.toolbar-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: 1.1rem;
}

.toolbar-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

/*─────────────────────────────*/
/*        Sidebar Nav          */
/*─────────────────────────────*/
.sidebar {
    background-color: #fff;
    border-right: 1px solid rgba(0,0,0,0.1);
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.sidebar-nav {
    padding: 0 1.5rem;
}

.sidebar-heading {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1.2rem;
    margin: 1rem 0;
    color: #0a1c3a;
}

.sidebar-divider {
    height: 1px;
    background-color: rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.sidebar-nav .nav-link {
    color: #333;
    font-family: 'Source Serif Pro', Georgia, 'Times New Roman', serif;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sidebar-nav .nav-link:hover {
    background-color: rgba(10,28,58,0.1);
}

.sidebar-nav .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-nav .nav-item {
    margin-bottom: 5px;
}

.recent-articles .nav-link {
    font-size: 1.1rem;
    padding-left: 0.5rem;
    border-left: 2px solid transparent;
}

.recent-articles .nav-link:hover {
    border-left: 2px solid #0a1c3a;
}

.article-date {
    display: block;
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/*─────────────────────────────*/
/*           Tabs              */
/*─────────────────────────────*/
#researchTabs {
    padding: 0 1.5rem;
    margin-top: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.nav-tabs .nav-link {
    color: var(--text-primary);
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-color: rgba(10,28,58,0.3);
}

.nav-tabs .nav-link.active {
    color: #0a1c3a;
    border-bottom: 3px solid #0a1c3a;
    font-weight: 600;
    background: transparent;
}

#researchTabsContent {
    padding: 0;
}

/*─────────────────────────────*/
/*           Charts            */
/*─────────────────────────────*/
.chart-container {
    padding: 0 1rem;
}

.chart-area {
    min-height: 400px;
    margin-top: 1.5rem;
    background-color: var(--surface-1);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.chart-loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 300px;
    color: #666;
    font-size: 1.2rem;
    text-align: center;
}

/*─────────────────────────────*/
/*         Share Modal         */
/*─────────────────────────────*/
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.share-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.share-modal-content {
    position: relative;
    background: var(--surface-1);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90vw;
    padding: 1.5rem;
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.share-modal-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.share-modal-close:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.share-form-group {
    margin-bottom: 1rem;
}

.share-form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.share-form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition);
}

.share-form-input:focus {
    border-color: var(--accent);
}

.share-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.share-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition);
}

.share-btn-primary {
    background: var(--accent);
    color: white;
}

.share-btn-primary:hover {
    opacity: 0.9;
}

.share-btn-secondary {
    background: var(--surface-2);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.share-btn-secondary:hover {
    background: var(--hover-bg);
}

.share-success {
    color: #28a745;
    margin-top: 1rem;
    text-align: center;
}

.share-error {
    color: #dc3545;
    margin-top: 1rem;
    text-align: center;
}

/*─────────────────────────────*/
/*        Footer Styles        */
/*─────────────────────────────*/
.research-footer {
    position: fixed;
    bottom: 0;
    z-index: 1002;
    width: 100%;
    height: 26px;
    margin-top: 14px;
    background: var(--surface-1);
    border-top: 1px solid var(--border-light);
    padding: 0.3rem 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.research-footer a {
    color: var(--accent);
    text-decoration: none;
}

.research-footer a:hover {
    text-decoration: underline;
}

table tbody tr:nth-child(odd) td {
    background-color: #e1e4f5;
}

table {
    border: 1px solid silver;
}

/*─────────────────────────────*/
/*       Responsive Rules      */
/*─────────────────────────────*/
@media (max-width: 768px) {
    /* Banner mobile override */ .research-banner {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 8px 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }

#researchTabs {
    margin-top: 0rem;
}    

    body {
        padding-top: 0;
        /* override default */
    }

    /* Logo visibility */
    .site-logo, .site-logo-small {
        display: none !important;
    }

    .site-logo-mobile {
        display: block !important;
        height: 36px;
    }

    /* Branding text */
    .brand-title {
        font-size: 1.5rem;
        margin-top: 0.5rem;
    }

    .brand-container {
        display: none !important;
    }

    .brand-tagline {
        font-size: 9pt;
    }

    .banner-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar-actions {
        align-self: flex-end;
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
    }

    /* Layout adjustments */
    .research-container {
        width: 100vw;
        max-width: 100vw;
        padding: 0;
        margin: 0;
    }

    .research-content {
        padding: 1rem;
        width: 100%;
    }

    .col-md-9 {
        width: 100%;
    }

    .sidebar-nav {
        overflow-y: scroll;
    }

}


@media (min-width: 769px) {
    /* Hide mobile logo on desktop */ .logo-container {
        display: flex !important;
    }



}

.symbol-link {
    cursor: pointer;
}

