/* =========================================================
   E — Expanded Movement Study
   ========================================================= */


/* =========================================================
   Visibility
   ========================================================= */

.movement-study {
    display: none;
}


.dashboard-panel--movements.dashboard-panel--expanded
.movement-chart {
    display: none !important;
}


.dashboard-panel--movements.dashboard-panel--expanded
.movement-study {
    display: flex !important;
    flex: 1;
    flex-direction: column;

    min-width: 0;
    min-height: 0;
}


.dashboard-panel--movements.dashboard-panel--expanded
.dashboard-panel__body--movement {
    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 0;

    overflow: auto;
}


/* =========================================================
   Scope
   ========================================================= */

.movement-study__scope {
    flex: 0 0 auto;

    margin-bottom: 0.7rem;

    padding: 0.7rem;

    background: var(
        --dashboard-background,
        #f7f9fb
    );

    border: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );

    border-radius: 0.55rem;
}


.movement-study__scope-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 0.75rem;

    margin-bottom: 0.55rem;
}


.movement-study__scope-head > div {
    display: grid;

    gap: 0.1rem;
}


.movement-study__scope-head strong {
    color: var(
        --dashboard-text,
        #344054
    );

    font-size: 0.56rem;
}


.movement-study__scope-head > div > span {
    color: var(
        --dashboard-text-soft,
        #98a2b3
    );

    font-size: 0.42rem;
}


.movement-study__scope-context {
    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.46rem;
    font-weight: 750;
}


.movement-study__scope-controls {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;

    gap: 0.6rem;
}


.movement-study__scope-group {
    display: grid;

    gap: 0.27rem;
}


.movement-study__scope-label {
    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.42rem;
    font-weight: 750;
}


.movement-study__segmented {
    display: inline-flex;

    min-height: 34px;

    padding: 2px;

    background: var(
        --dashboard-surface,
        #ffffff
    );

    border: 1px solid
        var(
            --dashboard-border,
            #dfe5ec
        );

    border-radius: 0.4rem;
}


.movement-study__scope-button {
    min-width: 72px;

    padding:
        0
        0.55rem;

    color: var(
        --dashboard-text-muted,
        #667085
    );

    background: transparent;

    border: 0;
    border-radius: 0.3rem;

    cursor: pointer;

    font: inherit;
    font-size: 0.47rem;
    font-weight: 750;
}


.movement-study__scope-button:hover {
    background: var(
        --dashboard-background,
        #f2f5f8
    );
}


.movement-study__scope-button.is-active {
    color: var(
        --dashboard-text,
        #344054
    );

    background: var(
        --dashboard-background,
        #edf1f5
    );
}


.movement-study__scope-select,
.movement-study__scope-readonly {
    min-width: 105px;
    height: 34px;

    padding:
        0
        0.55rem;

    color: var(
        --dashboard-text,
        #344054
    );

    background: var(
        --dashboard-surface,
        #ffffff
    );

    border: 1px solid
        var(
            --dashboard-border,
            #dfe5ec
        );

    border-radius: 0.4rem;

    font: inherit;
    font-size: 0.5rem;
    font-weight: 700;
}


.movement-study__scope-readonly {
    display: flex;
    align-items: center;
}


.movement-study__scope-compare {
    display: flex;
    align-items: flex-end;

    gap: 0.4rem;
}


.movement-study__scope-vs {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 34px;

    color: var(
        --dashboard-text-soft,
        #98a2b3
    );

    font-size: 0.44rem;
    font-weight: 750;
}


/* =========================================================
   Intro
   ========================================================= */

.movement-study__intro {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 0.75rem;

    margin-bottom: 0.55rem;
}


.movement-study__eyebrow {
    color: var(
        --dashboard-text-soft,
        #98a2b3
    );

    font-size: 0.42rem;
    font-weight: 750;

    letter-spacing: 0.04em;

    text-transform: uppercase;
}


.movement-study__intro h3 {
    margin: 0.08rem 0 0;

    color: var(
        --dashboard-text,
        #344054
    );

    font-size: 0.7rem;
    font-weight: 800;
}


.movement-study__period {
    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.52rem;
    font-weight: 800;
}


/* =========================================================
   Summary
   ========================================================= */

.movement-study__summary {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(
                0,
                1fr
            )
        );

    gap: 0.45rem;

    margin-bottom: 0.7rem;
}


.movement-study__summary-card {
    display: grid;

    gap: 0.18rem;

    padding:
        0.5rem
        0.58rem;

    background: var(
        --dashboard-surface,
        #ffffff
    );

    border: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );

    border-radius: 0.45rem;
}


.movement-study__summary-card span {
    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.41rem;
    font-weight: 700;
}


.movement-study__summary-card strong {
    color: var(
        --dashboard-text,
        #344054
    );

    font-size: 0.56rem;
    font-weight: 800;
}


/* =========================================================
   Direction Study
   ========================================================= */

.movement-study__directions {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 0.65rem;
}


.movement-study__direction {
    min-width: 0;

    padding: 0.6rem;

    background: var(
        --dashboard-surface,
        #ffffff
    );

    border: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );

    border-radius: 0.5rem;
}


.movement-study__direction-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 0.5rem;

    margin-bottom: 0.5rem;
}


.movement-study__direction-head strong {
    color: var(
        --dashboard-text,
        #344054
    );

    font-size: 0.53rem;
}


.movement-study__direction-head span {
    color: var(
        --dashboard-text-soft,
        #98a2b3
    );

    font-size: 0.4rem;
}


.movement-study__direction-rows {
    display: grid;

    gap: 0.4rem;
}


.movement-study__direction-row {
    display: grid;

    grid-template-columns:
        20px
        minmax(
            0,
            1fr
        )
        58px;

    align-items: center;

    gap: 0.4rem;
}


.movement-study__rank {
    color: var(
        --dashboard-text-soft,
        #98a2b3
    );

    font-size: 0.43rem;
    font-weight: 750;
}


.movement-study__direction-main {
    display: grid;

    gap: 0.22rem;

    min-width: 0;
}


.movement-study__direction-name {
    overflow: hidden;

    color: var(
        --dashboard-text,
        #344054
    );

    font-size: 0.47rem;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.movement-study__flip {
    margin-left: 0.25rem;

    padding:
        0.08rem
        0.22rem;

    color: #8d6414;

    background: #fff4d6;

    border-radius: 0.22rem;

    font-size: 0.36rem;
    font-weight: 800;

    text-transform: uppercase;
}


.movement-study__track {
    height: 6px;

    overflow: hidden;

    background: var(
        --dashboard-background,
        #edf1f5
    );

    border-radius: 999px;
}


.movement-study__fill {
    height: 100%;

    border-radius: inherit;
}


.movement-study__fill--jlp {
    background: #16875d;
}


.movement-study__fill--pnp {
    background: #f47a23;
}


.movement-study__direction-value {
    font-size: 0.45rem;

    text-align: right;
}


.movement-study__direction-value--jlp {
    color: #16875d;
}


.movement-study__direction-value--pnp {
    color: #f47a23;
}


.movement-study__direction-empty {
    padding: 0.8rem;

    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.46rem;

    text-align: center;
}


/* =========================================================
   Definition
   ========================================================= */

.movement-study__definition {
    margin-top: 0.55rem;

    color: var(
        --dashboard-text-soft,
        #8a95a6
    );

    font-size: 0.42rem;
    line-height: 1.45;
}


/* =========================================================
   Accordion
   ========================================================= */

.movement-study__accordion {
    margin-top: 0.75rem;

    border: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );

    border-radius: 0.5rem;

    overflow: hidden;
}


.movement-study__accordion-button {
    display: grid;

    grid-template-columns:
        18px
        auto
        1fr;

    align-items: center;

    gap: 0.4rem;

    width: 100%;

    padding:
        0.62rem
        0.7rem;

    color: var(
        --dashboard-text,
        #344054
    );

    background: var(
        --dashboard-background,
        #f7f9fb
    );

    border: 0;

    cursor: pointer;

    font: inherit;

    text-align: left;
}


.movement-study__accordion-button:disabled {
    cursor: default;

    opacity: 0.65;
}


.movement-study__accordion-button strong {
    font-size: 0.5rem;
}


.movement-study__accordion-button > span:last-child {
    justify-self: end;

    color: var(
        --dashboard-text-soft,
        #98a2b3
    );

    font-size: 0.41rem;
}


.movement-study__accordion-arrow {
    display: inline-block;

    color: var(
        --dashboard-text-muted,
        #667085
    );

    transition:
        transform
        120ms
        ease;
}


.movement-study__accordion.is-open
.movement-study__accordion-arrow {
    transform: rotate(90deg);
}


.movement-study__accordion-content {
    max-height: 420px;

    overflow: auto;

    background: var(
        --dashboard-surface,
        #ffffff
    );
}


/* =========================================================
   Table
   ========================================================= */

.movement-study__table-wrap {
    width: 100%;

    overflow: auto;
}


.movement-study__table {
    width: 100%;

    min-width: 840px;

    border-collapse: collapse;

    color: var(
        --dashboard-text,
        #344054
    );

    font-size: 0.47rem;
}


.movement-study__table th,
.movement-study__table td {
    padding:
        0.5rem
        0.58rem;

    border-bottom: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );

    text-align: right;

    white-space: nowrap;
}


.movement-study__table th:first-child,
.movement-study__table td:first-child {
    text-align: left;
}


.movement-study__table thead th {
    position: sticky;

    top: 0;

    z-index: 2;

    color: var(
        --dashboard-text-muted,
        #667085
    );

    background: var(
        --dashboard-background,
        #f7f9fb
    );

    font-size: 0.41rem;
    font-weight: 750;
}


.movement-study__table tbody tr:last-child td {
    border-bottom: 0;
}


.movement-study__table tbody tr:hover {
    background: var(
        --dashboard-background,
        #f8fafc
    );
}


/* =========================================================
   Drill
   ========================================================= */

.movement-study__drill {
    display: inline-flex;
    align-items: center;

    gap: 0.35rem;

    padding: 0;

    color: var(
        --dashboard-text,
        #344054
    );

    background: transparent;

    border: 0;

    cursor: pointer;

    font: inherit;
    font-weight: 750;
}


.movement-study__drill:hover {
    text-decoration: underline;
}


.movement-study__drill span {
    color: var(
        --dashboard-text-soft,
        #98a2b3
    );
}


/* =========================================================
   Movement / Status
   ========================================================= */

.movement-study__movement {
    font-weight: 750;
}


.movement-study__movement--jlp {
    color: #16875d;
}


.movement-study__movement--pnp {
    color: #f47a23;
}


.movement-study__movement--none {
    color: var(
        --dashboard-text-muted,
        #667085
    );
}


.movement-study__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 42px;

    padding:
        0.12rem
        0.3rem;

    border-radius: 0.28rem;

    font-size: 0.39rem;
    font-weight: 800;
}


.movement-study__status--flip {
    color: #8d6414;

    background: #fff4d6;
}


.movement-study__status--safer {
    color: #14704c;

    background: #dff3e9;
}


.movement-study__status--closer {
    color: #a45118;

    background: #fff0e4;
}


.movement-study__status--stable {
    color: #667085;

    background: #eef1f4;
}


/* =========================================================
   Deep View
   ========================================================= */

.movement-study__deep-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 0.7rem;

    padding: 0.55rem 0.65rem;

    border-bottom: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );
}


.movement-study__deep-head > div:nth-child(2) {
    display: grid;

    gap: 0.08rem;
}


.movement-study__deep-head > div:nth-child(2) strong {
    color: var(
        --dashboard-text,
        #344054
    );

    font-size: 0.5rem;
}


.movement-study__deep-head > div:nth-child(2) span {
    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.4rem;
}


.movement-study__back {
    padding:
        0.32rem
        0.45rem;

    color: var(
        --dashboard-text-muted,
        #667085
    );

    background: transparent;

    border: 1px solid
        var(
            --dashboard-border,
            #dfe5ec
        );

    border-radius: 0.35rem;

    cursor: pointer;

    font: inherit;
    font-size: 0.42rem;
    font-weight: 750;
}


.movement-study__deep-tabs {
    display: inline-flex;

    padding: 2px;

    background: var(
        --dashboard-background,
        #f2f5f8
    );

    border-radius: 0.38rem;
}


.movement-study__deep-tab {
    padding:
        0.32rem
        0.48rem;

    color: var(
        --dashboard-text-muted,
        #667085
    );

    background: transparent;

    border: 0;
    border-radius: 0.3rem;

    cursor: pointer;

    font: inherit;
    font-size: 0.41rem;
    font-weight: 750;
}


.movement-study__deep-tab.is-active {
    color: var(
        --dashboard-text,
        #344054
    );

    background: var(
        --dashboard-surface,
        #ffffff
    );
}


.movement-study__deep-warning,
.movement-study__mock-note {
    padding: 0.7rem;

    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.44rem;
    line-height: 1.45;
}


.movement-study__mock-note {
    border-top: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );
}


/* =========================================================
   Empty / Local
   ========================================================= */

.movement-study__empty,
.movement-study__local {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 0.25rem;

    min-height: 190px;

    padding: 1rem;

    text-align: center;
}


.movement-study__empty strong,
.movement-study__local strong {
    color: var(
        --dashboard-text,
        #344054
    );

    font-size: 0.6rem;
}


.movement-study__empty span,
.movement-study__local span {
    max-width: 440px;

    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.47rem;
    line-height: 1.45;
}


/* =========================================================
   Dark Mode
   ========================================================= */

[data-theme="dark"]
.movement-study__scope,

[data-theme="dark"]
.movement-study__accordion-button {
    background: #111927;

    border-color: #2d394c;
}


[data-theme="dark"]
.movement-study__scope-head strong,

[data-theme="dark"]
.movement-study__intro h3,

[data-theme="dark"]
.movement-study__summary-card strong,

[data-theme="dark"]
.movement-study__direction-head strong,

[data-theme="dark"]
.movement-study__direction-name,

[data-theme="dark"]
.movement-study__drill,

[data-theme="dark"]
.movement-study__deep-head > div:nth-child(2) strong,

[data-theme="dark"]
.movement-study__empty strong,

[data-theme="dark"]
.movement-study__local strong {
    color: #f4f7fb;
}


[data-theme="dark"]
.movement-study__segmented,

[data-theme="dark"]
.movement-study__scope-select,

[data-theme="dark"]
.movement-study__scope-readonly {
    color: #f4f7fb;

    background: #172033;

    border-color: #344054;
}


[data-theme="dark"]
.movement-study__scope-button.is-active {
    color: #f4f7fb;

    background: #253146;
}


[data-theme="dark"]
.movement-study__summary-card,

[data-theme="dark"]
.movement-study__direction {
    background: #111927;

    border-color: #2d394c;
}


[data-theme="dark"]
.movement-study__accordion,
[data-theme="dark"]
.movement-study__deep-head {
    border-color: #2d394c;
}


[data-theme="dark"]
.movement-study__accordion-content {
    background: #172033;
}


[data-theme="dark"]
.movement-study__table {
    color: #dce3ec;

    background: #172033;
}


[data-theme="dark"]
.movement-study__table th,
[data-theme="dark"]
.movement-study__table td {
    border-color: #2d394c;
}


[data-theme="dark"]
.movement-study__table thead th {
    color: #aab4c3;

    background: #111927;
}


[data-theme="dark"]
.movement-study__deep-tabs {
    background: #111927;
}


[data-theme="dark"]
.movement-study__deep-tab.is-active {
    color: #f4f7fb;

    background: #253146;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 950px) {

    .movement-study__summary {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );
    }


    .movement-study__directions {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 700px) {

    .movement-study__scope-head,
    .movement-study__intro {
        align-items: flex-start;
        flex-direction: column;
    }


    .movement-study__scope-controls {
        align-items: stretch;
        flex-direction: column;
    }


    .movement-study__segmented {
        width: 100%;
    }


    .movement-study__scope-button {
        flex: 1;
    }


    .movement-study__scope-compare {
        align-items: stretch;
        flex-direction: column;
    }


    .movement-study__scope-vs {
        height: auto;

        justify-content: flex-start;
    }


    .movement-study__scope-select,
    .movement-study__scope-readonly {
        width: 100%;
    }


    .movement-study__summary {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );
    }


    .movement-study__accordion-button {
        grid-template-columns:
            18px
            1fr;
    }


    .movement-study__accordion-button > span:last-child {
        display: none;
    }


    .movement-study__deep-head {
        align-items: stretch;
        flex-direction: column;
    }


    .movement-study__deep-tabs {
        width: 100%;
    }


    .movement-study__deep-tab {
        flex: 1;
    }

}
/* =========================================================
   Shared Geography Context — Subtle
   ========================================================= */

.dashboard-geo-context {
    display: inline-flex;

    align-items: center;

    justify-content: flex-end;

    gap: 0.28rem;

    color: var(--dashboard-text-soft, #98a2b3);

    font-size: 0.62rem;

    font-weight: 450;

    white-space: nowrap;

    opacity: 0.72;
}


.dashboard-geo-context__back {
    display: inline;

    padding: 0;

    border: 0;

    background: transparent;

    color: inherit;

    font: inherit;

    font-weight: 500;

    cursor: pointer;

    opacity: 0.78;

    transition:
        opacity 0.15s ease,
        color 0.15s ease;
}


.dashboard-geo-context__back:hover {
    color: var(--dashboard-text-muted, #667085);

    opacity: 1;

    text-decoration: none;
}


.dashboard-geo-context__back:focus-visible {
    outline: 1px solid currentColor;

    outline-offset: 2px;

    border-radius: 2px;
}


.dashboard-geo-context__divider {
    opacity: 0.38;
}


.dashboard-geo-context__level {
    opacity: 0.82;
}


.dashboard-geo-context__current {
    opacity: 0.88;

    font-weight: 500;
}


/* =========================================================
   Movement Study Placement
   ========================================================= */

.movement-study__accordion-bar {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 1rem;

    width: 100%;
}


.movement-study__accordion-bar
.movement-study__accordion-button {
    flex: 1 1 auto;

    width: auto;

    min-width: 0;
}


.movement-study__accordion-context {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    flex: 0 0 auto;

    padding-right: 0.85rem;
}


/* =========================================================
   Dark Mode
   ========================================================= */

[data-theme="dark"]
.dashboard-geo-context {
    color: #7f8a9a;
}


[data-theme="dark"]
.dashboard-geo-context__back:hover {
    color: #aeb8c7;
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 700px) {

    .movement-study__accordion-bar {
        flex-wrap: wrap;
    }


    .movement-study__accordion-context {
        width: 100%;

        justify-content: flex-start;

        padding:
            0
            0.85rem
            0.55rem
            2rem;
    }


    .dashboard-geo-context {
        font-size: 0.6rem;
    }

}