.tuihocta-market-dashboard:not(.is-commentary-loaded) {
    position: relative;
    min-height: 520px;
}

.tuihocta-market-dashboard:not(.is-commentary-loaded) > * {
    visibility: hidden !important;
}

.tuihocta-market-dashboard:not(.is-commentary-loaded)::before {
    position: absolute;
    z-index: 3;
    top: 48px;
    left: 50%;
    width: 34px;
    height: 34px;
    border: 3px solid #dbe4ef;
    border-top-color: #2c66ff;
    border-radius: 50%;
    content: '';
    animation: tuihocta-dashboard-loading .8s linear infinite;
}

@keyframes tuihocta-dashboard-loading {
    to { transform: rotate(360deg); }
}

.tuihocta-dashboard-hero.has-daily-commentary {
    grid-template-columns: minmax(300px, .92fr) minmax(430px, 1.34fr) minmax(210px, .48fr);
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.tuihocta-dashboard-hero.has-daily-commentary > .tuihocta-dashboard-hero-intro,
.tuihocta-dashboard-hero.has-daily-commentary > .tuihocta-dashboard-hero-score {
    min-width: 0;
    padding: 32px;
}

.tuihocta-dashboard-hero.has-daily-commentary > .tuihocta-dashboard-hero-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tuihocta-dashboard-hero.has-daily-commentary > .tuihocta-dashboard-hero-score {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}

.tuihocta-dashboard-hero-score > [data-market-score-gauge] {
    margin: auto;
}

.tuihocta-dashboard-daily-commentary {
    display: grid;
    align-content: center;
    gap: 10px;
    min-width: 0;
    padding: 30px 32px;
    border: 0;
    border-right: 1px solid rgba(44, 102, 255, .13);
    border-left: 1px solid rgba(44, 102, 255, .13);
    border-radius: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .32));
    box-shadow: none;
}

.tuihocta-commentary-kicker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tuihocta-commentary-kicker > span {
    color: #2c66ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
}

.tuihocta-dashboard-daily-commentary h2 {
    margin: 0;
    color: #172033;
    font-size: clamp(20px, 1.8vw, 28px);
    line-height: 1.2;
}

.tuihocta-dashboard-daily-commentary > p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.55;
}

.tuihocta-commentary-context {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.tuihocta-commentary-context > span {
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid rgba(44, 102, 255, .10);
    border-radius: 9px;
    background: rgba(241, 245, 249, .72);
}

.tuihocta-commentary-context small {
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .02em;
}

.tuihocta-commentary-context strong {
    display: block;
    overflow: hidden;
    color: #172033;
    font-size: 10px;
    line-height: 1.3;
    text-overflow: ellipsis;
}

.tuihocta-commentary-transition {
    margin: -2px 0 0 !important;
    color: #64748b !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
}

.tuihocta-commentary-transition strong {
    color: #475569;
}

.tuihocta-commentary-evidence {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tuihocta-commentary-evidence span {
    display: inline-flex;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
}

.tuihocta-commentary-evidence span.is-positive {
    background: #ecfdf5;
    color: #047857;
}

.tuihocta-commentary-evidence span.is-negative {
    background: #fef2f2;
    color: #b91c1c;
}

.tuihocta-commentary-action {
    display: flex;
    gap: 6px;
    color: #334155;
    font-size: 12px;
    line-height: 1.45;
}

.tuihocta-dashboard-daily-commentary > small {
    color: #94a3b8;
    font-size: 10px;
}

.tuihocta-commentary-more {
    justify-self: start;
    padding: 8px 12px;
    border: 0;
    border-radius: 9px;
    background: #2c66ff;
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.tuihocta-commentary-more:hover {
    background: #1d4ed8;
}

.tuihocta-commentary-dialog {
    width: min(1520px, calc(100vw - 24px));
    max-width: none;
    max-height: calc(100vh - 24px);
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: #fff;
    color: #172033;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .28);
}

.tuihocta-commentary-dialog::backdrop {
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(3px);
}

.tuihocta-commentary-dialog-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
    overflow: hidden;
}

.tuihocta-commentary-dialog-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 22px 13px;
    border-bottom: 1px solid #e2e8f0;
}

.tuihocta-commentary-dialog-card > header span {
    color: #2c66ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
}

.tuihocta-commentary-dialog-card > header h2 {
    margin: 5px 0 0;
    font-size: 25px;
}

.tuihocta-commentary-dialog-card > header button {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    place-items: center;
    font-size: 24px;
    cursor: pointer;
}

.tuihocta-commentary-dialog-content {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 14px 22px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    scrollbar-color: #94a3b8 #eef2f7;
    scrollbar-width: auto;
}

.tuihocta-commentary-dialog-content::-webkit-scrollbar {
    width: 12px;
}

.tuihocta-commentary-dialog-content::-webkit-scrollbar-track {
    background: #eef2f7;
    border-radius: 999px;
}

.tuihocta-commentary-dialog-content::-webkit-scrollbar-thumb {
    border: 3px solid #eef2f7;
    border-radius: 999px;
    background: #94a3b8;
}

.tuihocta-commentary-dialog-content::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.tuihocta-commentary-scenario-block {
    display: grid;
    gap: 8px;
}

.tuihocta-commentary-scenario-heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.tuihocta-commentary-scenario-heading strong {
    font-size: 14px;
}

.tuihocta-commentary-scenario-heading span {
    color: #64748b;
    font-size: 11px;
}

.tuihocta-commentary-scenario-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tuihocta-commentary-scenario-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 14px;
    padding: 12px 14px;
    border: 1px solid #dbe4ef;
    border-top: 3px solid #f59e0b;
    border-radius: 13px;
    background: #fff;
}

.tuihocta-commentary-scenario-card.is-low {
    border-top-color: #dc2626;
}

.tuihocta-commentary-scenario-card.is-high {
    border-top-color: #16a34a;
}

.tuihocta-commentary-scenario-card span {
    color: #64748b;
    font-size: 11px;
}

.tuihocta-commentary-scenario-card h3 {
    margin: 2px 0 0;
    font-size: 15px;
}

.tuihocta-commentary-scenario-card > strong {
    align-self: center;
    color: #172033;
    font-size: 22px;
}

.tuihocta-commentary-scenario-card > strong small {
    margin-left: 3px;
    color: #64748b;
    font-size: 10px;
}

.tuihocta-commentary-scenario-progress {
    grid-column: 1 / -1;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf5;
}

.tuihocta-commentary-scenario-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #f59e0b;
}

.tuihocta-commentary-scenario-card.is-low .tuihocta-commentary-scenario-progress i {
    background: #dc2626;
}

.tuihocta-commentary-scenario-card.is-high .tuihocta-commentary-scenario-progress i {
    background: #16a34a;
}

.tuihocta-commentary-scenario-card > p {
    grid-column: 1 / -1;
    margin: 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.4;
}

.tuihocta-commentary-section-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 9px;
    min-height: 0;
}

.tuihocta-commentary-section-list article {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 13px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #94a3b8;
    border-radius: 14px;
    background: #f8fafc;
}

.tuihocta-commentary-section-list article.is-positive {
    border-left-color: #16a34a;
}

.tuihocta-commentary-section-list article.is-negative {
    border-left-color: #dc2626;
}

.tuihocta-commentary-section-list article.is-confirmed {
    border-left-color: #2563eb;
}

.tuihocta-commentary-step {
    display: grid;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e8efff;
    color: #2c66ff;
    place-items: center;
    font-weight: 800;
}

.tuihocta-commentary-section-list h3 {
    margin: 1px 0 4px;
    font-size: 15px;
}

.tuihocta-commentary-section-list p {
    margin: 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.4;
}

.tuihocta-commentary-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 7px;
}

.tuihocta-commentary-metrics span {
    display: inline-flex;
    gap: 6px;
    padding: 4px 7px;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    font-size: 11px;
}

.tuihocta-commentary-metrics strong {
    color: #172033;
}

.tuihocta-commentary-dialog-card > footer {
    padding: 11px 22px 13px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.tuihocta-commentary-dialog-card > footer p {
    margin: 3px 0;
    color: #334155;
}

.tuihocta-commentary-dialog-card > footer small {
    color: #94a3b8;
    font-size: 10px;
}

.tuihocta-market-dashboard.is-commentary-priority-layout
    .tuihocta-dashboard-regime-metric-card {
    display: none !important;
}

.tuihocta-market-dashboard.is-commentary-priority-layout
    .tuihocta-dashboard-regime-panel {
    grid-template-columns: minmax(0, 1fr) !important;
}

.tuihocta-dashboard-components-priority {
    width: 100%;
    margin-top: 24px !important;
}

.tuihocta-dashboard-components-priority > h2 {
    margin-bottom: 14px !important;
}

.tuihocta-dashboard-components-priority [data-dashboard-components] {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.tuihocta-market-dashboard
[data-dashboard-breadth].tuihocta-breadth-chart-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 18px !important;
}

.tuihocta-market-dashboard
[data-dashboard-breadth]
.tuihocta-breadth-chart-card {
    grid-column: span 2 !important;
    min-width: 0;
    min-height: 430px;
    padding: 20px;
    border: 1px solid #dbe4ef;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .045);
}

.tuihocta-market-dashboard.is-commentary-priority-layout
.tuihocta-dashboard-market-health-card {
    display: block !important;
    width: 100%;
    max-width: none;
    min-height: 430px;
    margin: 24px 0 !important;
    padding: 24px;
}

.tuihocta-dashboard-market-health-card .tuihocta-breadth-chart-header h2 {
    margin: 5px 0 4px;
    color: #0f172a;
    font-size: clamp(24px, 2.3vw, 34px);
    line-height: 1.15;
}

.tuihocta-dashboard-market-health-card .tuihocta-breadth-chart-header small {
    display: block;
    color: #64748b;
    font-size: 13px;
}

.tuihocta-dashboard-market-health-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin: 18px 0 2px;
    color: #475569;
    font-size: 13px;
}

.tuihocta-dashboard-market-health-summary span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tuihocta-dashboard-market-health-summary i {
    width: 10px;
    height: 3px;
    border-radius: 999px;
}

.tuihocta-dashboard-market-health-summary .is-vnindex {
    background: #2563eb;
}

.tuihocta-dashboard-market-health-summary .is-health {
    background: #16a34a;
}

.tuihocta-dashboard-market-health-summary strong {
    color: #0f172a;
}

.tuihocta-dashboard-market-health-summary small {
    margin-left: auto;
    color: #64748b;
}

.tuihocta-market-dashboard.is-commentary-priority-layout
.tuihocta-dashboard-market-health-echart {
    width: 100% !important;
    height: 300px !important;
    min-height: 300px !important;
    margin-top: 10px;
}

.tuihocta-dashboard-market-health-echart svg {
    display: block;
    width: 100%;
    height: 100%;
}

.tuihocta-dashboard-market-health-empty {
    display: grid;
    height: 100%;
    margin: 0;
    color: #64748b;
    place-items: center;
}

@media (max-width: 1180px) {
    .tuihocta-dashboard-hero.has-daily-commentary {
        grid-template-columns: minmax(0, 1fr) 220px;
    }

    .tuihocta-dashboard-daily-commentary {
        grid-column: 1 / -1;
        grid-row: 2;
        border: 0;
        border-top: 1px solid rgba(44, 102, 255, .13);
        background: rgba(255, 255, 255, .42);
    }

    .tuihocta-dashboard-components-priority [data-dashboard-components] {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .tuihocta-market-dashboard
    [data-dashboard-breadth].tuihocta-breadth-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .tuihocta-market-dashboard
    [data-dashboard-breadth]
    .tuihocta-breadth-chart-card {
        grid-column: span 1 !important;
    }

    .tuihocta-dashboard-market-health-summary small {
        width: 100%;
        margin-left: 0;
    }

    .tuihocta-commentary-dialog {
        width: calc(100vw - 20px);
    }
}

@media (max-width: 767px) {
    .tuihocta-dashboard-hero.has-daily-commentary {
        grid-template-columns: 1fr;
    }

    .tuihocta-dashboard-daily-commentary {
        grid-column: auto;
        grid-row: auto;
        padding: 22px;
    }

    .tuihocta-dashboard-hero.has-daily-commentary > .tuihocta-dashboard-hero-intro,
    .tuihocta-dashboard-hero.has-daily-commentary > .tuihocta-dashboard-hero-score {
        padding: 24px 22px;
    }

    .tuihocta-dashboard-hero.has-daily-commentary > .tuihocta-dashboard-hero-score {
        border-top: 1px solid rgba(44, 102, 255, .13);
    }

    .tuihocta-commentary-action {
        display: block;
    }

    .tuihocta-commentary-dialog-card > header,
    .tuihocta-commentary-dialog-content,
    .tuihocta-commentary-dialog-card > footer {
        padding-inline: 18px;
    }

    .tuihocta-commentary-dialog {
        width: calc(100vw - 12px);
        max-height: calc(100vh - 12px);
        border-radius: 16px;
    }

    .tuihocta-commentary-dialog-card {
        height: calc(100vh - 12px);
        max-height: calc(100vh - 12px);
    }

    .tuihocta-commentary-scenario-grid,
    .tuihocta-commentary-section-list,
    .tuihocta-dashboard-components-priority [data-dashboard-components] {
        grid-template-columns: 1fr !important;
    }

    .tuihocta-market-dashboard
    [data-dashboard-breadth].tuihocta-breadth-chart-grid {
        grid-template-columns: 1fr !important;
    }

    .tuihocta-market-dashboard.is-commentary-priority-layout
    .tuihocta-dashboard-market-health-card {
        min-height: 390px;
        padding: 18px;
    }

    .tuihocta-market-dashboard.is-commentary-priority-layout
    .tuihocta-dashboard-market-health-echart {
        height: 250px !important;
        min-height: 250px !important;
    }

    .tuihocta-commentary-scenario-heading {
        display: grid;
        gap: 2px;
    }

    .tuihocta-commentary-section-list article {
        grid-template-columns: 28px minmax(0, 1fr);
        padding: 13px;
    }
}

@media (max-width: 760px) {
    .tuihocta-commentary-context {
        grid-template-columns: 1fr;
    }
}
