
        * { box-sizing: border-box; }
        html { scroll-behavior: smooth; }

        body {
            margin: 0;
            font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
            background: #f4f7f6;
            color: #0f172a;
        }

        a { color: inherit; }

        .container {
            width: min(94vw, 1180px);
            margin: 0 auto;
        }

        .topbar {
            background: #020617;
            color: #fff;
            padding: 18px 0;
        }

        .topbar-inner {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 24px;
        }

        .brand {
            font-weight: 900;
            letter-spacing: 1px;
            font-size: 22px;
            text-decoration: none;
        }

        .brand span { color: #22c55e; }

        .nav {
            display: flex;
            gap: 22px;
            align-items: center;
            flex-wrap: wrap;
        }

        .nav a {
            color: #e5e7eb;
            text-decoration: none;
            font-weight: 700;
            font-size: 15px;
        }

        .nav a:hover { color: #22c55e; }

        .hero {
            position: relative;
            overflow: hidden;
            background:
                radial-gradient(circle at 78% 18%, rgba(34,197,94,0.32), transparent 24%),
                radial-gradient(circle at 15% 80%, rgba(59,130,246,0.25), transparent 28%),
                linear-gradient(135deg, #020617 0%, #07152d 48%, #0f172a 100%);
            color: #fff;
            padding: 74px 0 78px;
        }

        .hero::before {
            content: "";
            position: absolute;
            inset: 0;
            opacity: 0.16;
            background-image:
                linear-gradient(rgba(255,255,255,.10) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px);
            background-size: 46px 46px;
        }

        .hero-inner {
            position: relative;
            z-index: 2;
            max-width: 900px;
        }

        .eyebrow {
            color: #93c5fd;
            font-size: 14px;
            font-weight: 900;
            letter-spacing: 2px;
            margin-bottom: 18px;
        }

        .hero h1 {
            font-size: clamp(44px, 5vw, 72px);
            line-height: 1.02;
            letter-spacing: -2px;
            margin: 0 0 22px;
            color: #fff;
        }

        .hero h1 span {
            display: block;
            color: #22c55e;
        }

        .hero p {
            color: #dbeafe;
            font-size: 18px;
            line-height: 1.65;
            max-width: 800px;
            margin: 0;
        }

        main { padding: 30px 0 20px; }

        .disclaimer {
            margin: 0 0 28px;
            background: #fff8e1;
            border: 1px solid #f0d77a;
            border-left: 5px solid #f59e0b;
            color: #4b3b00;
            padding: 14px 18px;
            border-radius: 10px;
            line-height: 1.45;
        }

        .card {
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 18px;
            padding: 30px;
            box-shadow: 0 2px 18px rgba(0,0,0,.08);
            margin-bottom: 28px;
        }

        .card h2 {
            margin: 0 0 10px;
            font-size: 30px;
            color: #0f172a;
        }

        .card p {
            color: #475569;
            line-height: 1.6;
            margin-top: 0;
            font-size: 16px;
        }

        .search-card {
            background: linear-gradient(135deg, #ecfdf5, #fff);
        }

        .search-box {
            display: flex;
            gap: 12px;
            margin-top: 22px;
        }

        .search-box input {
            flex: 1;
            min-width: 0;
            padding: 14px;
            border: 1px solid #cbd5e1;
            border-radius: 9px;
            font-size: 15px;
            font-family: inherit;
        }

        .search-box button {
            padding: 14px 24px;
            background: #2563eb;
            color: #fff;
            border: none;
            border-radius: 9px;
            cursor: pointer;
            font-weight: 900;
            font-family: inherit;
        }

        .search-box button:hover { background: #1d4ed8; }

        .engine-status {
            padding: 14px;
            border-radius: 10px;
            text-align: center;
            font-weight: 800;
            border: 1px solid #ddd;
            margin-bottom: 28px;
        }

        .analysis-header {
            text-align: center;
        }

        .analysis-header h2 {
            font-size: 34px;
            margin-bottom: 16px;
        }

        .summary-badges {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            margin-bottom: 14px;
        }

        .rec-box,
        .quality-pill,
        .metric-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            border-radius: 999px;
            padding: 9px 14px;
            font-weight: 900;
            font-size: 14px;
            white-space: nowrap;
            border: 1px solid transparent;
        }

        .rec-box {
            font-size: 18px;
            padding: 13px 26px;
            box-shadow: 0 4px 14px rgba(0,0,0,.12);
        }

        .rec-strong-buy {
            background: #dcfce7;
            color: #14532d;
            border-color: #86efac;
        }

        .rec-buy {
            background: #ecfdf5;
            color: #166534;
            border-color: #bbf7d0;
        }

        .rec-quality-hold {
            background: #fef3c7;
            color: #92400e;
            border-color: #f59e0b;
        }

        .rec-hold {
            background: #f1f5f9;
            color: #475569;
            border-color: #cbd5e1;
        }

        .rec-sell {
            background: #fee2e2;
            color: #991b1b;
            border-color: #fecaca;
        }

        .rec-strong-sell {
            background: #fecaca;
            color: #7f1d1d;
            border-color: #ef4444;
        }

        .quality-pill {
            background: #eff6ff;
            color: #1e40af;
            border-color: #bfdbfe;
        }

        .quality-a-plus,
        .quality-a {
            background: #ecfdf5;
            color: #065f46;
            border-color: #a7f3d0;
        }

        .quality-b {
            background: #eff6ff;
            color: #1d4ed8;
            border-color: #bfdbfe;
        }

        .quality-c {
            background: #f8fafc;
            color: #64748b;
            border-color: #cbd5e1;
        }

        .metric-pill {
            background: #f8fafc;
            color: #334155;
            border-color: #cbd5e1;
        }

        .opportunity-note {
            margin: 10px auto 0;
            max-width: 860px;
            color: #334155;
            font-weight: 800;
            line-height: 1.5;
        }

        .quality-hold-note {
            display: none;
            margin: 12px auto 0;
            max-width: 860px;
            background: #fffbeb;
            border: 1px solid #fde68a;
            border-left: 5px solid #f59e0b;
            color: #78350f;
            padding: 12px 14px;
            border-radius: 10px;
            line-height: 1.5;
            text-align: left;
        }

        .explanation {
            color: #475569;
            margin: 14px auto 0;
            line-height: 1.6;
            max-width: 860px;
            font-size: 16px;
        }

        .indicator-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 14px;
            margin-bottom: 26px;
        }

        .ind-item {
            background: #f8fafc;
            padding: 16px;
            border-radius: 14px;
            border: 1px solid #e5e7eb;
            text-align: center;
            min-height: 88px;
        }

        .ind-item strong {
            display: block;
            color: #2563eb;
            margin-bottom: 7px;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: .5px;
        }

        .ind-item span {
            display: block;
            color: #0f172a;
            font-size: 18px;
            font-weight: 900;
        }

        .quality-reasons {
            display: none;
            background: #f8fafc;
            border: 1px solid #e5e7eb;
            border-radius: 14px;
            padding: 18px;
            margin: 0 0 26px;
        }

        .quality-reasons h3 {
            margin: 0 0 10px;
            color: #0f172a;
            font-size: 20px;
        }

        .quality-reasons ul {
            margin: 0;
            padding-left: 20px;
            color: #475569;
            line-height: 1.6;
        }

        .chart-card-title {
            margin: 0 0 14px;
            font-size: 22px;
            color: #0f172a;
        }

        .chart-wrap {
            height: 340px;
            background: #f8fafc;
            border: 1px solid #e5e7eb;
            border-radius: 14px;
            padding: 16px;
        }

        .seo-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 18px;
            margin-top: 20px;
        }

        .seo-item {
            background: #f8fafc;
            border: 1px solid #e5e7eb;
            border-radius: 14px;
            padding: 18px;
        }

        .seo-item strong {
            display: block;
            color: #065f46;
            margin-bottom: 8px;
            font-size: 16px;
        }

        .seo-item span {
            color: #475569;
            font-size: 14px;
            line-height: 1.5;
        }

        .methodology-section {
            background: linear-gradient(135deg, #ecfdf5, #fff);
        }

        .methodology-section ul {
            color: #475569;
            line-height: 1.65;
            padding-left: 22px;
            margin-bottom: 0;
        }

        .alpha-analysis-cta {
            background: linear-gradient(135deg, #020617, #111827);
            color: #fff;
            text-align: center;
            border-radius: 20px;
            padding: 34px;
            margin-bottom: 50px;
        }

        .alpha-analysis-cta h2 {
            margin: 0 0 10px;
            font-size: 30px;
            color: #fff;
        }

        .alpha-analysis-cta p {
            color: #cbd5e1;
            max-width: 820px;
            margin: 0 auto 20px;
            line-height: 1.55;
        }

        .btn-primary,
        .btn-secondary {
            display: inline-block;
            padding: 13px 25px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 900;
            border: none;
            cursor: pointer;
            font-size: 15px;
        }

        .btn-primary {
            background: #22c55e;
            color: #052e16;
        }

        .btn-primary:hover {
            background: #16a34a;
            color: #fff;
        }

        .btn-secondary {
            background: rgba(255,255,255,.10);
            color: #fff;
            border: 1px solid rgba(203,213,225,.70);
            margin-left: 10px;
        }

        .btn-secondary:hover {
            background: #fff;
            color: #0f172a;
        }

        .alpha-analysis-note {
            margin-top: 14px;
            font-size: 14px;
            color: #d1d5db;
        }

        .site-footer {
            margin-top: 30px;
            padding: 34px 0;
            background: #020617;
            color: #cbd5e1;
            border-top: 1px solid rgba(255,255,255,0.12);
        }

        .footer-inner {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
        }

        .footer-brand {
            font-weight: 900;
            color: #fff;
            margin-bottom: 6px;
        }

        .footer-brand span { color: #22c55e; }

        .footer-copy {
            font-size: 14px;
            color: #94a3b8;
        }

        .footer-nav {
            display: flex;
            gap: 18px;
            flex-wrap: wrap;
        }

        .footer-nav a {
            color: #cbd5e1;
            text-decoration: none;
            font-size: 14px;
            font-weight: 700;
        }

        .footer-nav a:hover { color: #22c55e; }

        @media (max-width: 1000px) {
            .indicator-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .seo-grid {
                grid-template-columns: 1fr;
            }

            .topbar-inner {
                flex-direction: column;
                align-items: flex-start;
            }
        }

        @media (max-width: 700px) {
            .container {
                width: 100%;
                padding: 0 16px;
            }

            .hero {
                padding: 52px 0 58px;
                text-align: center;
            }

            .hero h1 {
                font-size: 40px;
                letter-spacing: -1px;
            }

            .hero p {
                font-size: 16px;
                line-height: 1.55;
            }

            .card {
                padding: 20px;
                border-radius: 14px;
            }

            .card h2 {
                font-size: 24px;
            }

            .analysis-header h2 {
                font-size: 28px;
            }

            .search-box {
                flex-direction: column;
            }

            .search-box button {
                width: 100%;
            }

            .indicator-grid {
                grid-template-columns: 1fr;
            }

            .chart-wrap {
                height: 300px;
                padding: 10px;
            }

            .alpha-analysis-cta {
                padding: 26px 18px;
            }

            .alpha-analysis-cta h2 {
                font-size: 24px;
            }

            .btn-secondary {
                margin-left: 0;
                margin-top: 10px;
            }

            .footer-inner {
                flex-direction: column;
                align-items: flex-start;
            }
        }


.hidden {
    display: none !important;
}

.engine-status.status-loading {
    display: block;
    background-color: #fff3cd;
    color: #4b3b00;
}

.engine-status.status-online {
    display: block;
    background-color: #d4edda;
    color: #065f46;
}

.engine-status.status-warning {
    display: block;
    background-color: #fff3cd;
    color: #92400e;
}

/* =========================================================
   TradingView Lightweight Charts
========================================================= */

.price-chart {
    width: 100%;
    height: 100%;
    min-height: 380px;
}

.chart-wrap {
    height: 380px;
    margin-bottom: 55px;
    overflow: hidden;
    position: relative;
}

.price-chart {
    position: relative;
    overflow: hidden;
}

.chart-zone,
.chart-profit-zone,
.chart-risk-zone {
    display: none !important;
}

.chart-legend {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.78rem;
    color: #334155;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    pointer-events: none;
    line-height: 1.45;
}

.chart-legend strong {
    color: #0f172a;
}

.chart-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}

.chart-card-title {
    margin-bottom: 4px;
}

.chart-subtitle {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.chart-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.chart-toolbar button {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.chart-toolbar button[aria-pressed="true"] {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.chart-toolbar button:hover {
    border-color: #2563eb;
}

@media (max-width: 700px) {
    .chart-header-row {
        flex-direction: column;
    }

    .chart-toolbar {
        justify-content: flex-start;
    }
}

.chart-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}

.chart-card-title {
    margin-bottom: 4px;
}

.chart-subtitle {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.chart-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.chart-toolbar button {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.chart-toolbar button[aria-pressed="true"] {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.chart-toolbar button:hover {
    border-color: #2563eb;
}

@media (max-width: 700px) {
    .chart-header-row {
        flex-direction: column;
    }

    .chart-toolbar {
        justify-content: flex-start;
    }
}

.chart-toolbar button::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
    margin-right: 6px;
    background: #94a3b8;
}

.chart-toolbar button[data-chart-toggle="volume"]::before {
    background: #64748b;
}

.chart-toolbar button[data-chart-toggle="ma20"]::before {
    background: #2563eb;
}

.chart-toolbar button[data-chart-toggle="ma50"]::before {
    background: #9333ea;
}

.chart-toolbar button[data-chart-toggle="ma200"]::before {
    background: #f97316;
}

.chart-toolbar button[data-chart-toggle="trade"]::before {
    background: #16a34a;
}

.chart-toolbar button[aria-pressed="false"] {
    background: #f8fafc;
    border-color: #e5e7eb;
    color: #94a3b8;
    opacity: 0.75;
}

.chart-toolbar button[aria-pressed="false"]::before {
    background: #cbd5e1;
}

.chart-note {
    margin-top: 28px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.indicator-panel-wrap {
    margin-top: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 16px 16px;
}

.indicator-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
}

.indicator-panel-header strong {
    color: #0f172a;
    font-weight: 900;
}

.indicator-panel-header span {
    color: #64748b;
    font-weight: 700;
}

.indicator-chart {
    width: 100%;
    height: 140px;
}

/* =========================================================
   StockScreen Chart 3.0 controls
========================================================= */

.chart-toolbar-pro {
    align-items: center;
}

.chart-toolbar-divider {
    width: 1px;
    height: 28px;
    background: #cbd5e1;
    display: inline-block;
    margin: 0 2px;
}

.chart-toolbar button[data-chart-zoom],
.chart-toolbar button[data-chart-action] {
    background: #ffffff;
}

.chart-toolbar button[data-chart-zoom].active-zoom {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1d4ed8;
}

.chart-toolbar button[data-chart-toggle="rsi"]::before {
    background: #2563eb;
}

.chart-toolbar button[data-chart-toggle="macd"]::before {
    background: #f97316;
}

.chart-toolbar button[data-chart-zoom]::before,
.chart-toolbar button[data-chart-action]::before {
    display: none;
}

.chart-export-status {
    margin-top: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.chart-empty-message {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: 800;
    text-align: center;
}

.chart-legend {
    min-width: 210px;
    max-width: 260px;
}

.chart-legend-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 6px;
}

.chart-legend-title strong {
    color: #0f172a;
    font-size: 0.86rem;
}

.chart-legend-title span,
.chart-legend-muted {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
}

.chart-legend-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
}

.chart-legend-table td {
    padding: 2px 0;
    font-size: 0.72rem;
    white-space: nowrap;
}

.chart-legend-table td:first-child {
    color: #64748b;
    font-weight: 800;
    padding-right: 12px;
}

.chart-legend-table td:last-child {
    color: #0f172a;
    font-weight: 900;
    text-align: right;
}

.chart-legend-footer {
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid #e5e7eb;
    color: #065f46;
    font-size: 0.72rem;
    font-weight: 900;
}

.chart-fullscreen-mode {
    position: fixed !important;
    inset: 16px !important;
    z-index: 9999 !important;
    overflow: auto !important;
    margin: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35) !important;
}

.chart-fullscreen-mode .chart-wrap {
    height: 62vh;
}

.chart-fullscreen-mode .indicator-chart {
    height: 18vh;
    min-height: 135px;
}

body.chart-fullscreen-active {
    overflow: hidden;
}

@media (max-width: 700px) {
    .chart-toolbar-divider {
        display: none;
    }

    .chart-toolbar-pro {
        justify-content: flex-start;
    }

    .chart-legend {
        max-width: calc(100% - 24px);
        min-width: 0;
    }

    .chart-fullscreen-mode {
        inset: 6px !important;
    }
}
