/* ===== Sidebar rail ===== */

.stock-sidepanel-rail {
    position: sticky;
    top: 88px;
    background:
        radial-gradient(circle at top left, rgba(23, 92, 211, 0.07), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid #dfe8f2;
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
    overflow: visible;
}

.stock-sidepanel-rail__head {
    position: relative;
    padding: 18px 18px 14px;
    border-bottom: 1px solid #edf2f7;
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
    border-radius: 24px 24px 0 0;
}

.stock-sidepanel-rail__head::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #175cd3 0%, #6ea8fe 100%);
    border-radius: 24px 24px 0 0;
}

.stock-sidepanel-rail__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef4ff;
    color: #175cd3;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}

.stock-sidepanel-rail__title {
    margin: 0 0 6px;
    color: #182230;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.7;
    letter-spacing: -0.01em;
}

.stock-sidepanel-rail__text {
    margin: 0;
    color: #667085;
    font-size: 0.86rem;
    line-height: 1.9;
}

.stock-sidepanel-rail__body {
    padding: 12px;
}

.stock-sidepanel-group {
    position: relative;
}

.stock-sidepanel-group + .stock-sidepanel-group {
    margin-top: 12px;
}

.stock-sidepanel-group__shell {
    position: relative;
    padding: 14px 14px 12px;
    border: 1px solid #e9eef5;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.035);
    overflow: hidden;
}

.stock-sidepanel-group__shell::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: #1570ef;
}

.stock-sidepanel-group[data-accent="positive"] .stock-sidepanel-group__shell::before { background: #12b76a; }
.stock-sidepanel-group[data-accent="negative"] .stock-sidepanel-group__shell::before { background: #f04438; }
.stock-sidepanel-group[data-accent="neutral"] .stock-sidepanel-group__shell::before  { background: #d7b23b; }
.stock-sidepanel-group[data-accent="unavailable"] .stock-sidepanel-group__shell::before { background: #98a2b3; }

.stock-sidepanel-group__head {
    margin-bottom: 10px;
}

.stock-sidepanel-group__title {
    margin: 0;
    color: #243447;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.7;
}

.stock-sidepanel-group__items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stock-sidepanel-metric {
    padding: 10px 10px 9px;
    border: 1px solid #eef2f6;
    border-radius: 14px;
    background: #ffffff;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.stock-sidepanel-metric:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(16, 24, 40, 0.045);
    border-color: #dce5ef;
}

.stock-sidepanel-metric__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.stock-sidepanel-metric__label {
    color: #5f6c7b;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.75;
}

.stock-sidepanel-metric__value {
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.75;
    word-break: break-word;
}

.stock-sidepanel-metric__link {
    color: inherit;
    text-decoration: none;
}

.stock-sidepanel-metric__link:hover {
    text-decoration: underline;
}

.stock-sidepanel-metric[data-status="positive"] .stock-sidepanel-metric__value { color: #0f9f5f; }
.stock-sidepanel-metric[data-status="negative"] .stock-sidepanel-metric__value { color: #d92d20; }
.stock-sidepanel-metric[data-status="neutral"] .stock-sidepanel-metric__value  { color: #b7791f; }
.stock-sidepanel-metric[data-status="info"] .stock-sidepanel-metric__value     { color: #175cd3; }
.stock-sidepanel-metric[data-status="unavailable"] .stock-sidepanel-metric__value { color: #667085; }

@media (max-width: 991.98px) {
    .stock-sidepanel-rail {
        position: static;
        top: auto;
        margin-top: 18px;
        border-radius: 20px;
    }

    .stock-sidepanel-rail__head {
        border-radius: 20px 20px 0 0;
    }
}

@media (max-width: 767.98px) {
    .stock-sidepanel-rail__head {
        padding: 16px 16px 12px;
    }

    .stock-sidepanel-rail__eyebrow {
        margin-bottom: 8px;
        font-size: 0.74rem;
    }

    .stock-sidepanel-rail__title {
        font-size: 1rem;
    }

    .stock-sidepanel-rail__text {
        font-size: 0.83rem;
    }

    .stock-sidepanel-rail__body {
        padding: 10px;
    }

    .stock-sidepanel-group__shell {
        padding: 12px 12px 10px;
        border-radius: 16px;
    }

    .stock-sidepanel-group__title {
        font-size: 0.86rem;
    }

    .stock-sidepanel-metric {
        padding: 9px 10px 8px;
        border-radius: 13px;
    }

    .stock-sidepanel-metric__label {
        font-size: 0.79rem;
    }

    .stock-sidepanel-metric__value {
        font-size: 0.95rem;
        line-height: 1.7;
    }
}

/* ===== Shared help popover ===== */

.stock-help-trigger {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 0;
    border-radius: 999px;
    background: #eef4ff;
    color: #175cd3;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.stock-help-trigger:hover {
    transform: translateY(-1px);
    background: #dfeaff;
}

.stock-help-popover {
    position: absolute;
    z-index: 1080;
    max-width: 280px;
    padding: 10px 12px;
    background: #101828;
    color: #fff;
    border-radius: 12px;
    font-size: 0.86rem;
    line-height: 1.8;
    box-shadow: 0 16px 32px rgba(16, 24, 40, 0.20);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .16s ease, transform .16s ease;
}

.stock-help-popover.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stock-help-popover::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: #101828;
    transform: rotate(45deg);
    bottom: -5px;
    inset-inline-start: 18px;
}

/* ===== Market outlook section ===== */

.stock-outlook-section {
    margin: 1.75rem 0 2rem;
    padding: 1.35rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid #e6edf3;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.stock-outlook-section__head {
    margin-bottom: 1.25rem;
}

.stock-outlook-section__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f3f7fb;
    color: #1f3b57;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1;
}

.stock-outlook-section__title {
    margin: 0 0 0.55rem;
    color: #182230;
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.55;
}

.stock-outlook-section__intro {
    margin: 0;
    color: #475467;
    font-size: 1rem;
    line-height: 2;
    max-width: 1000px;
}

.stock-outlook-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 16px;
}

.stock-outlook-card {
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
    overflow: hidden;
}

.stock-outlook-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #eef2f6;
    background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.stock-outlook-card__title {
    margin: 0 0 4px;
    color: #182230;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.7;
}

.stock-outlook-card__text {
    margin: 0;
    color: #667085;
    font-size: 0.9rem;
    line-height: 1.8;
}

.stock-outlook-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 16px 0;
}

.stock-outlook-tab {
    border: 1px solid #d9e2ec;
    background: #fff;
    color: #344054;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: all .16s ease;
}

.stock-outlook-tab:hover {
    border-color: #b8c7d8;
    transform: translateY(-1px);
}

.stock-outlook-tab.is-active {
    background: #175cd3;
    border-color: #175cd3;
    color: #fff;
}

.stock-outlook-panels {
    padding: 14px 16px 16px;
}

.stock-outlook-panel {
    display: none;
}

.stock-outlook-panel.is-active {
    display: block;
}

.stock-outlook-panel__top {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.stock-outlook-panel__top--single {
    grid-template-columns: 260px minmax(0, 1fr);
}

.stock-outlook-signal__meta {
    color: #667085;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.7;
    margin-bottom: 8px;
}

.stock-outlook-signal__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 10px;
    border: 1px solid transparent;
}

.stock-outlook-signal__pill[data-status="positive"] {
    background: #ecfdf3;
    color: #0f9f5f;
    border-color: #c7eed8;
}

.stock-outlook-signal__pill[data-status="negative"] {
    background: #fef3f2;
    color: #d92d20;
    border-color: #f4c7c3;
}

.stock-outlook-signal__pill[data-status="neutral"] {
    background: #fffaeb;
    color: #c57a10;
    border-color: #f0dfab;
}

.stock-outlook-signal__pill[data-status="info"] {
    background: #eef4ff;
    color: #175cd3;
    border-color: #c9dbff;
}

.stock-outlook-signal__pill[data-status="unavailable"] {
    background: #f2f4f7;
    color: #667085;
    border-color: #e3e7ee;
}

.stock-outlook-signal__text {
    margin: 0;
    color: #475467;
    font-size: 0.97rem;
    line-height: 2;
}

.stock-gauge {
    --needle-angle: 0deg;
    position: relative;
    width: 260px;
    height: 150px;
    margin: 0 auto;
}

.stock-gauge__arc {
    position: absolute;
    left: 0;
    top: 20px;
    width: 260px;
    height: 130px;
    border-radius: 260px 260px 0 0;
    overflow: hidden;
}

.stock-gauge__arc::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        conic-gradient(
            from 180deg,
            #f04438 0deg 36deg,
            #f79009 36deg 72deg,
            #f2d07b 72deg 108deg,
            #6ad49b 108deg 144deg,
            #12b76a 144deg 180deg
        );
    border-radius: 260px 260px 0 0;
}

.stock-gauge__arc::after {
    content: "";
    position: absolute;
    left: 26px;
    top: 26px;
    width: 208px;
    height: 104px;
    background: #fff;
    border-radius: 208px 208px 0 0;
}

.stock-gauge__needle {
    position: absolute;
    left: 50%;
    bottom: 12px;
    width: 4px;
    height: 92px;
    background: #101828;
    border-radius: 999px;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(var(--needle-angle));
    box-shadow: 0 2px 10px rgba(16, 24, 40, 0.15);
    transition: transform .75s cubic-bezier(.22, 1, .36, 1);
}

.stock-gauge.is-ready .stock-gauge__needle {
    animation: stockNeedleIdle 4.8s ease-in-out infinite 1.1s;
}

.stock-gauge__hub {
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 14px;
    height: 14px;
    background: #101828;
    border-radius: 999px;
    transform: translateX(-50%);
    box-shadow: 0 0 0 0 rgba(16, 24, 40, 0.10);
    animation: stockGaugeHubPulse 3.8s ease-in-out infinite;
}

/* ===== Valuation models section ===== */

.stock-valuation-section {
    margin: 1.75rem 0 2rem;
    padding: 1.35rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid #e6edf3;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.stock-valuation-section__head {
    margin-bottom: 1.15rem;
}

.stock-valuation-section__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f3f7fb;
    color: #1f3b57;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1;
}

.stock-valuation-section__title {
    margin: 0 0 0.55rem;
    color: #182230;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.6;
}

.stock-valuation-section__intro {
    margin: 0;
    color: #475467;
    font-size: 0.98rem;
    line-height: 1.95;
    max-width: 980px;
}

.stock-valuation-hero {
    position: relative;
    margin-top: 1.15rem;
    margin-bottom: 1rem;
    border: 1px solid #d8e6ff;
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(23, 92, 211, 0.08), transparent 38%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    box-shadow: 0 14px 30px rgba(23, 92, 211, 0.08);
    overflow: hidden;
}

.stock-valuation-hero::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100%;
    height: 5px;
    background: #175cd3;
}

.stock-valuation-hero[data-status="positive"]::before { background: #12b76a; }
.stock-valuation-hero[data-status="negative"]::before { background: #f04438; }
.stock-valuation-hero[data-status="neutral"]::before  { background: #f79009; }
.stock-valuation-hero[data-status="unavailable"]::before { background: #98a2b3; }

.stock-valuation-hero__content {
    padding: 20px 22px 18px;
}

.stock-valuation-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef4ff;
    color: #175cd3;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1;
}

.stock-valuation-hero__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.stock-valuation-hero__title {
    margin: 0;
    color: #182230;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.7;
}

.stock-valuation-hero__value {
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 10px;
    word-break: break-word;
}

.stock-valuation-hero[data-status="positive"] .stock-valuation-hero__value { color: #0f9f5f; }
.stock-valuation-hero[data-status="negative"] .stock-valuation-hero__value { color: #d92d20; }
.stock-valuation-hero[data-status="neutral"] .stock-valuation-hero__value  { color: #c57a10; }
.stock-valuation-hero[data-status="info"] .stock-valuation-hero__value     { color: #175cd3; }
.stock-valuation-hero[data-status="unavailable"] .stock-valuation-hero__value { color: #667085; }

.stock-valuation-hero__meta {
    margin: 0;
    color: #475467;
    font-size: 0.95rem;
    line-height: 1.95;
    max-width: 920px;
}

.stock-valuation-grid--secondary {
    margin-top: 0;
}

@media (max-width: 767.98px) {
    .stock-valuation-hero {
        border-radius: 18px;
        margin-bottom: 0.9rem;
    }

    .stock-valuation-hero__content {
        padding: 16px 16px 14px;
    }

    .stock-valuation-hero__title {
        font-size: 1rem;
    }

    .stock-valuation-hero__value {
        font-size: 1.45rem;
        line-height: 1.45;
    }

    .stock-valuation-hero__meta {
        font-size: 0.9rem;
        line-height: 1.9;
    }
}

.stock-valuation-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 1.15rem;
}

.stock-valuation-card {
    position: relative;
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
    overflow: hidden;
}

.stock-valuation-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: #175cd3;
}

.stock-valuation-card[data-status="positive"]::before { background: #12b76a; }
.stock-valuation-card[data-status="negative"]::before { background: #f04438; }
.stock-valuation-card[data-status="neutral"]::before  { background: #f79009; }
.stock-valuation-card[data-status="unavailable"]::before { background: #98a2b3; }

.stock-valuation-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.stock-valuation-card__title {
    margin: 0;
    color: #344054;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.7;
}

.stock-valuation-card__value {
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.6;
    margin-bottom: 8px;
    word-break: break-word;
}

.stock-valuation-card[data-status="positive"] .stock-valuation-card__value { color: #0f9f5f; }
.stock-valuation-card[data-status="negative"] .stock-valuation-card__value { color: #d92d20; }
.stock-valuation-card[data-status="neutral"] .stock-valuation-card__value  { color: #c57a10; }
.stock-valuation-card[data-status="info"] .stock-valuation-card__value     { color: #175cd3; }
.stock-valuation-card[data-status="unavailable"] .stock-valuation-card__value { color: #667085; }

.stock-valuation-card__meta {
    margin: 0;
    color: #667085;
    font-size: 0.88rem;
    line-height: 1.85;
}

.stock-valuation-summary {
    margin-top: 1.15rem;
    padding: 16px 18px;
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.stock-valuation-summary__title {
    margin: 0 0 8px;
    color: #182230;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.7;
}

.stock-valuation-summary__text {
    margin: 0;
    color: #475467;
    font-size: 0.96rem;
    line-height: 2;
}

@media (max-width: 1199.98px) {
    .stock-valuation-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .stock-valuation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .stock-valuation-section {
        padding: 1rem;
        border-radius: 18px;
    }

    .stock-valuation-section__title {
        font-size: 1.25rem;
        line-height: 1.7;
    }

    .stock-valuation-section__intro,
    .stock-valuation-summary__text {
        font-size: 0.93rem;
        line-height: 1.95;
    }

    .stock-valuation-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stock-valuation-card {
        border-radius: 16px;
        padding: 14px;
    }

    .stock-valuation-card__title {
        font-size: 0.9rem;
    }

    .stock-valuation-card__value {
        font-size: 1.08rem;
    }

    .stock-valuation-card__meta {
        font-size: 0.86rem;
    }

    .stock-valuation-summary {
        border-radius: 16px;
        padding: 14px;
    }
}

/* ===== Profitability & growth section ===== */

.stock-profitability-section {
    margin: 1.75rem 0 2rem;
    padding: 1.35rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid #e6edf3;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.stock-profitability-section__head {
    margin-bottom: 1.15rem;
}

.stock-profitability-section__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f3f7fb;
    color: #1f3b57;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1;
}

.stock-profitability-section__title {
    margin: 0 0 0.55rem;
    color: #182230;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.6;
}

.stock-profitability-section__intro {
    margin: 0;
    color: #475467;
    font-size: 0.98rem;
    line-height: 1.95;
    max-width: 980px;
}

.stock-profitability-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 1.15rem;
}

.stock-profitability-card {
    position: relative;
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
    overflow: hidden;
}

.stock-profitability-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: #175cd3;
}

.stock-profitability-card[data-status="positive"]::before { background: #12b76a; }
.stock-profitability-card[data-status="negative"]::before { background: #f04438; }
.stock-profitability-card[data-status="neutral"]::before  { background: #f79009; }
.stock-profitability-card[data-status="unavailable"]::before { background: #98a2b3; }

.stock-profitability-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.stock-profitability-card__title {
    margin: 0;
    color: #344054;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.7;
}

.stock-profitability-card__value {
    font-size: 1.22rem;
    font-weight: 900;
    line-height: 1.6;
    margin-bottom: 8px;
    word-break: break-word;
}

.stock-profitability-card[data-status="positive"] .stock-profitability-card__value { color: #0f9f5f; }
.stock-profitability-card[data-status="negative"] .stock-profitability-card__value { color: #d92d20; }
.stock-profitability-card[data-status="neutral"] .stock-profitability-card__value  { color: #c57a10; }
.stock-profitability-card[data-status="info"] .stock-profitability-card__value     { color: #175cd3; }
.stock-profitability-card[data-status="unavailable"] .stock-profitability-card__value { color: #667085; }

.stock-profitability-card__meta {
    margin: 0;
    color: #667085;
    font-size: 0.88rem;
    line-height: 1.85;
}

.stock-profitability-summary {
    margin-top: 1.15rem;
    padding: 16px 18px;
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.stock-profitability-summary__title {
    margin: 0 0 8px;
    color: #182230;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.7;
}

.stock-profitability-summary__text {
    margin: 0;
    color: #475467;
    font-size: 0.96rem;
    line-height: 2;
}

@media (max-width: 1199.98px) {
    .stock-profitability-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .stock-profitability-section {
        padding: 1rem;
        border-radius: 18px;
    }

    .stock-profitability-section__title {
        font-size: 1.25rem;
        line-height: 1.7;
    }

    .stock-profitability-section__intro,
    .stock-profitability-summary__text {
        font-size: 0.93rem;
        line-height: 1.95;
    }

    .stock-profitability-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stock-profitability-card {
        border-radius: 16px;
        padding: 14px;
    }

    .stock-profitability-card__title {
        font-size: 0.9rem;
    }

    .stock-profitability-card__value {
        font-size: 1.08rem;
    }

    .stock-profitability-card__meta {
        font-size: 0.86rem;
    }

    .stock-profitability-summary {
        border-radius: 16px;
        padding: 14px;
    }
}

/* ===== Quality & risk section ===== */

.stock-quality-section {
    margin: 1.75rem 0 2rem;
    padding: 1.35rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid #e6edf3;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.stock-quality-section__head {
    margin-bottom: 1.15rem;
}

.stock-quality-section__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f3f7fb;
    color: #1f3b57;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1;
}

.stock-quality-section__title {
    margin: 0 0 0.55rem;
    color: #182230;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.6;
}

.stock-quality-section__intro {
    margin: 0;
    color: #475467;
    font-size: 0.98rem;
    line-height: 1.95;
    max-width: 980px;
}

.stock-quality-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-top: 1.15rem;
}

.stock-quality-card {
    position: relative;
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
    overflow: hidden;
}

.stock-quality-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: #175cd3;
}

.stock-quality-card[data-status="positive"]::before { background: #12b76a; }
.stock-quality-card[data-status="negative"]::before { background: #f04438; }
.stock-quality-card[data-status="neutral"]::before  { background: #f79009; }
.stock-quality-card[data-status="unavailable"]::before { background: #98a2b3; }

.stock-quality-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.stock-quality-card__title {
    margin: 0;
    color: #344054;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.7;
}

.stock-quality-card__value {
    font-size: 1.18rem;
    font-weight: 900;
    line-height: 1.6;
    margin-bottom: 8px;
    word-break: break-word;
}

.stock-quality-card[data-status="positive"] .stock-quality-card__value { color: #0f9f5f; }
.stock-quality-card[data-status="negative"] .stock-quality-card__value { color: #d92d20; }
.stock-quality-card[data-status="neutral"] .stock-quality-card__value  { color: #c57a10; }
.stock-quality-card[data-status="info"] .stock-quality-card__value     { color: #175cd3; }
.stock-quality-card[data-status="unavailable"] .stock-quality-card__value { color: #667085; }

.stock-quality-card__meta {
    margin: 0;
    color: #667085;
    font-size: 0.88rem;
    line-height: 1.85;
}

.stock-quality-summary {
    margin-top: 1.15rem;
    padding: 16px 18px;
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.stock-quality-summary__title {
    margin: 0 0 8px;
    color: #182230;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.7;
}

.stock-quality-summary__text {
    margin: 0;
    color: #475467;
    font-size: 0.96rem;
    line-height: 2;
}

@media (max-width: 1399.98px) {
    .stock-quality-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .stock-quality-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .stock-quality-section {
        padding: 1rem;
        border-radius: 18px;
    }

    .stock-quality-section__title {
        font-size: 1.25rem;
        line-height: 1.7;
    }

    .stock-quality-section__intro,
    .stock-quality-summary__text {
        font-size: 0.93rem;
        line-height: 1.95;
    }

    .stock-quality-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stock-quality-card {
        border-radius: 16px;
        padding: 14px;
    }

    .stock-quality-card__title {
        font-size: 0.9rem;
    }

    .stock-quality-card__value {
        font-size: 1.06rem;
    }

    .stock-quality-card__meta {
        font-size: 0.86rem;
    }

    .stock-quality-summary {
        border-radius: 16px;
        padding: 14px;
    }
}

/* ===== Events & dividends section ===== */

.stock-events-section {
    margin: 1.75rem 0 2rem;
    padding: 1.35rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid #e6edf3;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.stock-events-section__head {
    margin-bottom: 1.15rem;
}

.stock-events-section__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f3f7fb;
    color: #1f3b57;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1;
}

.stock-events-section__title {
    margin: 0 0 0.55rem;
    color: #182230;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.6;
}

.stock-events-section__intro {
    margin: 0;
    color: #475467;
    font-size: 0.98rem;
    line-height: 1.95;
    max-width: 980px;
}

.stock-events-highlights {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 1.15rem;
}

.stock-events-highlight {
    position: relative;
    background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
    overflow: hidden;
}

.stock-events-highlight::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: #175cd3;
}

.stock-events-highlight[data-status="positive"]::before { background: #12b76a; }
.stock-events-highlight[data-status="negative"]::before { background: #f04438; }
.stock-events-highlight[data-status="neutral"]::before  { background: #f79009; }
.stock-events-highlight[data-status="unavailable"]::before { background: #98a2b3; }

.stock-events-highlight__head,
.stock-events-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.stock-events-highlight__title,
.stock-events-card__title {
    margin: 0;
    color: #344054;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.7;
}

.stock-events-highlight__value {
    font-size: 1.12rem;
    font-weight: 900;
    line-height: 1.65;
    word-break: break-word;
}

.stock-events-highlight[data-status="positive"] .stock-events-highlight__value { color: #0f9f5f; }
.stock-events-highlight[data-status="negative"] .stock-events-highlight__value { color: #d92d20; }
.stock-events-highlight[data-status="neutral"] .stock-events-highlight__value  { color: #c57a10; }
.stock-events-highlight[data-status="info"] .stock-events-highlight__value     { color: #175cd3; }
.stock-events-highlight[data-status="unavailable"] .stock-events-highlight__value { color: #667085; }

.stock-events-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-top: 1.15rem;
}

.stock-events-card {
    position: relative;
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
    overflow: hidden;
}

.stock-events-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: #175cd3;
}

.stock-events-card[data-status="positive"]::before { background: #12b76a; }
.stock-events-card[data-status="negative"]::before { background: #f04438; }
.stock-events-card[data-status="neutral"]::before  { background: #f79009; }
.stock-events-card[data-status="unavailable"]::before { background: #98a2b3; }

.stock-events-card__value {
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.6;
    margin-bottom: 8px;
    word-break: break-word;
}

.stock-events-card[data-status="positive"] .stock-events-card__value { color: #0f9f5f; }
.stock-events-card[data-status="negative"] .stock-events-card__value { color: #d92d20; }
.stock-events-card[data-status="neutral"] .stock-events-card__value  { color: #c57a10; }
.stock-events-card[data-status="info"] .stock-events-card__value     { color: #175cd3; }
.stock-events-card[data-status="unavailable"] .stock-events-card__value { color: #667085; }

.stock-events-card__meta {
    margin: 0;
    color: #667085;
    font-size: 0.88rem;
    line-height: 1.85;
}

.stock-events-summary {
    margin-top: 1.15rem;
    padding: 16px 18px;
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.stock-events-summary__title {
    margin: 0 0 8px;
    color: #182230;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.7;
}

.stock-events-summary__text {
    margin: 0;
    color: #475467;
    font-size: 0.96rem;
    line-height: 2;
}

@media (max-width: 1399.98px) {
    .stock-events-highlights,
    .stock-events-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .stock-events-section {
        padding: 1rem;
        border-radius: 18px;
    }

    .stock-events-section__title {
        font-size: 1.25rem;
        line-height: 1.7;
    }

    .stock-events-section__intro,
    .stock-events-summary__text {
        font-size: 0.93rem;
        line-height: 1.95;
    }

    .stock-events-highlights,
    .stock-events-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stock-events-highlight,
    .stock-events-card {
        border-radius: 16px;
        padding: 14px;
    }

    .stock-events-highlight__title,
    .stock-events-card__title {
        font-size: 0.9rem;
    }

    .stock-events-highlight__value,
    .stock-events-card__value {
        font-size: 1.05rem;
    }

    .stock-events-card__meta {
        font-size: 0.86rem;
    }

    .stock-events-summary {
        border-radius: 16px;
        padding: 14px;
    }
}

@keyframes stockNeedleIdle {
    0%, 100% {
        transform: translateX(-50%) rotate(var(--needle-angle));
    }
    50% {
        transform: translateX(-50%) rotate(calc(var(--needle-angle) + 1deg));
    }
}

@keyframes stockGaugeHubPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 24, 40, 0.10);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(16, 24, 40, 0.04);
    }
}

.stock-gauge__label {
    position: absolute;
    color: #98a2b3;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
}

/* مهم: استخدم left/right بدل inset-inline حتى لا تنعكس النصوص في RTL */
.stock-gauge__label--ss { left: -2px; top: 80px; }
.stock-gauge__label--s  { left: 10px; top: 40px; }
.stock-gauge__label--n  { left: 50%; top: 6px; transform: translateX(-50%); }
.stock-gauge__label--b  { right: 18px; top: 40px; }
.stock-gauge__label--sb { right: -6px; top: 80px; }

.stock-outlook-panel__top,
.stock-outlook-panel__top--single {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.stock-outlook-signal--below {
    width: 100%;
    text-align: center;
}

.stock-outlook-signal__meta {
    color: #667085;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.7;
    margin-bottom: 8px;
}

.stock-outlook-signal__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 10px;
    border: 1px solid transparent;
}

.stock-outlook-signal__pill[data-status="positive"] {
    background: #ecfdf3;
    color: #0f9f5f;
    border-color: #c7eed8;
}

.stock-outlook-signal__pill[data-status="negative"] {
    background: #fef3f2;
    color: #d92d20;
    border-color: #f4c7c3;
}

.stock-outlook-signal__pill[data-status="neutral"] {
    background: #fffaeb;
    color: #c57a10;
    border-color: #f0dfab;
}

.stock-outlook-signal__pill[data-status="info"] {
    background: #eef4ff;
    color: #175cd3;
    border-color: #c9dbff;
}

.stock-outlook-signal__pill[data-status="unavailable"] {
    background: #f2f4f7;
    color: #667085;
    border-color: #e3e7ee;
}

.stock-outlook-signal__text {
    margin: 0 auto;
    color: #475467;
    font-size: 0.97rem;
    line-height: 2;
    max-width: 92%;
}

.stock-analyst-stack {
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #eef2f6;
    margin: 14px 16px 0;
    display: flex;
}

.stock-analyst-stack__part {
    height: 100%;
}

.stock-analyst-stack__part--buy {
    background: #12b76a;
}

.stock-analyst-stack__part--hold {
    background: #f79009;
}

.stock-analyst-stack__part--sell {
    background: #f04438;
}

.stock-analyst-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 16px 16px;
}

.stock-analyst-stat {
    border: 1px solid #eef2f6;
    border-radius: 16px;
    padding: 12px;
    background: #fcfdff;
    text-align: center;
}

.stock-analyst-stat__label {
    display: block;
    color: #667085;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.6;
    margin-bottom: 4px;
}

.stock-analyst-stat__value {
    display: block;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.4;
}

.stock-analyst-stat__value--buy { color: #0f9f5f; }
.stock-analyst-stat__value--hold { color: #c57a10; }
.stock-analyst-stat__value--sell { color: #d92d20; }

@media (max-width: 1199.98px) {
    .stock-outlook-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .stock-sidepanel-rail {
        position: static;
        top: auto;
        margin-top: 18px;
        border-radius: 18px;
    }

    .stock-sidepanel-rail__head {
        border-radius: 18px 18px 0 0;
    }
}

@media (max-width: 767.98px) {
    .stock-sidepanel-rail__head {
        padding: 14px 14px 10px;
    }

    .stock-sidepanel-rail__title {
        font-size: 1rem;
    }

    .stock-sidepanel-rail__text {
        font-size: 0.84rem;
    }

    .stock-sidepanel-group {
        padding: 10px 14px 12px;
    }

    .stock-sidepanel-group__title {
        font-size: 0.86rem;
    }

    .stock-sidepanel-metric__label {
        font-size: 0.81rem;
    }

    .stock-sidepanel-metric__value {
        font-size: 0.94rem;
        line-height: 1.7;
    }

    .stock-outlook-section {
        padding: 1rem;
        border-radius: 18px;
    }

    .stock-outlook-section__title {
        font-size: 1.28rem;
        line-height: 1.7;
    }

    .stock-outlook-section__intro {
        font-size: 0.94rem;
        line-height: 1.95;
    }

    .stock-outlook-card {
        border-radius: 18px;
    }

    .stock-outlook-card__head {
        padding: 14px;
    }

    .stock-outlook-card__title {
        font-size: 0.98rem;
    }

    .stock-outlook-card__text {
        font-size: 0.86rem;
    }

    .stock-outlook-tabs {
        padding: 12px 14px 0;
    }

    .stock-outlook-tab {
        font-size: 0.84rem;
        padding: 8px 12px;
    }

    .stock-outlook-panels {
        padding: 12px 14px 14px;
    }

.stock-outlook-panel__top,
.stock-outlook-panel__top--single {
    gap: 14px;
}

    .stock-gauge {
        width: 230px;
        height: 140px;
    }

    .stock-gauge__arc {
        width: 230px;
        height: 115px;
    }

    .stock-gauge__arc::after {
        left: 24px;
        top: 24px;
        width: 182px;
        height: 91px;
    }

    .stock-gauge__needle {
        height: 80px;
    }

    .stock-gauge__label {
        font-size: 0.7rem;
    }

    .stock-gauge__label--ss { left: -4px; top: 75px; }
    .stock-gauge__label--s  { left: 8px; top: 40px; }
    .stock-gauge__label--n  { top: 6px; }
    .stock-gauge__label--b  { right: 15px; top: 40px; }
    .stock-gauge__label--sb { right: -8px; top: 75px; }

    .stock-outlook-signal__text {
        font-size: 0.93rem;
        line-height: 1.95;
    }

    .stock-analyst-stats {
        gap: 8px;
        padding: 12px 14px 14px;
    }

    .stock-analyst-stat {
        border-radius: 14px;
        padding: 10px;
    }

    .stock-analyst-stat__value {
        font-size: 1rem;
    }
}
/* ===== Final polish - batch 2 ===== */

/* إيقاع عام أكثر هدوءًا بين الأقسام */
.stock-valuation-section,
.stock-profitability-section,
.stock-quality-section,
.stock-events-section,
.stock-outlook-section {
    margin: 2rem 0 2.2rem;
}

.stock-valuation-section__head,
.stock-profitability-section__head,
.stock-quality-section__head,
.stock-events-section__head,
.stock-outlook-section__head {
    margin-bottom: 1.25rem;
}

/* تحسين بصري لقسم التحليل الفني */
.stock-outlook-grid {
    gap: 18px;
}

.stock-outlook-card--technical {
    border-color: #dce8f8;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.stock-outlook-card--analyst {
    border-color: #e5ebf3;
    background: linear-gradient(180deg, #fcfdff 0%, #ffffff 100%);
}

.stock-outlook-card__head {
    padding: 18px 18px 14px;
}

.stock-outlook-card__title {
    font-size: 1.08rem;
}

.stock-outlook-card__text {
    font-size: 0.92rem;
    line-height: 1.9;
}

.stock-outlook-tabs {
    gap: 10px;
    padding: 16px 18px 0;
}

.stock-outlook-tab {
    min-width: 88px;
    padding: 9px 16px;
    font-weight: 900;
    border-color: #d5e0ea;
}

.stock-outlook-tab.is-active {
    box-shadow: 0 8px 18px rgba(23, 92, 211, 0.16);
}

.stock-outlook-panels {
    padding: 16px 18px 18px;
}

.stock-outlook-signal__meta {
    font-size: 0.86rem;
    margin-bottom: 10px;
}

.stock-outlook-signal__pill {
    min-width: 112px;
    padding: 9px 16px;
    font-size: 0.94rem;
    margin-bottom: 12px;
}

.stock-outlook-signal__text {
    max-width: 760px;
    font-size: 0.98rem;
    line-height: 2;
}

.stock-gauge {
    margin-bottom: 2px;
}

.stock-gauge__label {
    color: #7a8797;
    font-size: 0.77rem;
}

/* تحسين كارت إجماع المحللين */
.stock-analyst-stack {
    margin-top: 16px;
    height: 13px;
}

.stock-analyst-stats {
    gap: 12px;
    padding: 16px 18px 18px;
}

.stock-analyst-stat {
    border-color: #e7edf3;
    box-shadow: 0 6px 16px rgba(16, 24, 40, 0.03);
}

.stock-analyst-stat__label {
    font-size: 0.83rem;
}

.stock-analyst-stat__value {
    font-size: 1.18rem;
}

/* تحسين طفيف لقسم الجودة والمخاطر */
.stock-quality-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stock-quality-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(16, 24, 40, 0.06);
}

/* Beneish تحديدًا: لا نريد أخضر صارخ جدًا في القراءة الإيجابية،
   بل نبرة أكثر تحفظًا وهدوءًا */
.stock-quality-card[data-status="positive"] .stock-quality-card__value {
    color: #11875d;
}

.stock-quality-card[data-status="neutral"] .stock-quality-card__value {
    color: #b7791f;
}

.stock-quality-card[data-status="negative"] .stock-quality-card__value {
    color: #d92d20;
}

/* تحسين بطاقات الأحداث */
.stock-events-highlights,
.stock-events-grid {
    gap: 16px;
}

.stock-events-highlight,
.stock-events-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stock-events-highlight:hover,
.stock-events-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(16, 24, 40, 0.06);
}

/* تحسين عام لبطاقات الأقسام */
.stock-valuation-card,
.stock-profitability-card,
.stock-quality-card,
.stock-events-card,
.stock-events-highlight {
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.045);
}

/* الموبايل */
@media (max-width: 767.98px) {
    .stock-valuation-section,
    .stock-profitability-section,
    .stock-quality-section,
    .stock-events-section,
    .stock-outlook-section {
        margin: 1.5rem 0 1.8rem;
    }

    .stock-outlook-card__head {
        padding: 15px 15px 12px;
    }

    .stock-outlook-tabs {
        padding: 12px 15px 0;
        gap: 8px;
    }

    .stock-outlook-tab {
        min-width: auto;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .stock-outlook-panels {
        padding: 14px 15px 15px;
    }

    .stock-outlook-signal__text {
        max-width: 100%;
        font-size: 0.93rem;
        line-height: 1.95;
    }

    .stock-analyst-stats {
        gap: 8px;
        padding: 12px 15px 15px;
    }

    .stock-gauge__label {
        font-size: 0.71rem;
    }
}
/* ===== Final polish - batch 3 ===== */

/* Sidebar refinement */
.stock-sidepanel-rail {
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
    border-color: #e2eaf2;
}

.stock-sidepanel-rail__head {
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.stock-sidepanel-rail__title {
    font-weight: 900;
    letter-spacing: -0.01em;
}

.stock-sidepanel-rail__text {
    color: #6b7280;
}

.stock-sidepanel-group__title {
    color: #243447;
}

.stock-sidepanel-metric__label {
    color: #5f6c7b;
}

.stock-sidepanel-metric__value {
    font-weight: 900;
}

/* Events section refinement */
.stock-events-section__intro {
    max-width: 1000px;
}

.stock-events-highlight {
    background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.stock-events-highlight__value {
    line-height: 1.75;
}

.stock-events-card__meta {
    color: #5f6b7b;
}

.stock-events-summary {
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.03);
}

/* Valuation visual balance */
.stock-valuation-summary,
.stock-profitability-summary,
.stock-quality-summary,
.stock-events-summary {
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.025);
}

.stock-valuation-card__meta,
.stock-profitability-card__meta,
.stock-quality-card__meta,
.stock-events-card__meta {
    color: #5f6b7b;
}

/* Slightly calmer section titles */
.stock-valuation-section__title,
.stock-profitability-section__title,
.stock-quality-section__title,
.stock-events-section__title,
.stock-outlook-section__title {
    letter-spacing: -0.01em;
}

/* ===== Final polish - closing pass ===== */

/* إصلاح تموضع رأس الفقاعة */
.stock-help-popover {
    pointer-events: none;
}

.stock-help-popover.is-visible {
    pointer-events: auto;
}

.stock-help-popover::after {
    inset-inline-start: auto;
    left: var(--stock-popover-arrow-left, 24px);
    transform: translateX(-50%) rotate(45deg);
}

/* تهذيب النصوص الثانوية عبر الأقسام */
.stock-sidepanel-rail__text,
.stock-valuation-card__meta,
.stock-profitability-card__meta,
.stock-quality-card__meta,
.stock-events-card__meta,
.stock-valuation-summary__text,
.stock-profitability-summary__text,
.stock-quality-summary__text,
.stock-events-summary__text,
.stock-outlook-signal__text {
    color: #5b6676;
}

/* تحسين خفيف لقسم الأحداث */
.stock-events-highlight__value,
.stock-events-card__value {
    line-height: 1.72;
}

.stock-events-highlight__title,
.stock-events-card__title {
    color: #243447;
}

/* تحسين خفيف للشريط الجانبي */
.stock-sidepanel-group__title {
    color: #243447;
}

.stock-sidepanel-metric__label {
    color: #5d6978;
}

/* تحسين خفيف لقسم التحليل الفني */
.stock-outlook-card__title {
    letter-spacing: -0.01em;
}

.stock-outlook-card__text {
    color: #5f6b7b;
}

.stock-outlook-signal__meta {
    color: #5f6b7b;
}

/* هدوء بصري نهائي للبطاقات */
.stock-valuation-card,
.stock-profitability-card,
.stock-quality-card,
.stock-events-card,
.stock-events-highlight,
.stock-analyst-stat {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

/* ===== Final polish - section differentiation ===== */

/* 1) Profitability & growth: KPI identity */
.stock-profitability-section {
    background:
        radial-gradient(circle at top left, rgba(18, 183, 106, 0.05), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #fbfefc 100%);
    border-color: #dfeee7;
}

.stock-profitability-section__kicker {
    background: #edf9f1;
    color: #0f9f5f;
}

.stock-profitability-section__title {
    color: #132a1f;
}

.stock-profitability-grid {
    gap: 16px;
}

.stock-profitability-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfffd 100%);
    border-color: #e4eee8;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.stock-profitability-card::before {
    height: 5px;
}

.stock-profitability-card__head {
    margin-bottom: 12px;
}

.stock-profitability-card__title {
    color: #274033;
}

.stock-profitability-card__value {
    font-size: 1.32rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.stock-profitability-card__meta {
    padding-top: 10px;
    border-top: 1px dashed #e6efe9;
    color: #5b6676;
}

/* 2) Quality & risk: analytical / caution identity */
.stock-quality-section {
    background:
        radial-gradient(circle at top left, rgba(247, 144, 9, 0.05), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #fffdfa 100%);
    border-color: #eee6da;
}

.stock-quality-section__kicker {
    background: #fff6e8;
    color: #b7791f;
}

.stock-quality-section__title {
    color: #2c2316;
}

.stock-quality-grid {
    gap: 16px;
}

.stock-quality-card {
    background: linear-gradient(180deg, #ffffff 0%, #fffefb 100%);
    border-color: #ece5d9;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
}

.stock-quality-card::before {
    height: 5px;
}

.stock-quality-card__title {
    color: #3a3123;
}

.stock-quality-card__value {
    margin-bottom: 10px;
}

.stock-quality-card__meta {
    padding-top: 10px;
    border-top: 1px dashed #ede3d3;
    color: #5d6776;
}

.stock-quality-summary {
    border-color: #eadfce;
    background: linear-gradient(180deg, #fffdfa 0%, #ffffff 100%);
}

/* 3) Events & dividends: event/timeline identity */
.stock-events-section {
    background:
        radial-gradient(circle at top left, rgba(23, 92, 211, 0.05), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border-color: #dde7f4;
}

.stock-events-section__kicker {
    background: #eef4ff;
    color: #175cd3;
}

.stock-events-section__title {
    color: #18283b;
}

.stock-events-highlights {
    gap: 18px;
    margin-top: 1.2rem;
    margin-bottom: 0.1rem;
}

.stock-events-highlight {
    background: linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
    border-color: #dfe8f5;
    box-shadow: 0 10px 22px rgba(16, 24, 40, 0.04);
}

.stock-events-highlight::before {
    height: 5px;
}

.stock-events-highlight__head {
    margin-bottom: 12px;
}

.stock-events-highlight__title {
    color: #27384c;
}

.stock-events-highlight__value {
    font-size: 1.08rem;
    line-height: 1.8;
}

.stock-events-grid {
    gap: 16px;
    margin-top: 1.2rem;
}

.stock-events-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border-color: #e2eaf5;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
}

.stock-events-card::before {
    height: 5px;
}

.stock-events-card__title {
    color: #28384b;
}

.stock-events-card__meta {
    padding-top: 10px;
    border-top: 1px dashed #e6edf6;
    color: #5d6877;
}

.stock-events-summary {
    border-color: #dfe7f2;
    background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

/* 4) tighter visual separation between section families */
.stock-profitability-section + .stock-quality-section,
.stock-quality-section + .stock-events-section,
.stock-events-section + .stock-outlook-section,
.stock-outlook-section + .stock-faq-section {
    margin-top: 2.35rem;
}

/* 5) mobile balance */
@media (max-width: 767.98px) {
    .stock-profitability-card__value,
    .stock-quality-card__value,
    .stock-events-card__value,
    .stock-events-highlight__value {
        font-size: 1.04rem;
    }

    .stock-profitability-card__meta,
    .stock-quality-card__meta,
    .stock-events-card__meta {
        padding-top: 8px;
    }

    .stock-profitability-section + .stock-quality-section,
    .stock-quality-section + .stock-events-section,
    .stock-events-section + .stock-outlook-section,
    .stock-outlook-section + .stock-faq-section {
        margin-top: 1.8rem;
    }
}

/* ===== Compact legend - compatible with current blade ===== */

.stock-color-legend {
    margin-bottom: 12px;
    padding: 10px 12px 11px;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.stock-color-legend__head {
    margin-bottom: 8px;
}

.stock-color-legend__title {
    margin: 0 0 2px;
    color: #182230;
    font-size: 0.96rem;
    font-weight: 900;
    line-height: 1.35;
}

.stock-color-legend__desc {
    margin: 0;
    color: #667085;
    font-size: 0.76rem;
    line-height: 1.45;
}

.stock-color-legend__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 7px;
    align-items: center;
}

.stock-color-legend__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 10px;
    min-height: 30px;
    border: 1px solid #edf2f7;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.025);
    white-space: nowrap;
    flex: 0 0 auto;
}

.stock-color-legend__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    min-width: 10px;
    min-height: 10px;
    border-radius: 50%;
    vertical-align: middle;
    background: #98a2b3;
}

.stock-color-legend__chip.is-positive .stock-color-legend__dot {
    background: #12b76a;
}

.stock-color-legend__chip.is-negative .stock-color-legend__dot {
    background: #f04438;
}

.stock-color-legend__chip.is-neutral .stock-color-legend__dot {
    background: #d7b23b;
}

.stock-color-legend__chip.is-info .stock-color-legend__dot {
    background: #175cd3;
}

.stock-color-legend__chip.is-muted .stock-color-legend__dot {
    background: #98a2b3;
}

.stock-color-legend__label {
    display: inline-block;
    color: #243447;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .stock-color-legend {
        padding: 10px 10px 10px;
        border-radius: 14px;
    }

    .stock-color-legend__head {
        margin-bottom: 7px;
    }

    .stock-color-legend__title {
        font-size: 0.92rem;
    }

    .stock-color-legend__desc {
        font-size: 0.74rem;
    }

    .stock-color-legend__list {
        gap: 6px;
    }

    .stock-color-legend__chip {
        padding: 5px 8px;
        min-height: 28px;
    }

    .stock-color-legend__label {
        font-size: 0.75rem;
    }

    .stock-color-legend__dot {
        width: 9px;
        height: 9px;
        min-width: 9px;
        min-height: 9px;
    }
}

@media (max-width: 991.98px) {
    .stock-sidepanel-rail {
        display: none !important;
    }
}

/* =========================================================
   PriceToWorth EN - refined LTR stock page fixes
   Scope: Technical gauge, technical text spacing, FAQ alignment.
   This block replaces the previous Step 6 overrides; it does not
   change the TradingView widgets or data logic.
   ========================================================= */

html,
body {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* Technical outlook cards: keep content centered without stretching text edge-to-edge. */
.stock-outlook-panel__top,
.stock-outlook-panel__top--single {
    align-items: center !important;
}

/* Gauge: five-zone segmented arc with labels outside the arc. */
.stock-gauge {
    --needle-angle: 0deg;
    position: relative !important;
    width: 306px !important;
    height: 188px !important;
    margin: 12px auto 8px !important;
    overflow: visible !important;
}

.stock-gauge__arc {
    position: absolute !important;
    left: 23px !important;
    top: 48px !important;
    width: 260px !important;
    height: 130px !important;
    border-radius: 260px 260px 0 0 !important;
    overflow: hidden !important;
    border: 1px solid #d8e2ec !important;
    background: linear-gradient(
        to right,
        #7f1d1d 0%,
        #7f1d1d 20%,
        #ef4444 20%,
        #ef4444 40%,
        #f59e0b 40%,
        #f59e0b 60%,
        #22c55e 60%,
        #22c55e 80%,
        #047857 80%,
        #047857 100%
    ) !important;
    box-shadow:
        inset 0 7px 12px rgba(255, 255, 255, 0.22),
        0 9px 20px rgba(15, 23, 42, 0.055) !important;
}

.stock-gauge__arc::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;
    border-radius: inherit !important;
    pointer-events: none !important;
    background:
        linear-gradient(to bottom, rgba(255,255,255,0.24), rgba(255,255,255,0) 42%),
        linear-gradient(
            to right,
            transparent 19.35%,
            rgba(255,255,255,0.85) 19.35%,
            rgba(255,255,255,0.85) 20.65%,
            transparent 20.65%,
            transparent 39.35%,
            rgba(255,255,255,0.85) 39.35%,
            rgba(255,255,255,0.85) 40.65%,
            transparent 40.65%,
            transparent 59.35%,
            rgba(255,255,255,0.85) 59.35%,
            rgba(255,255,255,0.85) 60.65%,
            transparent 60.65%,
            transparent 79.35%,
            rgba(255,255,255,0.85) 79.35%,
            rgba(255,255,255,0.85) 80.65%,
            transparent 80.65%
        );
}

.stock-gauge__arc::after {
    content: "" !important;
    position: absolute !important;
    z-index: 3 !important;
    left: 11px !important;
    top: 11px !important;
    width: 238px !important;
    height: 119px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%) !important;
    border-radius: 238px 238px 0 0 !important;
    box-shadow: inset 0 5px 10px rgba(15, 23, 42, 0.025) !important;
}

.stock-gauge__needle {
    position: absolute !important;
    left: 50% !important;
    bottom: 7px !important;
    width: 3px !important;
    height: 90px !important;
    background: #111827 !important;
    border-radius: 999px !important;
    transform-origin: bottom center !important;
    transform: translateX(-50%) rotate(var(--needle-angle)) !important;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.14) !important;
    transition: transform .75s cubic-bezier(.22, 1, .36, 1) !important;
    z-index: 6 !important;
}

.stock-gauge.is-ready .stock-gauge__needle {
    animation: stockNeedleIdle 4.8s ease-in-out infinite 1.1s !important;
}

.stock-gauge__hub {
    position: absolute !important;
    left: 50% !important;
    bottom: 0 !important;
    width: 12px !important;
    height: 12px !important;
    background: #111827 !important;
    border-radius: 999px !important;
    transform: translateX(-50%) !important;
    z-index: 7 !important;
    box-shadow: 0 0 0 0 rgba(16, 24, 40, 0.10) !important;
    animation: stockGaugeHubPulse 3.8s ease-in-out infinite !important;
}

.stock-gauge__label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    z-index: 8 !important;
    min-width: 42px !important;
    padding: 3px 6px !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.96) !important;
    border: 1px solid rgba(216,226,236,0.95) !important;
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.055) !important;
    font-size: 0.62rem !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    text-align: center !important;
    opacity: 0.9 !important;
}

.stock-gauge__label--ss {
    left: -30px !important;
    top: 140px !important;
    color: #7f1d1d !important;
}

.stock-gauge__label--s {
    left: -12px !important;
    top: 82px !important;
    color: #d92d20 !important;
}

.stock-gauge__label--n {
    left: 50% !important;
    top: 10px !important;
    transform: translateX(-50%) !important;
    color: #b45309 !important;
}

.stock-gauge__label--b {
    right: -6px !important;
    top: 82px !important;
    color: #079455 !important;
}

.stock-gauge__label--sb {
    right: -34px !important;
    top: 140px !important;
    color: #047857 !important;
}

.stock-gauge[data-state-index="0"] .stock-gauge__label--ss,
.stock-gauge[data-state-index="1"] .stock-gauge__label--s,
.stock-gauge[data-state-index="2"] .stock-gauge__label--n,
.stock-gauge[data-state-index="3"] .stock-gauge__label--b,
.stock-gauge[data-state-index="4"] .stock-gauge__label--sb {
    opacity: 1 !important;
    font-weight: 950 !important;
    border-color: currentColor !important;
    box-shadow: 0 7px 16px rgba(15, 23, 42, 0.09) !important;
}

.stock-gauge[data-state-index="2"] .stock-gauge__label--n {
    transform: translateX(-50%) !important;
}

.stock-outlook-signal--below {
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    padding: 0 16px !important;
    text-align: center !important;
}

.stock-outlook-signal__text,
.stock-analyst-summary__text {
    max-width: 520px !important;
    margin: 10px auto 0 !important;
    padding: 0 16px !important;
    color: #475467 !important;
    text-align: center !important;
    line-height: 1.85 !important;
}

.stock-analyst-summary,
.stock-outlook-card__text,
.stock-outlook-section__intro {
    line-height: 1.8 !important;
}

/* FAQ: force natural English left alignment while keeping Bootstrap accordion behavior. */
.stock-faq-section,
.stock-faq-section * {
    direction: ltr !important;
}

.stock-faq-header,
.stock-faq-title,
.stock-faq-intro,
.stock-faq-kicker,
.stock-faq-summary,
.stock-faq-summary-card,
.stock-faq-summary-label,
.stock-faq-summary-value,
.stock-faq-summary-meta,
.stock-faq-list,
.stock-faq-card,
.stock-faq-answer,
.stock-faq-answer-wrap,
.stock-faq-answer p {
    text-align: left !important;
}

.stock-faq-button,
.stock-faq-section .accordion-button {
    position: relative !important;
    text-align: left !important;
    justify-content: flex-start !important;
    flex-direction: row !important;
    gap: 12px !important;
    padding-left: 18px !important;
    padding-right: 46px !important;
}

.stock-faq-question-text {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

.stock-faq-section .accordion-button::after {
    position: absolute !important;
    right: 18px !important;
    left: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.stock-faq-answer {
    padding-left: 18px !important;
    padding-right: 18px !important;
}

@media (max-width: 767.98px) {
    .stock-gauge {
        width: 260px !important;
        height: 166px !important;
        margin-top: 8px !important;
    }

    .stock-gauge__arc {
        left: 15px !important;
        top: 42px !important;
        width: 230px !important;
        height: 115px !important;
        border-radius: 230px 230px 0 0 !important;
    }

    .stock-gauge__arc::after {
        left: 10px !important;
        top: 10px !important;
        width: 210px !important;
        height: 105px !important;
        border-radius: 210px 210px 0 0 !important;
    }

    .stock-gauge__needle {
        height: 78px !important;
        bottom: 7px !important;
    }

    .stock-gauge__hub {
        width: 11px !important;
        height: 11px !important;
    }

    .stock-gauge__label {
        min-width: 34px !important;
        padding: 2px 5px !important;
        font-size: 0.53rem !important;
    }

    .stock-gauge__label--ss { left: -12px !important; top: 124px !important; }
    .stock-gauge__label--s  { left: -8px !important; top: 76px !important; }
    .stock-gauge__label--n  { top: 8px !important; }
    .stock-gauge__label--b  { right: -5px !important; top: 76px !important; }
    .stock-gauge__label--sb { right: -16px !important; top: 124px !important; }

    .stock-outlook-signal__text,
    .stock-analyst-summary__text {
        padding-left: 10px !important;
        padding-right: 10px !important;
        font-size: 0.9rem !important;
    }

    .stock-faq-button,
    .stock-faq-section .accordion-button {
        padding-left: 14px !important;
        padding-right: 42px !important;
    }
}
