/* Simpson's paradox (/simpsons-paradox): only what is the app's own, the case-mix bars and the data table whose cells
   are inputs. Panels, tiles, the callout, fields, buttons, the table and the chart come from the app kit (css/app-kit,
   docs/app-kit.md). Loaded only on this app's page (StylePaths). */

.sp-landing-app .sp-legend {
    margin-bottom: 0.5rem;
}

/* --- Where each option's cases are: per option one bar split by group ------------------------------------------- */

.sp-landing-app .sp-mix {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--ak-border);
}

.sp-landing-app .sp-mix-caption {
    margin: 0 0 0.45rem;
    color: var(--ak-muted);
    font-size: var(--ak-fs-sm);
}

.sp-landing-app .sp-mix-rows {
    display: grid;
    grid-template-columns: minmax(5rem, max-content) 1fr;
    gap: 0.4rem 0.75rem;
    align-items: center;
}

.sp-landing-app .sp-mix-row {
    display: contents;
}

.sp-landing-app .sp-mix-name {
    overflow: hidden;
    font-size: var(--ak-fs-sm);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 12rem;
}

.sp-landing-app .sp-mix-bar {
    display: flex;
    height: 1.6rem;
    overflow: hidden;
    border-radius: var(--ak-radius-sm, 0.35rem);
    background: var(--ak-grid);
}

.sp-landing-app .sp-mix-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    background: var(--sp-color);
    color: #fff;
    font-size: var(--ak-fs-xs);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgb(0 0 0 / 35%);
}

.sp-landing-app .sp-mix-seg + .sp-mix-seg {
    box-shadow: inset 2px 0 0 var(--ak-panel);
}

.sp-landing-app .sp-mix-legend {
    margin-top: 0.55rem;
}

/* --- The data table: the cells are compact inputs, the better rate per row is marked --------------------------- */

.sp-landing-app .sp-table th,
.sp-landing-app .sp-table td {
    padding-block: 0.3rem;
}

.sp-landing-app .sp-head-names th {
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
}

/* The kit's fields fill their box (width: 100%); in the table they keep a compact size. */
.sp-landing-app .sp-label {
    min-width: 7.5rem;
    max-width: 14rem;
}

.sp-landing-app .sp-count {
    min-width: 4.5rem;
    max-width: 6rem;
}

.sp-landing-app .sp-rate {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sp-landing-app .sp-rate.is-better {
    color: var(--ak-success);
    font-weight: 700;
}

.sp-landing-app .sp-rate.is-better::before {
    content: "▲ ";
    font-size: 0.7em;
    vertical-align: 0.1em;
}
