/* Home dashboard (Components/Pages/Home). Loaded from App.razor; every selector is scoped to
   ranx-home-* classes, which only Home renders. */

.ranx-home-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* The shell's gap spaces Home's sections; the theme's card bottom margin would double it. */
.ranx-home-shell > .card.custom-card {
    margin-block-end: 0;
}

.ranx-home-module-panel-head {
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ranx-home-workspace-open { white-space: nowrap; }

.ranx-home-listen-workspace {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ranx-home-rank-workspace {
    display: flex;
    flex-direction: column;
}

.ranx-home-rank-list {
    display: flex;
    flex-direction: column;
}

.ranx-home-rank-row {
    min-height: 5.15rem;
    display: grid;
    grid-template-columns: auto minmax(12rem, 1fr) auto auto auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 0.15rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(var(--bs-border-color-rgb, 222, 226, 230), 0.72);
}

.ranx-home-rank-row:hover,
.ranx-home-rank-row:focus-visible {
    color: inherit;
    background: rgba(var(--primary-rgb), 0.035);
}

.ranx-home-rank-row-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--primary-rgb));
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    border-radius: 0.4rem;
    font-size: 1.15rem;
}

.ranx-home-rank-row-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.ranx-home-rank-row-title {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranx-home-rank-row-title-line {
    align-items: center;
    display: flex;
    gap: .45rem;
    min-width: 0;
}

.ranx-home-rank-domain-chip {
    align-items: center;
    background: var(--ranx-audience-color, rgb(var(--primary-rgb)));
    border-radius: .3rem;
    box-shadow: 0 5px 11px rgba(var(--ranx-audience-rgb, var(--primary-rgb)), .15);
    color: var(--ranx-audience-on-color, #fff);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .75rem;
    font-weight: 700;
    height: 1.5rem;
    justify-content: center;
    letter-spacing: .04em;
    line-height: 1;
    padding: 0;
    text-transform: uppercase;
    width: 1.5rem;
}

.ranx-home-rank-mode-chip {
    align-items: center;
    background: #f5f7fb;
    border: 1px solid #dce4f1;
    border-radius: 999px;
    color: #5e6b84;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .75rem;
    font-weight: 700;
    gap: .22rem;
    line-height: 1;
    padding: .2rem .42rem;
}

.ranx-home-rank-type-chip {
    align-items: center;
    border: 1px solid rgba(var(--bs-border-color-rgb, 222, 226, 230), .75);
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .75rem;
    font-weight: 700;
    gap: .26rem;
    line-height: 1;
    padding: .18rem .42rem .18rem .32rem;
}

.ranx-home-rank-type-chip-icon {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .58rem;
    height: .8rem;
    justify-content: center;
    transform: translate(-2px, -.5px);
    width: .8rem;
}

.ranx-home-rank-type-chip-icon > i {
    transform: translateY(1px);
}

.ranx-home-rank-row-arrow {
    color: rgb(var(--primary-rgb));
}

.ranx-home-drivers-workspace {
    display: flex;
    flex-direction: column;
}

.ranx-home-drivers-list {
    display: grid;
    grid-template-columns: minmax(13.5rem, 0.8fr) minmax(19rem, 1.7fr) minmax(10rem, auto) auto;
    column-gap: 1rem;
}

.ranx-home-driver-row {
    grid-column: 1 / -1;
    min-width: 0;
    min-height: 6.45rem;
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
    padding: 0.85rem 0.15rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(var(--bs-border-color-rgb, 222, 226, 230), 0.72);
    transition: background-color 140ms ease;
}

.ranx-home-driver-row:hover,
.ranx-home-driver-row:focus-visible {
    color: inherit;
    background: rgba(var(--primary-rgb), 0.035);
}

.ranx-home-driver-identity,
.ranx-home-driver-lanes,
.ranx-home-driver-open,
.ranx-home-driver-wave-count {
    display: flex;
    align-items: center;
}

.ranx-home-driver-identity {
    min-width: 0;
    gap: 0.65rem;
}

.ranx-home-driver-identity-copy,
.ranx-home-driver-summary,
.ranx-home-driver-row-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ranx-home-driver-context-name,
.ranx-home-driver-audience,
.ranx-home-driver-summary-kicker,
.ranx-home-driver-headline,
.ranx-home-driver-interpretation {
    display: block;
}

.ranx-home-driver-context-name {
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.2;
}

.ranx-home-driver-audience {
    margin-top: 0.18rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.ranx-home-driver-wave-count {
    align-self: flex-start;
    gap: 0.3rem;
    margin-top: 0.35rem;
    padding: 0.2rem 0.42rem;
    color: var(--text-muted);
    background: rgba(var(--primary-rgb), 0.045);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ranx-home-driver-summary-kicker {
    color: rgb(var(--primary-rgb));
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ranx-home-driver-headline {
    margin-top: 0.22rem;
    color: #1f2a44;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.3;
}

.ranx-home-driver-interpretation {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 0.24rem;
    color: #65718a;
    font-size: 0.8rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ranx-home-driver-row-meta {
    align-items: flex-end;
    gap: 0.55rem;
}

.ranx-home-driver-lanes {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.32rem;
}

.ranx-home-driver-lane {
    padding: 0.2rem 0.42rem;
    color: #52617a;
    background: #f5f7fb;
    border: 1px solid #dce4f1;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
}

.ranx-home-driver-lane.is-priority {
    color: #a13b3b;
    background: rgba(var(--danger-rgb), 0.06);
    border-color: rgba(var(--danger-rgb), 0.22);
}

.ranx-home-driver-lane.is-investigate {
    color: #315fae;
    background: rgba(var(--primary-rgb), 0.06);
    border-color: rgba(var(--primary-rgb), 0.22);
}

.ranx-home-driver-lane.is-validate {
    color: #826a18;
    background: rgba(var(--warning-rgb), 0.08);
    border-color: rgba(var(--warning-rgb), 0.25);
}

.ranx-home-driver-lane.is-monitor {
    color: #58677f;
    background: #f4f6f9;
    border-color: #cfd7e4;
}

.ranx-home-driver-open {
    color: rgb(var(--primary-rgb));
    font-size: 0.8rem;
    font-weight: 800;
}

.ranx-home-driver-row-arrow {
    color: rgb(var(--primary-rgb));
}

.ranx-home-rank-metrics {
    align-items: center;
    display: grid;
    gap: .55rem;
    grid-auto-columns: 3.55rem;
    grid-auto-flow: column;
    justify-content: end;
    min-height: 3.4rem;
}

.ranx-home-rank-metric {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.ranx-home-rank-metric-ring {
    align-items: center;
    background:
        radial-gradient(circle at center, #fff 0 53%, transparent 54%),
        conic-gradient(var(--ranx-home-metric-color) calc(var(--ranx-home-metric-value) * 1%), #e9eef7 0);
    border-radius: 50%;
    color: #1f2a44;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .75rem;
    font-weight: 800;
    height: 2.35rem;
    justify-content: center;
    line-height: 1;
    width: 2.35rem;
}

.ranx-home-rank-metric-ring.is-nps {
    background:
        radial-gradient(circle at center, #fff 0 53%, transparent 54%),
        conic-gradient(
            var(--ranx-home-nps-detractor-color) 0 calc(var(--ranx-home-nps-detractor) * 1%),
            var(--ranx-home-nps-passive-color) 0 calc((var(--ranx-home-nps-detractor) + var(--ranx-home-nps-passive)) * 1%),
            var(--ranx-home-nps-promoter-color) 0 100%);
}

.ranx-home-rank-metric-ring.is-count {
    background: #f3f6fb;
    border: 2px solid #dce4f1;
}

.ranx-home-rank-metric-label {
    color: #64728d;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    white-space: nowrap;
}

.ranx-home-rank-metric-placeholder {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.ranx-home-rank-metric-placeholder .rounded-circle {
    height: 2.35rem;
    width: 2.35rem;
}

.ranx-home-rank-metric-placeholder .rounded-1 {
    height: .48rem;
    width: 2.75rem;
}

@media (max-width: 1199.98px) {
    .ranx-home-rank-row {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
    }

    .ranx-home-rank-row-icon {
        grid-row: 1 / span 2;
    }

    .ranx-home-rank-metrics {
        grid-column: 2 / 4;
        grid-row: 2;
        justify-content: start;
    }

    .ranx-home-rank-row-arrow {
        grid-column: 4;
        grid-row: 1 / span 2;
    }
}

.ranx-home-context-name-chip {
    display: inline-flex;
    align-items: center;
    max-width: 14rem;
    padding: .18rem .42rem;
    overflow: hidden;
    border: 1px solid rgba(100, 116, 139, .18);
    border-radius: 999px;
    background: #f7f9fc;
    color: #61718a;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranx-home-lifecycle-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: rgba(var(--module-rgb), 0.14);
    color: var(--module-color);
}

.ranx-home-lifecycle-icon .side-menu__icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--module-color);
    fill: currentColor !important;
}

.ranx-home-skeleton-kicker {
    width: 8rem;
    height: 0.85rem;
}

.ranx-home-skeleton-copy {
    width: min(44rem, 100%);
    height: 1rem;
}

.ranx-home-skeleton-copy-short {
    width: min(34rem, 100%);
    height: 1rem;
}

.ranx-home-skeleton-section-title {
    width: 12rem;
    height: 1rem;
}

.ranx-home-skeleton-list-row {
    width: 100%;
    height: 3.4rem;
}

@media (max-width: 991.98px) {
    .ranx-home-drivers-list {
        grid-template-columns: 12rem minmax(0, 1fr) 1rem;
    }

    .ranx-home-driver-row-meta {
        grid-column: 2;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .ranx-home-driver-lanes {
        justify-content: flex-start;
    }

    .ranx-home-driver-row-arrow {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}

.ranx-home-live-workspace { display: grid; gap: .85rem; }

.ranx-home-live-loading { display: flex; align-items: center; gap: .55rem; min-height: 8rem; justify-content: center; color: var(--text-muted); font-size: .85rem; }

.ranx-home-live-list { display: grid; gap: .45rem; }

.ranx-home-live-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .58rem .7rem; border: 1px solid var(--default-border); border-left: .25rem solid var(--home-act-color); border-radius: .45rem; background: var(--custom-white); color: inherit; text-decoration: none; }

.ranx-home-live-row:hover,
.ranx-home-live-row:focus-visible { border-color: color-mix(in srgb, var(--home-act-color) 42%, var(--default-border)); box-shadow: 0 .18rem .5rem rgba(31, 42, 68, .07); }

.ranx-home-live-row__ordinal { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .36rem; background: var(--primary-color); color: #fff; font-size: .75rem; font-weight: 850; }

.ranx-home-live-row__copy { display: grid; gap: .18rem; min-width: 0; }

.ranx-home-live-row__copy strong { overflow: hidden; color: var(--default-text-color); font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }

.ranx-home-live-row__copy small { color: var(--text-muted); font-size: .8rem; }

.ranx-home-live-progress { display: block; overflow: hidden; width: min(18rem, 100%); height: .25rem; border-radius: 999px; background: rgba(var(--primary-rgb), .09); }

.ranx-home-live-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--home-act-color); }

.ranx-home-context-stack { display: grid; gap: .65rem; }

.ranx-home-context-group { display: grid; gap: .5rem; padding: .68rem; border: 1px solid var(--default-border); border-radius: .5rem; background: rgba(148, 163, 184, .025); }

.ranx-home-context-group-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }

.ranx-home-context-identity { display: flex; align-items: center; gap: .55rem; min-width: 0; }

.ranx-home-context-identity > span:last-child { display: grid; gap: .08rem; min-width: 0; }

.ranx-home-context-identity strong { overflow: hidden; color: var(--default-text-color); font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }

.ranx-home-context-identity small { color: var(--text-muted); font-size: .8rem; }

.ranx-home-context-open { display: inline-flex; align-items: center; gap: .28rem; flex-shrink: 0; color: var(--primary-color); font-size: .8rem; font-weight: 750; text-decoration: none; }

.ranx-home-decision-ready { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .58rem .7rem; border: 1px solid rgba(var(--primary-rgb), .2); border-radius: .42rem; background: rgba(var(--primary-rgb), .035); color: inherit; text-decoration: none; }

.ranx-home-decision-ready > span { display: grid; gap: .1rem; }

.ranx-home-decision-ready strong { color: var(--default-text-color); font-size: .82rem; }

.ranx-home-decision-ready small { color: var(--text-muted); font-size: .8rem; }

.ranx-home-lift-context-row { display: grid; grid-template-columns: minmax(11rem, .7fr) minmax(15rem, 1.35fr) auto auto; align-items: center; gap: .8rem; padding: .7rem .75rem; border: 1px solid var(--default-border); border-radius: .5rem; background: var(--custom-white); color: inherit; text-decoration: none; }

.ranx-home-lift-context-row:hover,
.ranx-home-lift-context-row:focus-visible { border-color: rgba(var(--primary-rgb), .38); box-shadow: 0 .18rem .5rem rgba(31, 42, 68, .06); }

.ranx-home-lift-context-summary { display: grid; gap: .12rem; min-width: 0; }

.ranx-home-lift-context-summary strong { overflow: hidden; color: var(--default-text-color); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }

.ranx-home-lift-context-summary small { display: -webkit-box; overflow: hidden; color: var(--text-muted); font-size: .8rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.ranx-home-lift-context-metrics { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .3rem; }

.ranx-home-lift-context-metrics > span { padding: .24rem .42rem; border: 1px solid var(--default-border); border-radius: 999px; color: var(--text-muted); font-size: .75rem; white-space: nowrap; }

.ranx-home-lift-context-metrics b { color: var(--default-text-color); }

@media (max-width: 575.98px) {
    .ranx-home-drivers-list {
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 0.65rem;
    }

    .ranx-home-driver-summary,
    .ranx-home-driver-row-meta {
        grid-column: 1;
    }

    .ranx-home-driver-row-arrow {
        grid-column: 2;
        grid-row: 1 / span 3;
    }

    .ranx-home-rank-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .ranx-home-rank-row-icon {
        grid-row: 1 / span 3;
    }

    .ranx-home-rank-metrics {
        gap: .4rem;
        grid-auto-columns: 3.25rem;
        grid-column: 2 / 4;
        grid-row: 3;
    }

    .ranx-home-rank-row .badge {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
    }

    .ranx-home-rank-row-arrow {
        grid-column: 3;
        grid-row: 1 / span 3;
    }

    .ranx-home-lift-context-row { grid-template-columns: minmax(0, 1fr) auto; }

    .ranx-home-lift-context-summary,
    .ranx-home-lift-context-metrics { grid-column: 1; }

    .ranx-home-lift-context-metrics { justify-content: flex-start; }

    .ranx-home-lift-context-row > i { grid-column: 2; grid-row: 1 / span 3; }
}

/* ---- Greeting line ---- */
.ranx-home-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ranx-home-greeting-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0F172A;
}

.ranx-home-greeting-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.ranx-home-refresh {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--default-border);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    transition: border-color 0.16s ease, color 0.16s ease;
}

.ranx-home-refresh:hover,
.ranx-home-refresh:focus-visible {
    border-color: rgba(var(--primary-rgb), 0.45);
    color: rgb(var(--primary-rgb));
    outline: none;
}

.ranx-home-refresh:disabled {
    opacity: 0.6;
}

/* ---- Loop rail: one step per module; the module color is identity, never status ---- */
.ranx-home-rail {
    display: grid;
    grid-template-columns: repeat(var(--ranx-home-lifecycle-columns, 5), minmax(0, 1fr));
    gap: 0.9rem;
}

.ranx-home-rail-step {
    --module-rgb: var(--primary-rgb);
    --module-color: rgb(var(--primary-rgb));
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--default-border);
    border-top: 3px solid var(--module-color);
    border-radius: var(--ranx-block-radius);
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.ranx-home-rail-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -0.62rem;
    width: 0.4rem;
    height: 0.4rem;
    border-top: 2px solid #C3CBD8;
    border-right: 2px solid #C3CBD8;
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
}

.ranx-home-rail-step:hover,
.ranx-home-rail-step:focus-visible {
    border-color: rgba(var(--module-rgb), 0.4);
    border-top-color: var(--module-color);
    outline: none;
}

.ranx-home-rail-step.is-active {
    border-color: rgba(var(--module-rgb), 0.5);
    border-top-color: var(--module-color);
    background: linear-gradient(rgba(var(--module-rgb), 0.06), rgba(var(--module-rgb), 0.06)), #fff;
    box-shadow: 0 0.5rem 1.2rem rgba(var(--module-rgb), 0.12);
}

.ranx-home-rail-icon {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(var(--module-rgb), 0.12);
    color: var(--module-color);
}

.ranx-home-rail-icon .side-menu__icon {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--module-color);
    fill: currentColor !important;
}

.ranx-home-rail-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ranx-home-rail-name {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0F172A;
}

.ranx-home-rail-status {
    font-size: 0.8rem;
    line-height: 1.25;
    color: var(--text-muted);
}

.ranx-home-rail-step.is-empty {
    border-top-color: rgba(var(--module-rgb), 0.4);
}

.ranx-home-rail-step.is-empty .ranx-home-rail-icon {
    opacity: 0.55;
}

.ranx-home-rail-step.is-empty .ranx-home-rail-name {
    font-weight: 600;
    color: #475569;
}

/* ---- Your plan ---- */
.ranx-home-plan .card-body {
    padding: 1.15rem 1.5rem 1.25rem;
}

.ranx-home-plan-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.3rem;
}

.ranx-home-plan-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(var(--primary-rgb));
}

.ranx-home-plan-kicker-part {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-muted);
}

.ranx-home-plan-kicker-part::before {
    content: "\00B7";
    margin-right: 0.5rem;
    color: #94A3B8;
}

.ranx-home-plan-why-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    border: 0;
    background: none;
    color: rgb(var(--primary-rgb));
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.ranx-home-plan-contexts {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    margin: 0.2rem 0 0.7rem;
    padding: 0.2rem;
    border-radius: var(--ranx-block-radius);
    background: #EEF2F8;
}

.ranx-home-plan-context {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.75rem;
    border: 0;
    border-radius: 999px;
    background: none;
    color: #475569;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
}

.ranx-home-plan-context.is-active {
    background: #fff;
    color: #0F172A;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
}

.ranx-home-plan-context:disabled {
    opacity: 0.7;
}

.ranx-home-plan-context-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.15rem;
    padding: 0 0.25rem;
    border-radius: 0.25rem;
    background: var(--ranx-audience-color, rgb(var(--primary-rgb)));
    color: var(--ranx-audience-on-color, #fff);
    font-size: 0.66rem;
    font-weight: 700;
}

.ranx-home-plan-headline {
    max-width: 62rem;
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    color: #0F172A;
}

.ranx-home-plan-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 1.75rem;
    margin: 0 0 0.75rem;
}

.ranx-home-plan-number {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
}

.ranx-home-plan-number b {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0F172A;
}

.ranx-home-plan-number span,
.ranx-home-plan-numbers-source {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.ranx-home-plan-change {
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-muted);
}

.ranx-home-plan-change.is-up {
    color: #1D7550;
}

.ranx-home-plan-change.is-down {
    color: rgb(var(--danger-rgb));
}

.ranx-home-plan-summary {
    max-width: 62rem;
    margin: 0 0 0.9rem;
    font-size: 0.95rem;
    color: #475569;
}

.ranx-home-plan-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.9rem;
    color: #1D7550;
}

.ranx-home-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 0.75rem;
}

.ranx-home-step {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--default-border);
    border-radius: var(--ranx-block-radius);
    background: #fff;
}

.ranx-home-step.is-blocking {
    border-color: rgba(var(--secondary-rgb), 0.6);
    background: rgba(var(--secondary-rgb), 0.1);
}

.ranx-home-step-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.ranx-home-step-number {
    width: 1.3rem;
    height: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #EEF2F8;
    color: #334155;
    font-size: 0.7rem;
}

.ranx-home-step.is-blocking .ranx-home-step-label {
    color: #8A5A00;
}

.ranx-home-step.is-blocking .ranx-home-step-number {
    background: rgb(var(--secondary-rgb));
    color: #3D2A00;
}

.ranx-home-step-title {
    font-size: 0.975rem;
    font-weight: 600;
    line-height: 1.3;
    color: #0F172A;
}

.ranx-home-step-detail {
    flex: 1 1 auto;
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--text-muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.ranx-home-step .btn {
    align-self: flex-start;
    margin-top: 0.3rem;
}

.ranx-home-steps-more {
    margin-top: 0.5rem;
    font-weight: 600;
}

.ranx-home-plan-why {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--default-border);
}

.ranx-home-plan-why[hidden] {
    display: none;
}

.ranx-home-plan-why h3 {
    margin: 0 0 0.45rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0F172A;
}

.ranx-home-plan-why p {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: #475569;
}

.ranx-home-plan-evidence {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.3rem 1rem;
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
}

.ranx-home-plan-evidence dt {
    font-weight: 600;
    color: #334155;
}

.ranx-home-plan-evidence dd {
    margin: 0;
    color: #475569;
}

.ranx-home-plan-provenance {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.ranx-home-plan-feedback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--default-border);
    font-size: 0.8125rem;
}

.ranx-home-plan-feedback:last-child {
    border-bottom: 0;
}

.ranx-home-plan-feedback-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: #334155;
}

.ranx-home-plan-feedback-copy small {
    color: var(--text-muted);
}

.ranx-home-plan-feedback-actions {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.3rem;
}

.ranx-home-plan-feedback-actions button {
    padding: 0.12rem 0.55rem;
    border: 1px solid var(--default-border);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font: inherit;
    font-size: 0.75rem;
}

.ranx-home-plan-feedback-actions button.is-selected {
    border-color: rgba(var(--primary-rgb), 0.45);
    background: rgba(var(--primary-rgb), 0.08);
    color: rgb(var(--primary-rgb));
}

.ranx-home-plan-feedback-actions button:disabled {
    opacity: 0.6;
}

/* ---- Module panel header ---- */
.ranx-home-module-panel-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

/* ---- Loading skeleton for the greeting, rail and plan ---- */
.ranx-home-skeleton-greeting {
    width: 14rem;
    height: 1.1rem;
}

.ranx-home-skeleton-account {
    width: 8rem;
    height: 0.8rem;
}

.ranx-home-skeleton-rail-name {
    display: block;
    width: 4.5rem;
    height: 0.85rem;
}

.ranx-home-skeleton-rail-status {
    display: block;
    width: 6.5rem;
    height: 0.7rem;
}

.ranx-home-skeleton-headline {
    width: min(32rem, 90%);
    height: 1.6rem;
}

.ranx-home-skeleton-step-label {
    display: block;
    width: 5rem;
    height: 0.7rem;
}

.ranx-home-skeleton-step-title {
    display: block;
    width: 80%;
    height: 0.95rem;
}

.ranx-home-skeleton-panel-icon {
    width: 3rem;
    height: 3rem;
}

@media (max-width: 991.98px) {
    .ranx-home-rail {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .ranx-home-rail-step::after {
        display: none;
    }

    .ranx-home-plan-why {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 575.98px) {
    .ranx-home-rail-icon {
        display: none;
    }

    .ranx-home-rail-step {
        padding: 0.45rem 0.55rem;
    }

    .ranx-home-rail-name {
        font-size: 0.85rem;
    }

    .ranx-home-rail-status {
        font-size: 0.72rem;
    }

    .ranx-home-plan .card-body {
        padding: 1rem;
    }

    .ranx-home-plan-top {
        align-items: flex-start;
    }

    .ranx-home-plan-why-toggle {
        white-space: nowrap;
    }

    .ranx-home-plan-headline {
        font-size: 1.25rem;
    }

    .ranx-home-plan-feedback {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---- Listen panel: one number strip, then the surveys ---- */
.ranx-home-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 2.25rem;
    margin-bottom: 0.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--default-border);
}

.ranx-home-number {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    color: inherit;
    text-decoration: none;
}

.ranx-home-number b {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0F172A;
}

.ranx-home-number span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ranx-home-number.is-attention b {
    color: #9A6200;
}

a.ranx-home-number:hover span,
a.ranx-home-number:focus-visible span {
    color: rgb(var(--primary-rgb));
}

.ranx-home-listen-list {
    display: flex;
    flex-direction: column;
}

.ranx-home-listen-row {
    display: grid;
    grid-template-columns: 1.8rem minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.9rem;
    padding: 0.7rem 0.15rem;
    border-bottom: 1px solid #EEF1F6;
    color: inherit;
    text-decoration: none;
}

.ranx-home-listen-row:last-child {
    border-bottom: 0;
}

.ranx-home-listen-row:hover .ranx-home-listen-name,
.ranx-home-listen-row:focus-visible .ranx-home-listen-name {
    color: rgb(var(--primary-rgb));
}

.ranx-home-listen-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.ranx-home-listen-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.ranx-home-listen-name {
    font-weight: 600;
    color: #0F172A;
}

.ranx-home-listen-detail {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.ranx-home-listen-status {
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: #EEF2F8;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.ranx-home-listen-status.is-live {
    background: rgba(49, 181, 127, 0.13);
    color: #1D7550;
}

.ranx-home-listen-status.is-needs-you {
    background: rgba(var(--secondary-rgb), 0.16);
    color: #8A5A00;
}

.ranx-home-listen-status.is-ready {
    background: rgba(var(--primary-rgb), 0.08);
    color: rgb(var(--primary-rgb));
}

.ranx-home-listen-arrow {
    color: #94A3B8;
}

.ranx-home-listen-more {
    margin-top: 0.35rem;
    font-weight: 600;
}

/* ---- Empty module panels: one line and one button ---- */
.ranx-home-empty-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.25rem 0;
    color: var(--text-muted);
}

@media (max-width: 575.98px) {
    .ranx-home-listen-row {
        grid-template-columns: 1.8rem minmax(0, 1fr) auto;
    }

    .ranx-home-listen-arrow {
        display: none;
    }

    .ranx-home-numbers {
        gap: 0.4rem 1.25rem;
    }
}

/* ---- Pilot timeline: today against the public 90-day promise ---- */
.ranx-home-pilot {
    position: relative;
    margin: 0 0 1.1rem;
    padding-bottom: 2.35rem;
}

.ranx-home-pilot-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    font-size: 0.875rem;
    color: #334155;
}

.ranx-home-pilot-head b {
    color: rgb(var(--primary-rgb));
}

.ranx-home-pilot-track {
    position: relative;
    height: 0.45rem;
    margin: 0 0.4rem;
    border-radius: 999px;
    background: #E6EBF3;
}

.ranx-home-pilot-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--ranx-home-pilot-at);
    border-radius: 999px;
    background: rgb(var(--primary-rgb));
}

.ranx-home-pilot-mark,
.ranx-home-pilot-now {
    position: absolute;
    top: 50%;
    left: var(--ranx-home-pilot-at);
    border-radius: 999px;
    background: #fff;
    transform: translate(-50%, -50%);
}

.ranx-home-pilot-mark {
    width: 0.7rem;
    height: 0.7rem;
    border: 2px solid #B6C2D4;
}

.ranx-home-pilot-mark.is-done {
    border-color: rgb(var(--primary-rgb));
    background: rgb(var(--primary-rgb));
}

.ranx-home-pilot-now {
    width: 1rem;
    height: 1rem;
    border: 3px solid rgb(var(--primary-rgb));
}

.ranx-home-pilot-label {
    position: absolute;
    top: 0.85rem;
    left: var(--ranx-home-pilot-at);
    transform: translateX(-50%);
    font-size: 0.75rem;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    color: var(--text-muted);
}

.ranx-home-pilot-label b {
    display: block;
    font-weight: 600;
    color: #0F172A;
}

.ranx-home-pilot-label.is-end {
    transform: translateX(-100%);
    text-align: right;
}

@media (max-width: 575.98px) {
    .ranx-home-pilot-label {
        font-size: 0.68rem;
    }

    .ranx-home-pilot-label span {
        display: none;
    }
}
