body.enrollment-characteristics-page {
    --enrollment-sticky-top: 61px;
    --enrollment-column-header-height: 48px;
    --enrollment-characteristic-width: 160px;
    --enrollment-total-width: 92px;
    --enrollment-year-width: 48px;
    --enrollment-compact-year-width: 88px;
    overflow-x: hidden;
}

body.enrollment-characteristics-page .apply,
body.enrollment-characteristics-page .apply .app-con {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden !important;
}

body.enrollment-characteristics-page .apply .app-top {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px 16px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius-lg);
    background: #fff;
    box-shadow: var(--portal-shadow-sm);
}

body.enrollment-characteristics-page .apply .app-top .appmenu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 150px;
    margin: 0;
}

body.enrollment-characteristics-page .apply .app-top .appmenu label {
    color: var(--portal-subtle);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.enrollment-characteristics-page .set-year {
    width: 118px;
    height: 34px !important;
    padding: 0 10px;
    border: 1px solid var(--portal-border) !important;
    border-radius: var(--portal-radius-sm) !important;
    color: var(--portal-text);
    font-size: 14px;
    font-weight: 700;
}

body.enrollment-characteristics-page .enrollment-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 14px;
}

body.enrollment-characteristics-page .enrollment-summary-item {
    min-height: 68px;
    padding: 14px 16px;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius-lg);
    background: #fff;
    box-shadow: var(--portal-shadow-sm);
}

body.enrollment-characteristics-page .enrollment-summary-label {
    color: var(--portal-subtle);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.enrollment-characteristics-page .enrollment-summary-value {
    margin-top: 4px;
    color: var(--portal-text);
    font-family: var(--portal-font-serif);
    font-size: 25px;
    font-weight: 800;
    line-height: 1.05;
}

body.enrollment-characteristics-page .apply .app-con .app-grid {
    min-width: 0;
    max-width: 100%;
    overflow: hidden !important;
}

body.enrollment-characteristics-page .t-con {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: visible;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}

body.enrollment-characteristics-page .t-con1 {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    background:
        linear-gradient(90deg, #fff 0, rgba(255, 255, 255, 0)) left / 26px 100% no-repeat,
        linear-gradient(270deg, #fff 0, rgba(255, 255, 255, 0)) right / 26px 100% no-repeat;
}

body.enrollment-characteristics-page .enrollment-matrix-table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0;
    table-layout: fixed;
}

body.enrollment-characteristics-page .enrollment-matrix-table thead {
    position: static !important;
    z-index: auto;
}

body.enrollment-characteristics-page .enrollment-matrix-table thead td {
    box-sizing: border-box;
    position: static !important;
    top: auto !important;
    z-index: 40;
    height: 48px !important;
    padding: 8px 7px !important;
    border-bottom: 1px solid var(--portal-border) !important;
    background: #faf8f8 !important;
    color: var(--portal-subtle) !important;
    text-align: right !important;
    vertical-align: middle;
}

body.enrollment-characteristics-page .enrollment-matrix-table thead .matrix-col-characteristic {
    width: var(--enrollment-characteristic-width);
    text-align: left !important;
}

body.enrollment-characteristics-page .enrollment-matrix-table thead .matrix-col-total {
    width: var(--enrollment-total-width);
    background: #f6eeee !important;
    color: var(--stanford-cardinal) !important;
}

body.enrollment-characteristics-page .enrollment-matrix-table thead .matrix-year-col {
    width: var(--enrollment-year-width);
    min-width: var(--enrollment-year-width);
    max-width: var(--enrollment-year-width);
}

body.enrollment-characteristics-page .enrollment-matrix-table thead .matrix-year-compact {
    width: var(--enrollment-compact-year-width);
    min-width: var(--enrollment-compact-year-width);
    max-width: var(--enrollment-compact-year-width);
}

body.enrollment-characteristics-page .matrix-year-label,
body.enrollment-characteristics-page .matrix-year-count {
    display: block;
}

body.enrollment-characteristics-page .matrix-year-label {
    color: var(--portal-text);
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.1;
    white-space: normal;
}

body.enrollment-characteristics-page .matrix-year-count {
    margin-top: 2px;
    color: var(--portal-subtle);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

body.enrollment-characteristics-page .matrix-sticky-left {
    position: sticky;
    left: 0;
    z-index: 12;
}

body.enrollment-characteristics-page .matrix-sticky-total {
    position: sticky;
    left: var(--enrollment-characteristic-width);
    z-index: 11;
}

body.enrollment-characteristics-page .enrollment-matrix-table thead .matrix-sticky-left,
body.enrollment-characteristics-page .enrollment-matrix-table thead .matrix-sticky-total {
    position: static !important;
    z-index: 44;
}

body.enrollment-characteristics-page .enrollment-matrix-table thead .matrix-sticky-left {
    left: 0;
}

body.enrollment-characteristics-page .enrollment-matrix-table thead .matrix-sticky-total {
    left: var(--enrollment-characteristic-width);
}

body.enrollment-characteristics-page .enrollment-floating-header {
    position: fixed;
    top: var(--enrollment-sticky-top);
    display: none;
    align-items: stretch;
    border: 1px solid var(--portal-border);
    border-top: 0;
    background: #faf8f8;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    pointer-events: none;
    z-index: 90;
}

body.enrollment-characteristics-page.enrollment-table-header-stuck .enrollment-floating-header {
    display: flex;
}

body.enrollment-characteristics-page .enrollment-floating-header-cell {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    height: 48px;
    padding: 8px 7px;
    border-right: 1px solid var(--portal-border);
    background: #faf8f8;
    color: var(--portal-subtle);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-align: right;
    text-transform: uppercase;
}

body.enrollment-characteristics-page .enrollment-floating-header-cell:last-child {
    border-right: 0;
}

body.enrollment-characteristics-page .enrollment-floating-header-cell.matrix-col-characteristic {
    align-items: flex-start;
    text-align: left;
}

body.enrollment-characteristics-page .enrollment-floating-header-cell.matrix-col-total {
    background: #f6eeee;
    color: var(--stanford-cardinal);
}

body.enrollment-characteristics-page .enrollment-matrix-table tbody .matrix-section-row td {
    position: static;
    height: 36px !important;
    padding: 9px 14px !important;
    border-top: 1px solid var(--portal-border) !important;
    border-bottom: 1px solid var(--portal-border) !important;
    background: #f5f7f2 !important;
    color: var(--stanford-palo-alto) !important;
    font-size: 12px !important;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-align: left !important;
    text-transform: uppercase;
    vertical-align: middle;
}

body.enrollment-characteristics-page .matrix-section-heading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 24px;
    line-height: 1;
    vertical-align: middle;
}

body.enrollment-characteristics-page .matrix-section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
}

body.enrollment-characteristics-page .matrix-section-label::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: var(--stanford-cardinal);
}

body.enrollment-characteristics-page .matrix-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(47, 112, 96, 0.1);
    color: var(--stanford-palo-alto);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-transform: none;
    vertical-align: middle;
}

body.enrollment-characteristics-page .enrollment-matrix-table tbody td {
    box-sizing: border-box;
    height: 52px !important;
    padding: 9px 7px !important;
    border-bottom: 1px solid var(--portal-border) !important;
    background: #fff;
    color: var(--portal-muted) !important;
    text-align: right !important;
    vertical-align: middle;
}

body.enrollment-characteristics-page .enrollment-matrix-table tbody tr.matrix-data-row:hover td {
    background-color: #fbfaf8;
}

body.enrollment-characteristics-page .enrollment-matrix-table .matrix-label-cell {
    width: var(--enrollment-characteristic-width);
    padding-left: 12px !important;
    border-right: 1px solid var(--portal-border);
    background: #fff !important;
    color: var(--portal-text) !important;
    font-size: 12.5px !important;
    font-weight: 800;
    line-height: 1.25;
    text-align: left !important;
    white-space: normal;
}

body.enrollment-characteristics-page .enrollment-matrix-table .matrix-total-cell {
    width: var(--enrollment-total-width);
    border-right: 1px solid var(--portal-border);
    background: #fff7f7 !important;
    color: var(--stanford-cardinal) !important;
}

body.enrollment-characteristics-page .matrix-value {
    position: relative;
    display: grid;
    justify-items: end;
    gap: 4px;
    min-height: 32px;
}

body.enrollment-characteristics-page .matrix-value::before {
    content: "";
    position: absolute;
    inset: -4px -5px;
    border-radius: var(--portal-radius-sm);
    background: rgba(140, 21, 21, var(--heat-alpha, 0));
    pointer-events: none;
}

body.enrollment-characteristics-page .matrix-count,
body.enrollment-characteristics-page .matrix-percent {
    position: relative;
    z-index: 1;
}

body.enrollment-characteristics-page .matrix-count {
    color: var(--portal-text);
    font-size: 14.5px;
    font-weight: 900;
    line-height: 1;
}

body.enrollment-characteristics-page .matrix-percent {
    color: var(--portal-subtle);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

body.enrollment-characteristics-page .matrix-value-zero .matrix-count,
body.enrollment-characteristics-page .matrix-value-zero .matrix-percent {
    color: #b9b1ad;
}

body.enrollment-characteristics-page .matrix-total-cell .matrix-count {
    color: var(--stanford-cardinal);
}

body.enrollment-characteristics-page .content-tips {
    margin: 0 !important;
    padding: 96px 20px !important;
    color: var(--portal-subtle);
    font-size: 14px;
}

@media (max-width: 1100px) {
    body.enrollment-characteristics-page .enrollment-summary {
        grid-template-columns: 1fr;
    }

    body.enrollment-characteristics-page .t-con {
        overflow-x: auto;
    }

    body.enrollment-characteristics-page .t-con1,
    body.enrollment-characteristics-page .enrollment-matrix-table {
        width: 1040px !important;
        min-width: 1040px !important;
        max-width: none;
    }

    body.enrollment-characteristics-page .enrollment-matrix-table thead td {
        top: 0 !important;
    }
}

@media (max-width: 680px) {
    body.enrollment-characteristics-page {
        --enrollment-sticky-top: 66px;
    }

    body.enrollment-characteristics-page .apply .app-top {
        padding: 12px;
    }

    body.enrollment-characteristics-page .apply .app-top .appmenu,
    body.enrollment-characteristics-page .apply .app-top .select2-container {
        width: 100% !important;
    }
}
