:root {
    --bg-base: #080c2c;
    --bg-surface: rgba(10, 20, 58, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-primary: #093988;
    --border-accent: rgba(5, 130, 217, 0.35);
    --primary-accent: #0582D9;
    --signal-green: #23CE6B;
    --signal-red: #ff1b1c;
    --signal-amber: #eac435;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

html { 
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

#sp-main-body {padding: 20px 0px !important;}

.mono { font-family: 'JetBrains Mono', monospace; }
.heading-font { font-family: 'Syne', sans-serif; }

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* Fixed Header */
.header-fixed {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-base);
    transition: border-color 0.3s ease;
    width: 100%;
}
.header-fixed.is-scrolled {
    border-bottom-color: rgba(5, 130, 217, 0.3);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    font-family: 'Atkinson Hyperlegible', sans-serif;
    font-weight: 700;
    font-size: 28px;
    letter-spacing: -0.01em;
}
.brand-logo img {
    width: 32px;
    height: 32px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
}
.desktop-nav.is-visible {
    opacity: 1;
    visibility: visible;
}
.desktop-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}
.desktop-nav a:hover {
    color: var(--primary-accent);
}
.nav-btn-signin {
    background: linear-gradient(135deg, #093988, #0582D9);
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600 !important;
}

.mobile-hamburger {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-main);
}

/* Hero Section */
.hero-section {
    padding: 60px 0 80px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
}
.hero-headline {
    font-family: 'Atkinson Hyperlegible', sans-serif;
    font-size: clamp(32px, 4.5vw, 36px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}
.text-gradient {
    background: linear-gradient(135deg, #ffffff 40%, var(--primary-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subhead {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 540px;
}

/* Landing Search Bar */
.search-container {
    display: flex;
    gap: 8px;
    max-width: 460px;
    margin-bottom: 32px;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
}
.search-container input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    outline: none;
    text-transform: uppercase;
    width: 100%;
    min-width: 0;
}
.search-container input::placeholder {
    color: #475569;
    font-size: 13px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-primary {
    background: var(--primary-accent);
    color: #fff;
    border: none;
    padding: 0 20px;
    height: 40px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }

/* Jump Anchors */
.hero-anchors {
    display: flex;
    gap: 12px;
}
.anchor-pill {
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    background: rgba(9, 57, 136, 0.2);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    transition: all 0.2s ease;
}
.anchor-pill:hover {
    border-color: var(--primary-accent);
    color: #fff;
}

/* Hero Visual Frame */
.hero-visual-frame {
    position: relative;
    height: 450px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
}
.hero-img {
    width: 100%;
    height: 100%;
    background-image: url("/img/ainedata.gif");
    background-repeat: no-repeat;
    background-position: 50% 50%;
    position: relative;
    -webkit-mask-image: radial-gradient(circle at center, black 45%, transparent 72%);
    mask-image: radial-gradient(circle at center, black 45%, transparent 72%);
}
.hero-img-mask {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: radial-gradient(circle, transparent, transparent, transparent, transparent, transparent, transparent, transparent, #080c2c, #080c2c, #080c2c);
}

/* Market Outlook Area */
.market-outlook-wrap {
    margin: 20px 0 60px;
    padding: 0;
    background: none;
    border: none;
}
.outlook-text-summary {
    text-align: left;
    margin: 0 auto 28px;
}
#aimy-market-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 0;
    background: transparent;
    border: none;
}
.aimy-market-ind {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 46px !important;
    height: 46px !important;
    aspect-ratio: 1 / 1;
    border-radius: 50% !important;
    text-decoration: none !important;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    color: #ffffff !important;
    letter-spacing: -0.02em;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    flex-shrink: 0;
}
.aimy-market-ind:hover {
    transform: translateY(-4px) scale(1.12);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.pos { background-color: var(--signal-green) !important; color: #022b14 !important; }
.mid { background-color: var(--signal-amber) !important; color: #2e2300 !important; }
.neg { background-color: var(--signal-red) !important; color: #ffffff !important; }
.fff { background-color: #ffffff !important; color: #080c2c !important; }

.market-banner-caption {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 14px;
    letter-spacing: 0.02em;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}
.bento-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 28px;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}
.bento-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}
.bento-span-4 { grid-column: span 4; }
.bento-span-12 { grid-column: span 12; }

.bento-icon {
    width: 44px;
    height: 44px;
    background: rgba(5, 130, 217, 0.12);
    border: 1px solid rgba(5, 130, 217, 0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.bento-icon img { width: 24px; height: 24px; }
.bento-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.bento-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
}

.stats-bento-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}
.telemetry-stat {
    background: rgba(8, 12, 44, 0.65);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.telemetry-stat h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.telemetry-stat span {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

/* Terminal Windows */
.terminal-window {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    margin-bottom: 60px;
    overflow: hidden;
}
.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(6, 9, 30, 0.45);
}
.terminal-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
}
.terminal-body {
    padding: 24px;
}

/* Comparison Layout */
.compare-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    align-items: center;
}
.chart-inner-wrap {
    height: 280px;
    position: relative;
}
.chart-legend-top {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    justify-content: flex-end;
}
.legend-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}
.legend-indicator {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

/* Audit & Spotlight Layout */
.audit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 60px;
}
.spotlight-chart-wrapper {
    height: 445px !important;
    position: relative;
}
#aimy-purchase-log-area {
    height: 445px !important;
    position: relative;
    overflow-x: hidden;
    overflow-y: hidden;
}

/* Base Tables */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
th, td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
th {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}
#aimy-purchase-log-table td:first-child,
#aimy-purchase-log-table td:nth-child(3),
#aimy-purchase-log-table td:nth-child(5),
#aimy-purchase-log-table td:nth-child(6) {
    font-family: 'JetBrains Mono', monospace;
}
#aimy-eco-table-past td,
#aimy-eco-table-next td {
    white-space: normal !important;
    word-break: break-word;
    vertical-align: top;
    font-size: 13px;
    color: #cbd5e1;
}
#aimy-eco-table-past td:first-child,
#aimy-eco-table-next td:first-child {
    width: 32px;
    padding-top: 11px;
}

.log-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}
.log-pagination img {
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}
.log-pagination img:hover {
    opacity: 1;
    transform: scale(1.2);
}

.sonar-chart-container {
    height: 340px;
    position: relative;
    margin-left: -24px;
    margin-right: -24px;
    width: calc(100% + 48px);
}
#aimyChart {
    width: 100% !important;
    height: 300px !important;
    display: block;
}
#aimy-sonar-dates {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 0;
    font-size: 12px;
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: 40px 0 60px;
    margin-top: 80px;
    font-size: 13px;
    color: var(--text-muted);
}
.footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.footer-meta a {
    color: var(--primary-accent);
    text-decoration: none;
}
.disclaimer-text {
    font-size: 12px;
    line-height: 1.6;
    color: #475569;
}
.disclaimer-text a {
    color: #64748b;
}

/* Off-Canvas Navigation */
.aimy-offmenu-overlay {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 2000;
    top: 0;
    right: 0;
    background-color: rgba(7, 3, 17, 0.96);
    backdrop-filter: blur(12px);
    overflow-x: hidden;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border-glass);
}
.aimy-offmenu-overlay-content {
    position: relative;
    top: 40px;
    width: 100%;
    text-align: center;
}
.aimy-offmenu-overlay a {
    padding: 12px;
    text-decoration: none;
    font-size: 20px;
    color: #cbd5e1;
    display: block;
}
.aimy-offmenu-overlay a:hover { color: #fff; }
.aimy-offmenu-overlay .closebtn {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 32px;
    color: #fff;
    text-decoration: none;
}

.ta-l { text-align: left !important; }
.ta-c { text-align: center !important; }
.ta-r { text-align: right !important; }
.f1   { flex: 1; }

/* FAQ Styles */
.faq-header-hero {
    padding: 50px 0 40px;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}
.faq-header-hero h1 {
    font-family: 'Atkinson Hyperlegible', sans-serif;
    font-size: clamp(30px, 4vw, 38px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: #fff;
}
.faq-header-hero p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-muted);
}
.faq-accordion-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 960px;
    margin: 0 auto 60px;
}
.faq-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.faq-card:hover {
    border-color: var(--border-accent);
}
.faq-card details {
    width: 100%;
}
.faq-card summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    user-select: none;
}
.faq-card summary::-webkit-details-marker {
    display: none;
}
.faq-card summary .faq-chevron {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.faq-card details[open] summary .faq-chevron {
    transform: rotate(180deg);
    opacity: 1;
}
.faq-card details[open] summary {
    border-bottom: 1px solid var(--border-glass);
    background: rgba(6, 9, 30, 0.4);
}
.faq-body {
    padding: 22px 24px 26px;
    font-size: 15px;
    line-height: 1.7;
    color: #cbd5e1;
}
.faq-body p:not(:last-child) {
    margin-bottom: 14px;
}
.faq-color-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.04em;
    margin: 0 2px;
    vertical-align: middle;
    width: 80px;
    text-align: center;
}
.faq-color-badge.badge-blue { background-color: var(--primary-accent); color: #ffffff; }
.faq-color-badge.badge-green { background-color: var(--signal-green); color: #022b14; }
.faq-color-badge.badge-amber { background-color: var(--signal-amber); color: #2e2300; }
.faq-color-badge.badge-red { background-color: var(--signal-red); color: #ffffff; }
.faq-color-badge.badge-white { background-color: #ffffff; color: #080c2c; }

/* Responsive Grid Adjustments */
@media (max-width: 992px) {
    .hero-section {
        display: flex;
        flex-direction: column;
        gap: 32px;
        padding: 40px 0 60px;
    }
    .hero-section > div:first-child {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .hero-headline { margin-bottom: 20px; }
    .hero-subhead { text-align: left; margin: 0 0 24px; width: 100%; }
    .search-container { margin: 0 auto 24px; width: 100%; }
    .hero-anchors { justify-content: center; }
    .hero-visual-frame { height: 430px; width: 100%; }
    .bento-span-4, .bento-span-12 { grid-column: span 12; }
    .compare-grid { grid-template-columns: 1fr; }
    .audit-grid { grid-template-columns: 1fr; }
    .stats-bento-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-hamburger { display: block; }
    .container { padding: 0 16px; }

    #aimy-market-banner {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr);
        justify-items: center;
        row-gap: 16px;
        column-gap: 10px;
        max-width: 320px;
        margin: 0 auto;
    }
    .aimy-market-ind {
        width: 42px !important;
        height: 42px !important;
        font-size: 11px;
    }
    .hero-headline { font-size: 30px; }
    .hero-visual-frame { height: 430px; }
    #aimy-purchase-log-table th:nth-child(4),
    #aimy-purchase-log-table td:nth-child(4),
    #aimy-purchase-log-table th:nth-child(5),
    #aimy-purchase-log-table td:nth-child(5) {
        display: none !important;
    }
    #aimy-purchase-log-table th,
    #aimy-purchase-log-table td {
        padding: 9px 4px;
        font-size: 12px;
    }
    .spotlight-chart-wrapper { height: 300px !important; }
    #aimy-purchase-log-area { height: auto !important; min-height: auto !important; }
    .faq-header-hero { padding: 30px 0 24px; }
    .faq-card summary { padding: 16px 18px; font-size: 15px; }
    .faq-body { padding: 18px; font-size: 14px; }
}

/* ==========================================================================
   Research Module Styles (aimy-research.html / Joomla Sourcerer)
   ========================================================================== */

.research-content-wrapper {
    container-type: inline-size;
    width: 100%;
    margin: 0 auto;
}

/* Hidden by default until symbol search execution */
#aimy-research-results-area {
    display: none;
}

/* Mobile 3-way tab buttons hidden on initial load */
#research-mobile-controls,
#research-mobile-controls-x {
    display: none;
}

/* Full-width Search Bar */
.research-search-bar {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 10px 0 24px;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    box-sizing: border-box;
}

.research-search-bar input {
    flex: 1;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    color: #fff !important;
    padding: 8px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    outline: none;
    box-shadow: none !important;
    text-transform: uppercase;
    width: 100%;
    min-width: 0;
}

.research-search-bar input::placeholder {
    color: #475569;
    font-size: 13px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.research-search-bar .btn-primary {
    background-color: var(--primary-accent) !important;
    background: var(--primary-accent) !important;
    color: #ffffff !important;
}

.research-search-bar .btn-primary:hover {
    background-color: var(--primary-accent) !important;
    background: var(--primary-accent) !important;
    color: #ffffff !important;
    opacity: 0.9 !important;
}

.research-search-bar .btn-primary:active {
    background-color: var(--primary-accent) !important;
    background: var(--primary-accent) !important;
    color: #ffffff !important;
    transform: scale(0.98);
}

/* Segmented Mobile & Header Control Tabs */
.research-view-switcher {
    display: flex;
    gap: 8px;
    background: rgba(8, 12, 44, 0.6);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    margin-bottom: 20px;
}

.btn-panel-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-panel-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.btn-panel-tab.btn-primary-sel {
    background: var(--primary-accent);
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(5, 130, 217, 0.35);
}

/* Main Panels Layout */
.research-grid-wrap {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 24px;
    align-items: start;
}

.research-panel-left,
.research-panel-right,
.research-panel-extra {
    min-width: 0;
}

/* Shell & Headers */
.research-card-shell {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    overflow: hidden;
    margin-bottom: 24px;
}

.research-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 58px;
    height: 58px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(6, 9, 30, 0.45);
    box-sizing: border-box;
}

/* Strict Typography & Flex Constraints Across All Headers */
#aimy-symbol,
#aimy-symbol-analysis,
#aimy-symbol-thesis {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-family: 'Syne', sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
    color: #ffffff !important;
}

#aimy-symbol *,
#aimy-symbol-analysis *,
#aimy-symbol-thesis *,
.aimy-symbol-full {
    font-family: 'Syne', sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
}

/* Fixed container rules for the dual button tabs on desktop */
#aimy-research-d-buttons-ind {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: 176px !important;
    min-width: 176px !important;
    max-width: 176px !important;
    flex-shrink: 0 !important;
    margin: 0 0 0 12px !important;
    padding: 3px !important;
    box-sizing: border-box !important;
    background: rgba(8, 12, 44, 0.6);
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}

#aimy-research-d-buttons-thesis-area {
    display: inline-block !important;
    flex-shrink: 0 !important;
}

#aimy-research-d-buttons-ind .btn-panel-tab {
    flex: 1 1 50% !important;
    width: 50% !important;
    padding: 6px 0 !important;
    text-align: center !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

#aimy-range {
    display: flex;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
}

/* Height spacer for mobile headers without a date string */
.research-header-spacer {
    display: none;
}

.research-card-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
}

.research-card-body {
    padding: 20px;
}

/* Metrics Grid */
.symbol-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0 20px;
}

.metric-tile {
    background: rgba(8, 12, 44, 0.65);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 10px 12px;
}

.metric-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.metric-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

/* Time & Type Selector Chips */
.button-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.btn-chip {
    flex: 1;
    min-width: 44px;
    background: rgba(9, 57, 136, 0.15);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-chip:hover {
    border-color: var(--primary-accent);
    color: #fff;
}

.btn-chip.btn-primary-sel {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    color: #fff !important;
    box-shadow: 0 0 10px rgba(5, 130, 217, 0.35);
}

/* Chart Canvas Areas */
.symbol-chart-viewport {
    height: 300px;
    width: 100%;
    position: relative;
    margin-bottom: 4px;
}

.volume-chart-viewport {
    height: 90px;
    width: 100%;
    position: relative;
}

/* Overlays & Loading States */
.aimy-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 44, 0.75);
    backdrop-filter: blur(3px);
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.aimy-loading-overlay img {
    height: 52px;
    width: 52px;
}

.empty-terminal-state {
    padding: 0 20px;
    text-align: center;
    color: var(--text-muted);
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 360px;
    box-sizing: border-box;
}

#aimy-chart-loader,
#aimy-indicator-loader,
#aimy-thesis-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 360px;
}

.empty-terminal-state[style*="display: none"],
.empty-terminal-state[style*="display:none"],
#aimy-chart-loader[style*="display: none"],
#aimy-chart-loader[style*="display:none"],
#aimy-indicator-loader[style*="display: none"],
#aimy-indicator-loader[style*="display:none"],
#aimy-thesis-loader[style*="display: none"],
#aimy-thesis-loader[style*="display:none"] {
    display: none !important;
}

.empty-terminal-state img {
    display: block;
    margin: 0 auto 16px auto !important;
    width: 48px;
    height: 48px;
}

/* Multi-Column Layout for Basic Indicators */
#aimy-basic-indicators ul {
    column-count: 2 !important;
    column-gap: 24px !important;
    list-style-type: none;
    padding-left: 0;
    margin: 8px 0 16px 0;
}

#aimy-basic-indicators li {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-right: 12px;
}

/* Thesis & Narrative Styles */
.thesis-section-header {
    font-family: 'Syne', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-accent);
    margin: 22px 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.thesis-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-glass);
}

.aimy-thesis-text {
    line-height: 1.75;
    font-size: 14px;
    color: #cbd5e1;
}

.aimy-thesis-text ul {
    list-style-type: none;
    padding-left: 0;
    margin: 8px 0;
}

.aimy-thesis-text li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
    line-height: 1.6;
}

.aimy-thesis-text li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--primary-accent);
}

/* Trade Log Table */
#aimy-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 12px;
}

#aimy-log-table th {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-glass);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

#aimy-log-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #cbd5e1;
}

/* Mobile Layout Overrides */
@media screen and (max-width: 900px) {
    .research-grid-wrap {
        display: block;
    }
    .symbol-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .research-panel-left,
    .research-panel-right,
    .research-panel-extra {
        width: 100% !important;
    }

    /* Hide the in-card toggle buttons on mobile */
    #aimy-research-d-buttons-ind,
    #aimy-research-d-buttons-thesis-area {
        display: none !important;
    }

    /* Mobile header structure with identical height across all tabs */
    .research-card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding-top: 14px !important;
        padding-bottom: 10px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        min-height: 68px !important;
        height: 68px !important;
        gap: 3px !important;
        box-sizing: border-box !important;
    }

    #aimy-symbol,
    #aimy-symbol-analysis,
    #aimy-symbol-thesis {
        width: 100% !important;
        font-size: 16px !important;
        line-height: 1.25 !important;
    }

    #aimy-symbol *,
    #aimy-symbol-analysis *,
    #aimy-symbol-thesis *,
    .aimy-symbol-full {
        font-size: 16px !important;
        line-height: 1.25 !important;
    }

    #aimy-range {
        font-size: 11px !important;
        color: var(--text-muted) !important;
        padding-left: 39px !important;
        width: 100% !important;
        line-height: 1.2 !important;
        height: 14px !important;
    }

    /* Empty spacer occupying the same exact height as #aimy-range on mobile */
    .research-header-spacer {
        display: block !important;
        height: 14px !important;
        width: 100% !important;
    }
}