/**
 * ==========================================================================
 * DIY WEALTH BRANDKIT & DESIGN SYSTEM
 * Minimalist Fintech UI inspired by Koyfin, Robinhood & Trading 212
 * Target Demographic: Tech Audience aged 20-40 (high data density, sleek dark/light,
 * crystal-clear metrics, zero clutter, tabular figures, seamless responsive UX)
 * ==========================================================================
 */

:root {
    /* High-Visibility Action & Conversion Palette */
    --brand-action: #FF4F00;
    --brand-action-hover: #E04500;
    --brand-action-light: rgba(255, 79, 0, 0.08);
    --brand-action-glow: rgba(255, 79, 0, 0.25);

    /* Brand Core Palette - Extracted from Logo */
    --brand-navy: #0A192F;
    --brand-navy-deep: #060D17;
    --brand-blue: #2563EB;
    --brand-blue-hover: #1D4ED8;
    --brand-blue-glow: rgba(37, 99, 235, 0.25);
    
    /* Vibrant Cyan / Teal from Logo */
    --brand-cyan: #00D2B4;
    --brand-cyan-light: #26E6CB;
    --brand-cyan-glow: rgba(0, 210, 180, 0.22);
    
    /* Dynamic Growth Green (Robinhood / Trading 212 green & Logo arrow) */
    --brand-green: #00C805;
    --brand-green-hover: #00B304;
    --brand-green-subtle: rgba(0, 200, 5, 0.12);
    --brand-green-glow: rgba(0, 200, 5, 0.25);
    
    /* Down / Red */
    --brand-red: #FF3B30;
    --brand-red-subtle: rgba(255, 59, 48, 0.12);
    --brand-red-glow: rgba(255, 59, 48, 0.25);
    
    /* Gradients */
    --brand-gradient: linear-gradient(135deg, #0A192F 0%, #00B4D8 50%, #00C805 100%);
    --brand-gradient-green: linear-gradient(135deg, #00C805 0%, #00E396 100%);
    --brand-gradient-teal: linear-gradient(135deg, #00D2B4 0%, #2563EB 100%);
    --brand-gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);

    /* Typography - Option B: Financial Editorial Authority (WSJ / Morningstar Magazine Style) */
    --font-heading: 'Newsreader', Georgia, 'Times New Roman', serif;
    --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;

    /* Micro-elevations */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-full: 9999px;
    
    --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 12px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 10px 25px -3px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.06);
    --shadow-glow-green: 0 0 20px rgba(0, 200, 5, 0.25);
    --shadow-glow-blue: 0 0 20px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   DEFAULT: KOYFIN / ROBINHOOD OBSIDIAN DARK THEME
   ========================================================================== */
:root, [data-theme="dark"] {
    color-scheme: dark;
    --bg-main: #0B0E14;
    --bg-card: #131823;
    --bg-card-hover: #1A2232;
    --bg-surface: #182030;
    --bg-glass: rgba(19, 24, 35, 0.85);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.16);
    --border-accent: rgba(0, 200, 5, 0.4);
    
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --positive-text: #22C55E;
    --negative-text: #F87171;
    --warning-text: #FBBF24;

    --accent-blue: #3B82F6;
    --accent-indigo: #6366F1;
    --accent-teal: #00D2B4;
    --accent-green: #00C805;
    --accent-purple: #8B5CF6;

    --card-bg: var(--bg-card);
    --text-main: var(--text-primary);
}

/* ==========================================================================
   CLEAN LIGHT THEME (Crisp Modern Fintech)
   ========================================================================== */
[data-theme="light"] {
    color-scheme: light;
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F1F5F9;
    --bg-surface: #F8FAFC;
    --bg-glass: rgba(255, 255, 255, 0.92);
    
    --border-color: #E2E8F0;
    --border-color-hover: #CBD5E1;
    --border-accent: rgba(4, 120, 87, 0.45);
    
    --text-primary: #1A1A1A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    
    /* WCAG 2.2 AA >= 4.5:1 contrast on white & slate-50 (brand-kit.md §3) */
    --positive-text: #047857;
    --negative-text: #B91C1C;
    --warning-text: #B45309;

    --accent-action: var(--brand-action);
    --accent-blue: #2563EB;
    --accent-indigo: #4F46E5;
    --accent-teal: #00A896;
    --accent-green: #047857;
    --accent-purple: #7C3AED;

    --card-bg: var(--bg-card);
    --text-main: var(--text-primary);
}

/* ==========================================================================
   GLOBAL VIEWPORT & RESPONSIVE ESSENTIALS
   Eliminating ALL horizontal scrollbars on mobile, tablet, desktop and TV
   ========================================================================== */
html {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Universal Page & Workspace Containers */
main,
.container,
.page-container,
.calc-container,
.port-container,
.admin-container,
.dashboard-body,
.directory-container,
.stock-app-container,
.sub-container,
.etf-container,
.stocks-container,
.funds-container,
.workspace-container,
.workspace-layout {
    width: 100% !important;
    max-width: 1360px;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

img, svg, video, canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive ladder root scaling & TV D-Pad Focus */
@media (min-width: 1600px) {
    :root { font-size: 17.5px; }
}
@media (min-width: 2200px) {
    :root { font-size: 19px; }
}
@media (min-width: 3000px) {
    :root { font-size: 26px; }
}

:focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Tabular Financial Numbers */
.num-tabular,
.metric-val,
.stat-val,
.fin-num,
.ret-val {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
}

/* Positive / Negative Financial Pills (WCAG 2.2 AA contrast + directional cues) */
.badge-up, .fin-pos {
    color: var(--positive-text);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-down, .fin-neg {
    color: var(--negative-text);
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.28);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Native form control brand consistency */
input[type="checkbox"],
input[type="radio"],
input[type="range"],
progress {
    accent-color: var(--accent-blue);
}

@supports not (accent-color: #2563EB) {
    input[type="checkbox"]:checked,
    input[type="radio"]:checked {
        outline: 2px solid var(--accent-blue);
    }
}

/* ==========================================================================
   BRAND LOGO COMPONENT
   ========================================================================== */
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand-link:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.brand-logo-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.brand-name-group {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--text-primary);
}

.brand-title span {
    color: var(--brand-green);
}

.brand-tagline {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--brand-cyan);
}

/* ==========================================================================
   UNIFIED HEADER & NAVBAR (Robinhood / Koyfin Sleek Tech Style)
   ========================================================================== */
.main-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background-color: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: all 0.25s ease;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.top-nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.top-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}

.top-nav-item:hover {
    color: var(--text-primary);
    background-color: var(--bg-card-hover);
    border-color: var(--border-color);
}

.top-nav-item.active {
    color: var(--text-primary);
    background-color: var(--bg-card-hover);
    border-color: var(--border-color);
    font-weight: 600;
    box-shadow: var(--shadow-subtle);
}

.top-nav-item.active::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--brand-green);
    margin-left: 2px;
}

/* Navbar Dropdowns */
.nav-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.nav-dropdown-wrapper:hover > .nav-dropdown-content {
    display: block !important;
}

.dropdown-link-item {
    display: block;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-link-item:hover, .dropdown-link-item.active {
    background: var(--bg-card-hover, rgba(59, 130, 246, 0.08));
    color: var(--accent-blue, #2563eb);
}

/* Mobile Toggle Hamburger */
.mobile-nav-toggle-btn {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.mobile-nav-toggle-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--brand-green);
}

/* ==========================================================================
   MOBILE NAVIGATION DRAWER (Off-Canvas Minimalist Sheet)
   ========================================================================== */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(85vw, 360px);
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    z-index: 99999;
    padding: 20px 20px 40px 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
}

.mobile-drawer.active {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.mobile-drawer-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease;
}

.mobile-drawer-close:hover {
    color: var(--text-primary);
}

.mobile-nav-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin: 16px 0 8px 10px;
}

.mobile-drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 0.15s ease, transform 0.1s ease;
    margin-bottom: 4px;
}

.mobile-drawer-item:hover, .mobile-drawer-item.active {
    background: var(--bg-card-hover);
    color: var(--brand-green);
    transform: translateX(4px);
}

.mobile-drawer-item .icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* ==========================================================================
   RESPONSIVE CONTAINERS & ANTI-OVERFLOW RULES
   ========================================================================== */
.app-wrapper {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.dashboard-body,
.page-container,
.calc-container,
.port-container,
.admin-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 80px 20px;
    box-sizing: border-box;
}

/* Guaranteed Horizontal Scroll Containment for Data Tables */
.table-responsive,
.data-table-container,
.calc-table-wrapper,
.modal-table-container,
.wp-table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 14px;
    margin-bottom: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    position: relative;
}

/* Subtle Custom Scrollbar for High-Tech Feel */
.table-responsive::-webkit-scrollbar,
.data-table-container::-webkit-scrollbar,
.calc-table-wrapper::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.table-responsive::-webkit-scrollbar-track,
.data-table-container::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-radius: var(--radius-full);
}

.table-responsive::-webkit-scrollbar-thumb,
.data-table-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

.table-responsive::-webkit-scrollbar-thumb:hover,
.data-table-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Card Enhancements - Minimalist Fintech */
.analytics-section-card,
.stat-card,
.admin-stat-card,
.card-minimal {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.analytics-section-card:hover,
.stat-card:hover {
    border-color: var(--border-color-hover);
}

/* ==========================================================================
   BREAKPOINTS: TABLET & MOBILE FIXES
   ========================================================================== */
@media (max-width: 992px) {
    .main-navbar {
        padding: 10px 16px;
    }
    .top-nav-menu {
        display: none !important;
    }
    .mobile-nav-toggle-btn {
        display: inline-flex;
    }
    .brand-title {
        font-size: 1.1rem;
    }
    .brand-tagline {
        display: none;
    }
    .dashboard-body,
    .page-container,
    .calc-container,
    .port-container,
    .admin-container {
        padding: 16px 12px 60px 12px;
    }
}

@media (max-width: 640px) {
    .brand-logo-img {
        width: 32px;
        height: 32px;
    }
    .hero-title {
        font-size: 1.8rem !important;
    }
    .hero-subtitle {
        font-size: 0.95rem !important;
    }
    .hero-section {
        padding: 28px 16px !important;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .stat-card {
        padding: 14px 10px !important;
    }
    .stat-val, .metric-val {
        font-size: 1.4rem !important;
    }
}

@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Universal Table & Tab Scrolling - Zero Viewport Expansion */
.table-responsive,
.data-table-container,
.data-table-wrap,
.data-table-wrapper,
.calc-table-wrapper,
.modal-table-container,
.wp-table-container,
.matrix-scroll-wrapper,
.stocks-table-wrapper,
.funds-table-wrapper,
.etf-table-wrapper,
.holdings-table-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    position: relative;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

table {
    max-width: 100%;
}

@media (max-width: 720px) {
    .table-responsive:has(thead th:nth-child(4)),
    .data-table-container:has(thead th:nth-child(4)),
    .calc-table-wrapper:has(thead th:nth-child(4)) {
        min-width: 100%;
    }
    .table-responsive th:first-child,
    .table-responsive td:first-child,
    .data-table-container th:first-child,
    .data-table-container td:first-child {
        position: sticky;
        left: 0;
        background: var(--bg-card);
        z-index: 2;
    }
}

.filter-tabs,
.planner-tabs,
.ranking-tabs-wrap,
.portfolio-tabs-group,
.category-filters,
.index-cluster-nav,
.quick-nav-pills {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

.filter-tabs::-webkit-scrollbar,
.planner-tabs::-webkit-scrollbar,
.ranking-tabs-wrap::-webkit-scrollbar,
.portfolio-tabs-group::-webkit-scrollbar,
.category-filters::-webkit-scrollbar,
.index-cluster-nav::-webkit-scrollbar,
.quick-nav-pills::-webkit-scrollbar {
    display: none;
}

/* Keep every cluster pill visible on narrow screens: wrap onto extra rows
   instead of hiding the trailing links (Stock List, Index Funds & ETFs)
   behind a horizontal scroll. */
@media (max-width: 768px) {
    .index-cluster-nav {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
        row-gap: 8px;
    }
    .index-cluster-nav .cluster-pill {
        padding: 7px 12px;
        font-size: 0.8rem;
        max-width: 100%;
    }
}

/* Touch Targets ≥44px on Mobile (WCAG 2.2 AA & Webpage Design Skill) */
@media (max-width: 640px) {
    .btn,
    .btn-action,
    .btn-primary-action,
    .nav-pill,
    .cluster-pill,
    .mobile-drawer-item {
        min-height: 44px;
        box-sizing: border-box;
        display: inline-flex;
        align-items: center;
    }
    input[type="text"],
    input[type="search"],
    input[type="number"],
    select {
        min-height: 44px;
        box-sizing: border-box;
    }
}

/* ==========================================================================
   UNIVERSAL AUTH & PRICING MODALS
   ========================================================================== */
.diy-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999 !important;
}

.diy-modal-dialog {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    padding: 28px 24px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
    animation: diyModalFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes diyModalFadeIn {
    from { opacity: 0; transform: scale(0.96) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.diy-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    transition: color 0.15s ease;
}

.diy-modal-close:hover {
    color: var(--text-primary, #0f172a);
}

.modal-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #cbd5e1);
    background: var(--bg-main, #f8fafc);
    color: var(--text-primary, #0f172a);
    font-size: 0.9rem;
    font-family: var(--font-body, inherit);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-input:focus {
    border-color: var(--brand-blue, #2563EB);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-modal-submit {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: var(--brand-green, #00C805);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: var(--font-heading, inherit);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 200, 5, 0.3);
}

.btn-modal-submit:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.btn-role-quick {
    background: var(--bg-surface, var(--bg-card, #ffffff));
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-role-quick:hover {
    border-color: var(--brand-blue, #2563EB);
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand-blue, #2563EB);
    transform: translateY(-1px);
}

.btn-role-quick.role-admin:hover {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}

/* ==========================================================================
   INSTITUTIONAL ANALYTICS WORKSPACE & QUOTE HEADER SYSTEM
   Shared across Index Detail, Mutual Fund Detail & Screener Directories
   ========================================================================== */

/* Above-the-fold Institutional Quote Header */
.inst-quote-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: start;
    box-shadow: var(--shadow-subtle);
}

.inst-quote-right {
    text-align: right;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.inst-quote-price {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 1.95rem;
    font-weight: 700;
    letter-spacing: -0.6px;
    line-height: 1.1;
    color: var(--text-primary);
}

.inst-range-wrap {
    width: 230px;
    margin-top: 6px;
}

.inst-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.inst-range-track {
    position: relative;
    height: 6px;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.28) 0%, rgba(59, 130, 246, 0.28) 50%, rgba(16, 185, 129, 0.35) 100%);
    border: 1px solid var(--border-color);
}

.inst-range-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--accent-blue);
    border: 2px solid var(--bg-card);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* 6-Metric Institutional KPI Ribbon */
.inst-kpi-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.inst-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
    transition: border-color 0.15s ease;
}

.inst-kpi-card:hover {
    border-color: var(--border-color-hover);
}

.inst-kpi-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.inst-kpi-value {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

.inst-kpi-sub {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* Sticky Section Sub-Navigation Bar */
.inst-sticky-subnav {
    position: sticky;
    top: 57px;
    z-index: 40;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.inst-sticky-subnav::-webkit-scrollbar {
    display: none;
}

.inst-subnav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    font-size: 0.81rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.inst-subnav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.inst-subnav-link.active {
    color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.1);
    font-weight: 700;
}

/* Sticky Table of Contents (index detail page) */
.inst-toc {
    position: sticky;
    top: 57px;
    z-index: 40;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-subtle);
}

.inst-toc-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.inst-toc-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.inst-toc-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}

.inst-toc-list {
    list-style: none;
    counter-reset: inst-toc;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px 14px;
}

.inst-toc-list > li {
    counter-increment: inst-toc;
    min-width: 0;
}

.inst-toc-list .inst-subnav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    font-size: 0.82rem;
    line-height: 1.35;
    white-space: normal;
}

.inst-toc-list .inst-subnav-link::before {
    content: counter(inst-toc, decimal-leading-zero);
    flex: 0 0 auto;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

.inst-toc-list .inst-subnav-link.active::before {
    color: var(--accent-blue);
}

/* Keep anchored sections clear of the sticky navbar and TOC */
#secOverviewChart,
#secValuation,
#secRiskCrisis,
#secReturnsRolling,
#indexConstituentsSection,
#secCalculator,
#secIndexFacts,
#secRelatedIndices,
#secFaq,
#discussion {
    scroll-margin-top: 190px;
}

@media (max-width: 768px) {
    #secOverviewChart,
    #secValuation,
    #secRiskCrisis,
    #secReturnsRolling,
    #indexConstituentsSection,
    #secCalculator,
    #secIndexFacts,
    #secRelatedIndices,
    #secFaq,
    #discussion {
        scroll-margin-top: 80px;
    }
}

@media (max-width: 1024px) {
    .inst-toc-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .inst-toc {
        position: static;
    }
}

@media (max-width: 560px) {
    .inst-toc-list {
        grid-template-columns: 1fr;
    }
}

/* Data provenance, citation and disclaimer block */
.data-trust-block a {
    color: var(--accent-blue);
}

/* 2-Column Institutional Workspace Grid */
.inst-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

.inst-primary-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.inst-sticky-rail {
    position: sticky;
    top: 112px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* Off-screen rendering containment for heavy below-the-fold sections */
.inst-lazy-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 520px;
}

@supports not (content-visibility: auto) {
    .inst-lazy-section {
        contain: layout style paint;
    }
}

/* Accessible Scrollable Data Table Region */
.table-scroll-region {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    container-type: inline-size;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.table-scroll-region:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.table-scroll-region thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-surface);
}

/* Direct <-> Regular Plan Switcher Pills */
.plan-switcher-pills {
    display: inline-flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 2px;
}

.plan-switcher-pill {
    padding: 4px 9px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.4;
    text-decoration: none;
    color: var(--text-secondary);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.plan-switcher-pill.active {
    background: var(--accent-blue);
    color: #ffffff;
}

/* P/E Valuation Zone Thermometer */
.pe-thermometer-bar {
    position: relative;
    height: 10px;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, #10B981 0%, #10B981 30%, #3B82F6 30%, #3B82F6 70%, #EF4444 70%, #EF4444 100%);
    margin: 12px 0 8px;
}

.pe-thermometer-needle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-primary);
    border: 3px solid var(--bg-card);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

@media (max-width: 1120px) {
    .inst-workspace-grid {
        grid-template-columns: 1fr;
    }
    .inst-sticky-rail {
        position: static;
    }
    .inst-kpi-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .inst-quote-header {
        grid-template-columns: 1fr;
        padding: 18px 16px;
        gap: 14px;
    }
    .inst-quote-right {
        text-align: left;
        align-items: flex-start;
        min-width: 0;
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }
    .inst-range-wrap {
        width: 100%;
        max-width: 280px;
    }
    .inst-kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (forced-colors: active) {
    .analytics-section-card,
    .stat-card,
    .inst-quote-header,
    .inst-kpi-card,
    .badge-up,
    .badge-down {
        border: 1px solid CanvasText;
    }
}

/* ==========================================================================
   CONVERSION-OPTIMIZED DIRECT RESPONSE COMPONENT STYLES
   ========================================================================== */
/* Secondary action: visible on light and dark surfaces. Primary classes below
   override this when both are present. */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm, 8px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-action:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-1px);
}

.btn-action:focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Primary action: filled brand action. */
.btn-primary,
.btn-primary-action,
a.btn-primary,
button.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm, 8px);
    background: var(--brand-action, #FF4F00);
    border: 1px solid var(--brand-action, #FF4F00);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.94rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-primary:hover,
.btn-primary-action:hover,
a.btn-primary:hover,
button.btn-primary:hover {
    background: var(--brand-action-hover, #E04500);
    border-color: var(--brand-action-hover, #E04500);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 79, 0, 0.32);
    color: #ffffff !important;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm, 8px);
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    color: var(--text-primary) !important;
}





        /* ==========================================================================
           HIGH-CONVERSION DIRECT-RESPONSE HOMEPAGE
           ========================================================================== */
        
        /* Hero Claude / Market Cycles Top Ribbon */
        .hero-claude-ribbon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            background: var(--bg-surface, #ffffff);
            border: 1px solid rgba(255, 79, 0, 0.35);
            border-radius: 999px;
            padding: 6px 8px 6px 18px;
            margin: 0 auto 24px auto;
            box-shadow: 0 4px 16px rgba(255, 79, 0, 0.08);
            max-width: 100%;
            flex-wrap: wrap;
        }

        .hero-claude-ribbon .ribbon-text {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-primary, #1A1A1A);
            line-height: 1.4;
        }

        .hero-claude-ribbon .ribbon-cta-btn {
            background: var(--brand-action, #FF4F00);
            color: #FFFFFF;
            border: none;
            padding: 7px 18px;
            border-radius: 999px;
            font-size: 0.84rem;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px rgba(255, 79, 0, 0.3);
        }

        .hero-claude-ribbon .ribbon-cta-btn:hover {
            background: var(--brand-action-hover, #E04500);
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(255, 79, 0, 0.45);
        }

        .hero-section {
            background: var(--bg-surface, #ffffff);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 44px 28px 44px 28px;
            margin-bottom: 32px;
            text-align: center;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
            position: relative;
        }

        .hero-kicker {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.82rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--brand-action, #FF4F00);
            background: var(--brand-action-light, rgba(255, 79, 0, 0.08));
            padding: 6px 14px;
            border-radius: 999px;
            margin-bottom: 18px;
        }

        .hero-title {
            font-family: var(--font-heading);
            font-size: clamp(2rem, 4.8vw, 3.2rem);
            font-weight: 800;
            line-height: 1.16;
            color: var(--text-primary, #1A1A1A);
            margin: 0 auto 18px auto;
            max-width: 920px;
            letter-spacing: -0.02em;
        }

        .hero-title em {
            font-style: normal;
            color: var(--brand-action, #FF4F00);
            text-decoration: underline;
            text-decoration-color: var(--brand-action-light, rgba(255, 79, 0, 0.3));
            text-underline-offset: 6px;
        }

        .hero-subtitle {
            font-size: 1.12rem;
            color: var(--text-secondary, #475569);
            max-width: 820px;
            margin: 0 auto 28px auto;
            line-height: 1.68;
        }

        /* ==========================================================================
           INSTITUTIONAL FINANCIAL ANALYTICS UI SYSTEM
           Inspired by Morningstar Direct, Koyfin, YCharts, FactSet & Bloomberg
           ========================================================================== */

        /* Morningstar FactSheet & Koyfin Panel Architecture */
        .hero-analyzer-card {
            max-width: 900px;
            margin: 0 auto 18px auto;
            background: var(--bg-card, #ffffff);
            padding: 16px 20px 20px 20px;
            border: 1px solid var(--border-color);
            border-top: 3px solid var(--brand-action, #FF4F00);
            border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
            display: flex;
            flex-direction: column;
            gap: 14px;
            text-align: left;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            position: relative;
        }

        .hero-analyzer-card:focus-within {
            border-color: var(--brand-action, #FF4F00);
            box-shadow: 0 4px 14px var(--brand-action-light, rgba(255, 79, 0, 0.12));
        }

        .analyzer-header-strip {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 10px;
            margin-bottom: 2px;
        }

        .analyzer-rail-title {
            font-family: var(--font-mono, monospace);
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .analyzer-rail-status {
            font-family: var(--font-mono, monospace);
            font-size: 0.72rem;
            font-weight: 600;
            color: #059669;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .analyzer-combos-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }

        .combo-group {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .combo-label {
            font-family: var(--font-mono, monospace);
            font-size: 0.70rem;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .combo-select-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        /* Morningstar/Koyfin Custom Financial Select */
        .combo-select,
        .combo-select::picker(select) {
            appearance: base-select;
        }

        .combo-select {
            width: 100%;
            padding: 9px 30px 9px 11px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background-color: var(--bg-surface, #F8FAFC);
            background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2364748B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 10px center;
            color: var(--text-primary);
            font-family: var(--font-body);
            font-size: 0.84rem;
            font-weight: 600;
            cursor: pointer;
            outline: none;
            transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
            box-sizing: border-box;
        }

        .combo-select:focus {
            border-color: var(--brand-action, #FF4F00);
            background-color: #FFFFFF;
            outline: 2px solid var(--brand-action, #FF4F00);
            outline-offset: 1px;
        }

        .analyzer-fund-row {
            display: flex;
            gap: 10px;
            align-items: flex-end;
            padding-top: 4px;
        }

        .analyzer-fund-select-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
        }

        .analyzer-fund-select,
        .analyzer-fund-select::picker(select) {
            appearance: base-select;
        }

        .analyzer-fund-select {
            width: 100%;
            padding: 10px 32px 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background-color: var(--bg-surface, #F8FAFC);
            background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2364748B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            color: var(--text-primary);
            font-family: var(--font-body);
            font-size: 0.90rem;
            font-weight: 600;
            cursor: pointer;
            outline: none;
            transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
            box-sizing: border-box;
        }

        .analyzer-fund-select:focus {
            border-color: var(--brand-action, #FF4F00);
            background-color: #FFFFFF;
            outline: 2px solid var(--brand-action, #FF4F00);
            outline-offset: 1px;
        }

        .hero-action-btn {
            padding: 11px 26px;
            font-size: 0.94rem;
            font-weight: 700;
            border-radius: 6px;
            border: 1px solid var(--brand-action, #FF4F00);
            cursor: pointer;
            white-space: nowrap;
            background: var(--brand-action, #FF4F00);
            color: #FFFFFF;
            transition: all 0.15s ease;
            box-shadow: 0 1px 3px rgba(255, 79, 0, 0.25);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .hero-action-btn:hover {
            background: var(--brand-action-hover, #E04500);
            border-color: var(--brand-action-hover, #E04500);
            color: #FFFFFF;
        }

        @media (max-width: 820px) {
            .analyzer-combos-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 540px) {
            .analyzer-combos-grid {
                grid-template-columns: 1fr;
            }
            .analyzer-fund-row {
                flex-direction: column;
            }
            .hero-action-btn {
                width: 100%;
            }
        }

        /* Hero Trust Proof Bar */
        .hero-trust-bar {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 16px;
            flex-wrap: wrap;
            padding: 9px 16px;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            margin: 0 auto 24px auto;
            max-width: 900px;
            font-size: 0.82rem;
            color: var(--text-secondary);
        }

        .trust-item {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .trust-check {
            color: #059669;
            font-weight: 800;
        }

        /* ==========================================================================
           BLOOMBERG / KOYFIN DATA SUMMARY RAILS
           ========================================================================== */
        .platform-stats-strip {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 12px;
            margin-bottom: 40px;
        }

        .stat-item {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 16px 18px;
            text-align: left;
            text-decoration: none;
            color: inherit;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: flex-start;
            transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
            position: relative;
        }

        .stat-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 3px;
            height: 100%;
            background: transparent;
            transition: background 0.18s ease;
            border-radius: 6px 0 0 6px;
        }

        .stat-item:hover {
            border-color: var(--border-color-hover);
            transform: translateY(-2px);
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
        }

        .stat-item:hover::before {
            background: var(--brand-action, #FF4F00);
        }

        .stat-rail-eyebrow {
            font-family: var(--font-mono, monospace);
            font-size: 0.70rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--text-muted);
            margin-bottom: 6px;
        }

        .stat-number {
            font-family: var(--font-mono, monospace);
            font-size: 2.1rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 2px;
            line-height: 1.1;
            letter-spacing: -0.02em;
            font-variant-numeric: tabular-nums;
            font-feature-settings: "tnum" 1;
        }

        .stat-title {
            font-size: 0.92rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .stat-desc {
            font-size: 0.78rem;
            color: var(--text-secondary);
            line-height: 1.45;
            margin-bottom: 8px;
        }

        .stat-badge {
            display: inline-block;
            font-family: var(--font-mono, monospace);
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #047857;
            background: rgba(4, 120, 87, 0.08);
            border: 1px solid rgba(4, 120, 87, 0.25);
            padding: 2px 6px;
            border-radius: 3px;
        }

        /* ==========================================================================
           KOYFIN TACTILE SEGMENTED CONTROLS & SOLUTIONS SHOWCASE
           ========================================================================== */
        .solutions-tab-section {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 30px 26px;
            margin-bottom: 40px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        }

        .solutions-tab-nav {
            display: inline-flex;
            justify-content: flex-start;
            align-items: center;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 3px;
            gap: 2px;
            margin-bottom: 28px;
            max-width: 100%;
            overflow-x: auto;
        }

        .tab-btn {
            background: transparent;
            border: 1px solid transparent;
            border-radius: 4px;
            padding: 8px 16px;
            font-size: 0.86rem;
            font-weight: 600;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

        .tab-btn:hover {
            color: var(--text-primary);
            background: rgba(0, 0, 0, 0.03);
        }

        .tab-btn.active {
            background: var(--bg-card);
            color: var(--text-primary);
            border-color: var(--border-color);
            font-weight: 700;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .tab-pane {
            display: none;
            animation: fadeInTab 0.2s ease-in-out;
        }

        .tab-pane.active {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 32px;
            align-items: center;
        }

        @keyframes fadeInTab {
            from { opacity: 0; transform: translateY(4px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @media (max-width: 860px) {
            .tab-pane.active {
                grid-template-columns: 1fr;
            }
        }

        .tab-content-left {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .tab-kicker {
            display: inline-block;
            font-family: var(--font-mono, monospace);
            font-size: 0.70rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--brand-action, #FF4F00);
            background: var(--brand-action-light);
            border: 1px solid rgba(255, 79, 0, 0.2);
            padding: 3px 8px;
            border-radius: 3px;
            width: fit-content;
        }

        .tab-content-left h3 {
            font-family: var(--font-heading);
            font-size: 1.65rem;
            font-weight: 800;
            color: var(--text-primary);
            line-height: 1.25;
            margin: 0;
            letter-spacing: -0.01em;
        }

        .tab-content-left p {
            font-size: 0.94rem;
            color: var(--text-secondary);
            line-height: 1.6;
            margin: 0;
        }

        .tab-feature-list {
            list-style: none;
            padding: 0;
            margin: 4px 0 14px 0;
            display: flex;
            flex-direction: column;
            gap: 9px;
        }

        .tab-feature-list li {
            font-size: 0.88rem;
            color: var(--text-primary);
            display: flex;
            align-items: flex-start;
            gap: 8px;
            line-height: 1.45;
        }

        .tab-feature-check {
            width: 17px;
            height: 17px;
            border-radius: 3px;
            background: rgba(4, 120, 87, 0.10);
            border: 1px solid rgba(4, 120, 87, 0.25);
            color: #047857;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.70rem;
            font-weight: 800;
            flex-shrink: 0;
            margin-top: 2px;
        }

        .tab-cta-btn {
            background: var(--brand-action, #FF4F00);
            color: #FFFFFF;
            font-weight: 700;
            font-size: 0.92rem;
            padding: 10px 20px;
            border-radius: 6px;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            width: fit-content;
            box-shadow: 0 1px 3px rgba(255, 79, 0, 0.25);
            transition: all 0.15s ease;
        }

        .tab-cta-btn:hover {
            background: var(--brand-action-hover, #E04500);
            color: #FFFFFF;
        }

        /* Mockup Preview Card - Morningstar Panel Format */
        .tab-mockup-card {
            background: var(--bg-card, #ffffff);
            border: 1px solid var(--border-color);
            border-top: 3px solid var(--accent-blue, #2563EB);
            border-radius: 6px;
            padding: 16px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .mockup-window-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 10px;
        }

        .mockup-dots {
            display: flex;
            gap: 5px;
        }

        .mockup-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #cbd5e1;
        }

        .mockup-title {
            font-family: var(--font-mono, monospace);
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .mockup-body {
            border-radius: 4px;
            background: var(--bg-surface, #f8fafc);
            padding: 14px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            border: 1px solid var(--border-color);
        }

        /* ==========================================================================
           MORNINGSTAR FACTSHEET FEATURED TOOLS
           ========================================================================== */
        .featured-power-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
            gap: 16px;
            margin-bottom: 40px;
        }

        .power-tool-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 22px 20px;
            display: flex;
            flex-direction: column;
            transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
            position: relative;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
        }

        .power-tool-card.featured-card {
            border-top: 3px solid var(--brand-action, #FF4F00);
        }

        .power-tool-card:hover {
            border-color: var(--border-color-hover);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
        }

        .power-badge {
            display: inline-block;
            font-family: var(--font-mono, monospace);
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            padding: 2px 7px;
            border-radius: 3px;
            margin-bottom: 10px;
            width: fit-content;
            background: var(--brand-action-light);
            border: 1px solid rgba(255, 79, 0, 0.2);
            color: var(--brand-action);
        }

        .power-tool-card h3 {
            font-family: var(--font-heading);
            font-size: 1.2rem;
            font-weight: 800;
            color: var(--text-primary);
            margin: 0 0 8px 0;
            letter-spacing: -0.01em;
        }

        .power-tool-card p {
            color: var(--text-secondary);
            font-size: 0.90rem;
            line-height: 1.6;
            margin: 0 0 18px 0;
            flex-grow: 1;
        }

        .power-tool-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 10px 18px;
            border-radius: 6px;
            font-weight: 700;
            font-size: 0.90rem;
            text-decoration: none;
            background: var(--brand-action, #FF4F00);
            color: #FFFFFF;
            transition: all 0.15s ease;
            box-shadow: 0 1px 3px rgba(255, 79, 0, 0.25);
            width: fit-content;
        }

        .power-tool-btn:hover {
            background: var(--brand-action-hover, #E04500);
            color: #FFFFFF;
        }

        /* ==========================================================================
           INSTITUTIONAL FINANCIAL DATA TABLE (Morningstar / YCharts Data Grid)
           ========================================================================== */
        .fin-table-wrapper {
            overflow-x: auto;
            max-width: 100%;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background: var(--bg-card);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
            margin-bottom: 32px;
            container-type: inline-size;
        }

        .fin-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            font-size: 0.86rem;
            text-align: left;
        }

        .fin-table thead th {
            position: sticky;
            top: 0;
            background: var(--bg-surface);
            font-family: var(--font-mono, monospace);
            font-size: 0.70rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--text-muted);
            padding: 10px 14px;
            border-bottom: 2px solid var(--border-color);
            white-space: nowrap;
        }

        .fin-table tbody td {
            padding: 11px 14px;
            border-bottom: 1px solid var(--border-color);
            color: var(--text-primary);
            font-size: 0.88rem;
            vertical-align: middle;
        }

        .fin-table tbody tr:last-child td {
            border-bottom: none;
        }

        .fin-table tbody tr:nth-child(even) {
            background: rgba(248, 250, 252, 0.5);
        }

        .fin-table tbody tr:hover {
            background: rgba(37, 99, 235, 0.035);
        }

        .fin-table td.num {
            text-align: right;
            font-family: var(--font-mono, monospace);
            font-variant-numeric: tabular-nums;
            font-feature-settings: "tnum" 1;
            font-weight: 600;
        }

        .delta-pill {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            font-family: var(--font-mono, monospace);
            font-size: 0.80rem;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 3px;
            font-variant-numeric: tabular-nums;
            font-feature-settings: "tnum" 1;
        }

        .delta-pill.positive {
            color: #047857;
            background: rgba(4, 120, 87, 0.08);
            border: 1px solid rgba(4, 120, 87, 0.25);
        }

        .delta-pill.negative {
            color: #b91c1c;
            background: rgba(185, 28, 28, 0.08);
            border: 1px solid rgba(185, 28, 28, 0.25);
        }

        .val-badge {
            display: inline-block;
            font-family: var(--font-mono, monospace);
            font-size: 0.70rem;
            font-weight: 700;
            text-transform: uppercase;
            padding: 2px 6px;
            border-radius: 3px;
        }

        .val-badge.normal {
            color: #047857;
            background: rgba(4, 120, 87, 0.08);
            border: 1px solid rgba(4, 120, 87, 0.20);
        }

        .val-badge.stretched {
            color: #b45309;
            background: rgba(180, 83, 9, 0.08);
            border: 1px solid rgba(180, 83, 9, 0.20);
        }

        /* Editorial & Path Tradeoffs - Fidelity Research Callout Style */
        .section-title-box {
            text-align: center;
            margin-bottom: 24px;
        }

        .section-title-box h2 {
            font-family: var(--font-heading);
            font-size: 1.85rem;
            font-weight: 800;
            color: var(--text-primary);
            margin-bottom: 6px;
            letter-spacing: -0.01em;
        }

        .section-title-box p {
            color: var(--text-secondary);
            font-size: 0.98rem;
        }

        .tradeoff-callout {
            background: var(--brand-action-light, rgba(255, 79, 0, 0.06));
            border-left: 3px solid var(--brand-action, #FF4F00);
            border-radius: 0 6px 6px 0;
            padding: 16px 20px;
            color: var(--text-primary);
            font-size: 0.94rem;
            line-height: 1.65;
            margin: 16px 0 22px 0;
        }

        .tradeoff-callout strong { color: var(--text-primary); }

        .path-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 14px;
            margin-bottom: 20px;
        }

        .path-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 20px 18px;
            display: flex;
            flex-direction: column;
            transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
        }

        .path-card:hover {
            transform: translateY(-2px);
            border-color: var(--border-color-hover);
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
        }

        .path-kicker {
            font-family: var(--font-mono, monospace);
            font-size: 0.70rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--text-muted);
            margin-bottom: 6px;
            text-transform: uppercase;
            color: var(--brand-action, #FF4F00);
            margin-bottom: 6px;
        }

        .path-card h3 {
            font-family: var(--font-heading);
            font-size: 1.25rem;
            font-weight: 800;
            color: var(--text-primary);
            margin: 0 0 10px;
        }

        .path-card p {
            color: var(--text-secondary);
            font-size: 0.92rem;
            line-height: 1.65;
            margin: 0 0 12px;
        }

        .path-card .path-fit {
            margin-top: auto;
            border-top: 1px solid var(--border-color);
            padding-top: 12px;
            font-size: 0.84rem;
            color: var(--text-muted);
        }

        /* Guide & Workflow Grid - Morningstar Methodology Cards */
        .guide-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 16px;
            margin-bottom: 40px;
        }

        .guide-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 20px 18px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
            transition: all 0.18s ease;
            display: flex;
            flex-direction: column;
        }

        .guide-card:hover {
            border-color: var(--border-color-hover);
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
        }

        .guide-card .step-number {
            width: 28px;
            height: 28px;
            background: var(--bg-surface);
            color: var(--brand-action);
            border: 1px solid var(--border-color);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: var(--font-mono, monospace);
            font-weight: 700;
            font-size: 0.85rem;
            margin-bottom: 12px;
        }

        .guide-card h3 {
            font-family: var(--font-heading);
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .guide-card p {
            font-size: 0.90rem;
            color: var(--text-secondary);
            line-height: 1.55;
            margin-bottom: 14px;
            flex-grow: 1;
        }

        .guide-card .highlight-tag {
            font-family: var(--font-mono, monospace);
            font-size: 0.74rem;
            font-weight: 600;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            padding: 5px 10px;
            border-radius: 4px;
            color: var(--text-primary);
            display: inline-flex;
            align-items: center;
        }

        /* Category Showcase - FactSheet Category Tiles */
        .category-showcase-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 14px;
            margin-bottom: 40px;
        }

        .cat-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 18px 16px;
            text-decoration: none;
            color: var(--text-primary);
            transition: all 0.18s ease;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
            display: flex;
            flex-direction: column;
        }

        .cat-card:hover {
            border-color: var(--border-color-hover);
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
        }

        .cat-card .icon-badge {
            width: 38px;
            height: 38px;
            border-radius: 6px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            color: var(--brand-action, #FF4F00);
            margin-bottom: 12px;
            flex-shrink: 0;
            transition: all 0.18s ease;
        }

        .cat-card:hover .icon-badge {
            background: var(--brand-action, #FF4F00);
            border-color: var(--brand-action, #FF4F00);
            color: #FFFFFF;
        }
            color: #FFFFFF;
            transform: scale(1.05);
        }

        .cat-card h4 {
            font-family: var(--font-heading);
            font-size: 1.1rem;
            font-weight: 700;
            margin-bottom: 6px;
            color: var(--text-primary);
        }

        .cat-card p {
            font-size: 0.88rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        /* ==========================================
           TESTIMONIAL SECTION (Customer Proof)
           ========================================== */
        .testimonial-section {
            background: linear-gradient(135deg, var(--bg-surface, #ffffff) 0%, var(--bg-main, #f8fafc) 100%);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 40px 32px;
            margin-bottom: 48px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
            text-align: center;
        }

        .testimonial-card-single {
            max-width: 760px;
            margin: 0 auto;
        }

        .testimonial-stars {
            display: inline-flex;
            gap: 4px;
            color: #f59e0b;
            margin-bottom: 16px;
        }

        .testimonial-quote {
            font-family: var(--font-heading);
            font-size: 1.28rem;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.65;
            margin-bottom: 22px;
            font-style: italic;
        }

        .testimonial-author-block {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 14px;
        }

        .testimonial-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: var(--brand-action-light, rgba(255, 79, 0, 0.12));
            color: var(--brand-action, #FF4F00);
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: var(--font-heading);
            font-weight: 800;
            font-size: 1.15rem;
            border: 2px solid var(--brand-action);
        }

        .testimonial-meta {
            text-align: left;
        }

        .testimonial-name {
            font-weight: 800;
            font-size: 1rem;
            color: var(--text-primary);
            line-height: 1.2;
        }

        .testimonial-sub {
            font-size: 0.82rem;
            color: var(--text-secondary);
            margin-top: 2px;
        }

        /* ==========================================
           RECENT & POPULAR POSTS (Featured Insights)
           ========================================== */
        .insights-section {
            margin-bottom: 48px;
        }

        .insights-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 28px;
        }

        @media (max-width: 820px) {
            .insights-grid {
                grid-template-columns: 1fr;
            }
        }

        .insights-column {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-top: 3px solid var(--accent-blue, #2563EB);
            border-radius: 6px;
            padding: 22px 20px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        }

        .insights-column:nth-child(2) {
            border-top-color: var(--brand-action, #FF4F00);
        }

        .insights-col-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 10px;
            margin-bottom: 14px;
        }

        .insights-col-title {
            font-family: var(--font-heading);
            font-size: 1.15rem;
            font-weight: 800;
            color: var(--text-primary);
            margin: 0;
            display: flex;
            align-items: center;
            gap: 7px;
        }

        .post-card-item {
            display: flex;
            flex-direction: column;
            gap: 3px;
            padding: 12px 0;
            border-bottom: 1px solid var(--border-color);
            text-decoration: none;
            transition: all 0.15s ease;
        }

        .post-card-item:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .post-card-item:hover .post-item-title {
            color: var(--brand-action, #FF4F00);
        }

        .post-item-kicker {
            font-family: var(--font-mono, monospace);
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--brand-action, #FF4F00);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .post-item-title {
            font-family: var(--font-heading);
            font-size: 0.98rem;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.35;
            transition: color 0.15s ease;
        }

        .post-item-meta {
            font-size: 0.78rem;
            color: var(--text-muted);
            line-height: 1.4;
        }

        /* Pre-Footer Institutional Advisory Banner */
        .bottom-talk-banner {
            background: linear-gradient(135deg, #0A192F 0%, #111827 100%);
            border: 1px solid var(--border-color);
            border-top: 3px solid var(--brand-action, #FF4F00);
            border-radius: 8px;
            padding: 34px 28px;
            color: #FFFFFF;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 24px;
            flex-wrap: wrap;
            margin-bottom: 40px;
            box-shadow: 0 4px 20px rgba(10, 25, 47, 0.25);
        }
            margin-bottom: 44px;
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            flex-wrap: wrap;
        }

        .bottom-talk-banner h3 {
            font-family: var(--font-heading);
            font-size: 2rem;
            font-weight: 800;
            color: #FFFFFF;
            margin: 0 0 10px 0;
            letter-spacing: -0.01em;
        }

        .bottom-talk-banner p {
            font-size: 1.05rem;
            color: #D1D5DB;
            max-width: 680px;
            margin: 0;
            line-height: 1.6;
        }

        .bottom-talk-btn {
            background: var(--brand-action, #FF4F00);
            color: #FFFFFF;
            font-size: 1.02rem;
            font-weight: 800;
            padding: 14px 34px;
            border-radius: 10px;
            border: none;
            cursor: pointer;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 4px 16px rgba(255, 79, 0, 0.4);
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .bottom-talk-btn:hover {
            background: var(--brand-action-hover, #E04500);
            transform: translateY(-2px);
            box-shadow: 0 6px 22px rgba(255, 79, 0, 0.55);
            color: #FFFFFF;
        }


/* ==========================================================================
   INSTITUTIONAL TRUST & POLICY PAGES (.trust-page)
   Universal styles for /about, /contact, /editorial-policy, /methodology,
   /data-sources, /disclaimer, /privacy, /terms, /refund-policy
   ========================================================================== */
.trust-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px 48px;
    line-height: 1.75;
    color: var(--text-secondary, #475569);
    box-sizing: border-box;
}

.trust-card-shell {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-lg, 16px);
    padding: 40px 36px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-top: 18px;
    margin-bottom: 36px;
}

@media (max-width: 640px) {
    .trust-card-shell {
        padding: 24px 18px;
        border-radius: 12px;
    }
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-blue, #2563EB);
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.trust-callout {
    border-left: 4px solid var(--brand-action, #FF4F00);
    background: var(--brand-action-light, rgba(255, 79, 0, 0.06));
    border-radius: 0 10px 10px 0;
    padding: 16px 20px;
    margin: 22px 0;
    font-size: 0.94rem;
    line-height: 1.68;
    color: var(--text-primary, #0F172A);
}

.trust-page h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.3rem);
    font-weight: 800;
    color: var(--text-primary, #0F172A);
    margin: 0 0 14px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.trust-page h2 {
    font-family: var(--font-heading);
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--text-primary, #0F172A);
    margin: 32px 0 10px;
    letter-spacing: -0.01em;
}

.trust-page h3 {
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-primary, #0F172A);
    margin: 20px 0 8px;
}

.trust-page p,
.trust-page li {
    font-size: 0.96rem;
    color: var(--text-secondary, #475569);
    line-height: 1.75;
}

.trust-page p {
    margin: 0 0 14px;
}

.trust-page ul,
.trust-page ol {
    margin: 10px 0 18px;
    padding-left: 22px;
}

.trust-page li {
    margin-bottom: 8px;
}

.trust-page a {
    color: var(--accent-blue, #2563EB);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.trust-page a:hover {
    color: var(--brand-action, #FF4F00);
    text-decoration: underline;
}

.trust-page strong {
    color: var(--text-primary, #0F172A);
}

.trust-page code {
    background: rgba(148, 163, 184, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

.trust-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 0.9rem;
}

.trust-page th,
.trust-page td {
    border: 1px solid var(--border-color, #E2E8F0);
    padding: 10px 14px;
    text-align: left;
}

.trust-page th {
    background: var(--bg-surface, #F8FAFC);
    color: var(--text-primary, #0F172A);
    font-weight: 700;
}

.contact-card {
    background: var(--bg-surface, #FFFFFF);
    border: 1px solid var(--border-color, #E2E8F0);
    border-radius: 12px;
    padding: 18px 20px;
    margin: 12px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.contact-card strong {
    color: var(--text-primary, #0F172A);
    display: block;
    margin-bottom: 6px;
    font-size: 0.96rem;
}

.email-obf {
    color: var(--brand-action, #FF4F00);
    font-weight: 700;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.92em;
}



/* ==========================================================================
   LONG-FORM EDITORIAL & GUIDE COMPONENTS (.hi-*)
   Universal styles for educational guides and comparative frameworks
   ========================================================================== */
.hi-wrap { max-width: 1040px; margin: 0 auto; padding: 36px 20px 56px; }
        .hi-hero { background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-main) 100%); border: 1px solid var(--border-color); border-radius: 18px; padding: 44px 32px; text-align: center; margin-bottom: 28px; }
        .hi-badge { display: inline-block; background: var(--accent-teal-subtle, rgba(0,210,180,0.12)); color: var(--accent-teal); border: 1px solid var(--accent-teal); border-radius: 999px; padding: 6px 16px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; margin-bottom: 18px; }
        .hi-hero h1 { font-family: var(--font-heading); font-size: clamp(1.8rem, 4.6vw, 2.9rem); line-height: 1.15; font-weight: 800; color: var(--text-main); margin: 0 0 16px; }
        .hi-hero h1 span { background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
        .hi-hero p { max-width: 760px; margin: 0 auto 22px; color: var(--text-muted); font-size: 1.08rem; line-height: 1.65; }
        .hi-cta { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
        .hi-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 10px; font-weight: 700; text-decoration: none; }
        .hi-btn-primary { background: var(--brand-action, #FF4F00); color: #fff; }
        .hi-btn-primary:hover { background: var(--brand-action-hover, #E04500); color: #fff; }
        .hi-btn-secondary { background: var(--card-bg); color: var(--text-main); border: 1px solid var(--border-color); }
        .hi-section { margin: 34px 0; }
        .hi-section h2 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--text-main); margin: 0 0 8px; }
        .hi-section .hi-lede { color: var(--text-muted); margin: 0 0 18px; line-height: 1.7; }
        .hi-prose p { color: var(--text-secondary); line-height: 1.8; font-size: 0.97rem; margin: 0 0 12px; }
        .hi-prose strong { color: var(--text-main); }
        .hi-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
        .hi-panel { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; padding: 20px 22px; }
        .hi-panel h3 { font-family: var(--font-heading); font-size: 1.05rem; color: var(--text-main); margin: 0 0 8px; }
        .hi-panel p, .hi-panel li { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.65; }
        .hi-panel ul { margin: 8px 0 0; padding-left: 18px; }
        .hi-callout { border-left: 4px solid var(--accent-teal); background: rgba(0, 168, 150, 0.07); border-radius: 10px; padding: 16px 20px; color: var(--text-secondary); font-size: 0.94rem; line-height: 1.7; margin: 18px 0; }
        .hi-callout strong { color: var(--text-main); }
        .hi-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
        .hi-path { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; }
        .hi-path .kicker { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--accent-teal); margin-bottom: 6px; }
        .hi-path h3 { font-family: var(--font-heading); font-size: 1.2rem; color: var(--text-main); margin: 0 0 8px; }
        .hi-path p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.65; margin: 0 0 10px; }
        .hi-path .fit { margin-top: auto; font-size: 0.82rem; color: var(--text-muted); border-top: 1px solid var(--border-color); padding-top: 10px; }
        .hi-table-wrap { overflow-x: auto; border: 1px solid var(--border-color); border-radius: 12px; }
        .hi-table { width: 100%; border-collapse: collapse; min-width: 680px; background: var(--card-bg); }
        .hi-table th, .hi-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border-color); font-size: 0.88rem; color: var(--text-secondary); vertical-align: top; }
        .hi-table th { background: var(--bg-main); color: var(--text-main); font-weight: 700; }
        .hi-table tr:last-child td { border-bottom: none; }
        .hi-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
        .hi-steps li { position: relative; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px 18px 16px 56px; color: var(--text-secondary); line-height: 1.65; font-size: 0.93rem; }
        .hi-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 16px; top: 15px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-blue); color: #fff; font-weight: 800; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; }
        .hi-steps strong { color: var(--text-main); }
        .hi-faq details { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
        .hi-faq summary { cursor: pointer; font-weight: 700; color: var(--text-main); font-size: 0.94rem; }
        .hi-faq p { margin: 10px 0 0; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
        .hi-disclaimer { background: rgba(100, 116, 139, 0.08); border-radius: 10px; padding: 14px 18px; color: var(--text-muted); font-size: 0.8rem; line-height: 1.65; margin-top: 28px; }
        .hi-bottom { background: linear-gradient(135deg, #0A192F, #1E3A8A); color: #fff; border-radius: 16px; padding: 32px 26px; text-align: center; margin-top: 34px; }
        .hi-bottom h2 { color: #fff; margin: 0 0 10px; }
        .hi-bottom p { color: rgba(255,255,255,0.78); max-width: 680px; margin: 0 auto 18px; line-height: 1.65; }
        .hi-bottom a { color: #fff; font-weight: 700; }
        @media (max-width: 640px) { .hi-hero { padding: 32px 20px; } .hi-wrap { padding: 22px 14px 40px; } }



/* ==========================================================================
   LEARN & CONTENT HUB COMPONENTS (.learn-*)
   Universal styles for educational hubs, guides, and resource directories
   ========================================================================== */
.learn-wrap { max-width: 960px; margin: 0 auto; padding: 36px 20px 24px; }
        .learn-wrap h1 { font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; color: var(--text-primary); margin: 0 0 10px; }
        .learn-wrap h2 { font-family: var(--font-heading); font-size: 1.35rem; color: var(--text-primary); margin: 30px 0 10px; }
        .learn-wrap p, .learn-wrap li { color: var(--text-secondary); line-height: 1.75; }
        .learn-wrap a { color: var(--accent-blue); font-weight: 600; text-decoration: none; }
        .learn-card { display: block; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 20px 22px; margin: 12px 0; text-decoration: none; }
        .learn-card h3 { font-family: var(--font-heading); font-size: 1.15rem; color: var(--text-primary); margin: 0 0 6px; }
        .learn-card p { margin: 0; font-size: 0.92rem; }
        .learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 12px 0; }
        .learn-grid a { display: block; padding: 16px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-card); }

/* ==========================================================================
   SITE-WIDE BRAND ACTION FOOTER
   Universal styles for .site-footer, #mainFooter, .diy-footer, and <footer>
   Always ensures high-contrast #FFFFFF text on var(--brand-action) background
   ========================================================================== */
footer,
.site-footer,
.diy-footer,
#mainFooter,
#diyFooter {
    background-color: var(--brand-action, #FF4F00) !important;
    color: #FFFFFF !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: auto;
    width: 100%;
    display: block;
    box-sizing: border-box;
}

footer .footer-container,
.site-footer .footer-container,
.diy-footer .footer-container,
#mainFooter .footer-container,
#diyFooter .footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 24px 32px;
    box-sizing: border-box;
}

footer a,
.site-footer a,
.diy-footer a,
#mainFooter a,
#diyFooter a {
    color: rgba(255, 255, 255, 0.92) !important;
    text-decoration: none;
    transition: color 0.15s ease, text-decoration 0.15s ease;
}

footer a:hover,
.site-footer a:hover,
.diy-footer a:hover,
#mainFooter a:hover,
#diyFooter a:hover {
    color: #FFFFFF !important;
    text-decoration: underline !important;
}

footer h4,
.site-footer h4,
.diy-footer h4,
#mainFooter h4,
#diyFooter h4 {
    color: #FFFFFF !important;
    letter-spacing: 0.08em;
}

footer p,
.site-footer p,
.diy-footer p,
#mainFooter p,
#diyFooter p,
footer li,
.site-footer li,
.diy-footer li,
#mainFooter li,
#diyFooter li,
footer strong,
.site-footer strong,
.diy-footer strong,
#mainFooter strong,
#diyFooter strong,
footer span,
.site-footer span,
.diy-footer span,
#mainFooter span,
#diyFooter span {
    color: rgba(255, 255, 255, 0.92) !important;
}

/* ==========================================================================
   MARKET-RISK CLOSING BLOCKQUOTE (.market-risk-quote)
   Standard end-of-page sign-off for public pages. Tokens follow the
   Alerts & Callouts spec in the webpage-design skill.
========================================================================== */
blockquote.market-risk-quote {
    border-left: 3px solid var(--brand-action, #FF4F00);
    background: var(--brand-action-light, rgba(255, 79, 0, 0.08));
    border-radius: 0 6px 6px 0;
    margin: 22px 0 36px;
    padding: 14px 18px;
    color: var(--text-secondary, #374151);
    font-size: 1.08rem;
    line-height: 1.6;
}
