.mbap-listing .mbap-hero,
.mbap-detail .mbap-hero {
    padding-block: clamp(1.3rem, 3vw, 2.6rem);
    background: radial-gradient(ellipse at 90% 0%, #dbeaff 0%, transparent 60%), #f8fbff;
}
.mbap-listing .mbap-section,
.mbap-detail .mbap-section { padding-block: clamp(1rem, 2.5vw, 2rem) 3rem; }
.mbap-listing h1,
.mbap-detail h1 { font-size: clamp(2rem, 4vw, 3.45rem); }
.mbap-listing .mbap-search { margin-top: 1rem; }
.mbap-filter-drawer {
    padding: .9rem 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.mbap-filter-drawer summary { cursor: pointer; font-weight: 750; }
.mbap-filter-drawer[open] summary { margin-bottom: .65rem; }
.mbap-listing .mbap-filter-drawer .mbap-filters { gap: .7rem; }
.mbap-college-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(.85rem, 1.7vw, 1.4rem);
}
.mbap-college-grid > .mbap-panel { grid-column: 1 / -1; }
.mbap-college-card { padding: .55rem; transition: box-shadow 160ms, border-color 160ms; }
.mbap-college-card:hover,
.mbap-college-card:focus-within { box-shadow: 0 12px 26px #163b751c; }
.mbap-college-card .mbap-media { border-radius: 12px; background: #e8f1ff; }
.mbap-college-card .mbap-media img { object-fit: contain; background: #e8f1ff; }
.mbap-college-card .mbap-media img[hidden] { display: none; }
.mbap-college-card .mbap-media .mbap-card-logo { padding: 1.65rem; }
.mbap-listing .mbap-college-card .mbap-body { padding: .8rem .65rem .55rem; }
.mbap-listing .mbap-college-card h3 { font-size: clamp(1.18rem, 2vw, 1.45rem); }
.mbap-card-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; margin-block: .55rem .85rem; }
.mbap-card-stats > div { padding: .55rem .3rem; background: #edf4ff; border-radius: 8px; text-align: center; }
.mbap-card-stats dt { font-size: .7rem; color: var(--muted); }
.mbap-card-stats dd { margin: .2rem 0 0; font-size: .9rem; font-weight: 750; overflow-wrap: anywhere; }
.mbap-college-card .mbap-card-exams { font-size: .82rem; overflow-wrap: anywhere; }
.mbap-college-card .mbap-actions { gap: .45rem; }
.mbap-college-card .mbap-actions a:first-child { flex: 1 1 auto; }
.mbap-detail .mbap-profile-hero:has(.mbap-campus) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mbap-detail .mbap-profile-title { margin-top: .75rem; }
.mbap-detail .mbap-profile-title h1 { margin: 0 0 .5rem; }
.mbap-detail .mbap-full-name { font-weight: 650; }
.mbap-campus { min-width: 0; margin: 0; }
.mbap-campus-frame { display: block; aspect-ratio: 16 / 9; border: 5px solid #fff; border-radius: 16px; overflow: hidden; background: #e8f1ff; box-shadow: 0 12px 30px #163b751f; }
.mbap-campus-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mbap-campus figcaption { margin-top: .5rem; text-align: right; font-size: .85rem; }
.mbap-at-a-glance { padding: .75rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 1.25rem; }
.mbap-at-a-glance .mbap-facts { margin: 0; }
.mbap-at-a-glance .mbap-facts > div { flex: 1 1 125px; }
.mbap-gallery img { object-fit: contain; background: #edf4ff; }
.mbap-detail .mbap-profile { grid-template-columns: minmax(0, 1fr) minmax(200px, 265px); gap: 1.15rem; }
.mbap-detail .mbap-profile > .mbap-results { grid-column: 1; grid-row: 1; }
.mbap-toc { position: sticky; top: var(--college-nav-offset, 116px); grid-column: 2; grid-row: 1; max-height: calc(100vh - var(--college-nav-offset, 116px) - 15px); overflow-y: auto; z-index: 2; }
.mbap-toc h2 { font-size: 1.14rem; }
.mbap-toc ul { list-style: none; padding: 0; margin: 0; }
.mbap-toc-sub { padding-left: .65rem !important; }
.mbap-toc li a { display: block; padding: .38rem .55rem; border-radius: 7px; color: var(--ink); text-decoration: none; font-size: .88rem; overflow-wrap: anywhere; }
.mbap-toc li a:is(:hover, [aria-current]) { background: #e7efff; color: var(--blue); }
.mbap-toc-toggle { display: none; }
.mbap-detail .mbap-profile [id] { scroll-margin-top: var(--college-nav-offset, 116px); }
.mbap-detail .mbap-rich { overflow-x: visible; }
.mbap-rich h2, .mbap-rich h3, .mbap-rich h4 { margin-block: 1.4rem .55rem; }
.mbap-rich img { height: auto; }
.mbap-rich figure.table { width: 100% !important; max-width: 100%; margin: 1rem 0; }
.mbap-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; margin-block: .7rem 1rem; border: 1px solid #d5e2f3; border-radius: 12px; }
.mbap-detail :is(.mbap-rich, .mbap-table-scroll) table { width: 100% !important; height: auto !important; margin: 0; border-collapse: separate; border-spacing: 0; color: var(--ink); }
.mbap-table-scroll table.mbap-wide-table,
.mbap-table-scroll table.mbap-table { min-width: 590px; }
.mbap-detail :is(.mbap-rich, .mbap-table-scroll) table :is(td, th) {
    padding: .65rem .75rem;
    border: 0;
    border-bottom: 1px solid #dce6f3;
    border-right: 1px solid #dce6f3;
    background: #fff;
    vertical-align: top;
    overflow-wrap: normal;
    box-shadow: none;
}
.mbap-detail :is(.mbap-rich, .mbap-table-scroll) table tbody tr:nth-child(even) > * { background: #f0f5fd; }
.mbap-detail :is(.mbap-rich, .mbap-table-scroll) table :is(thead tr, tr.mbap-table-header) > * { color: #fff; background: #15366b; white-space: normal; }
.mbap-table-scroll table.mbap-sticky-column tr > :first-child { position: sticky; left: 0; z-index: 1; }
.mbap-table-scroll .mbap-amount { text-align: right; }
.mbap-table-scroll :is(th,td) p:last-child { margin-bottom: 0; }
@media (max-width: 991px) {
    .mbap-college-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mbap-detail .mbap-profile { grid-template-columns: minmax(0, 1fr); }
    .mbap-detail .mbap-profile > :is(.mbap-results, .mbap-toc) { grid-column: 1; grid-row: auto; }
    .mbap-toc { position: static; max-height: none; }
    .mbap-toc[data-enhanced] h2 { display: none; }
    .mbap-toc[data-enhanced] .mbap-toc-toggle { display: flex; justify-content: space-between; width: 100%; border: 0; background: transparent; color: var(--ink); padding: 0; font-weight: 750; }
    .mbap-toc[data-enhanced] .mbap-toc-toggle[aria-expanded="false"] + ul { display: none; }
}
@media (max-width: 575px) {
    .mbap-college-grid, .mbap-detail .mbap-profile-hero:has(.mbap-campus) { grid-template-columns: minmax(0, 1fr); }
    .mbap-at-a-glance .mbap-facts > div { flex-basis: 42%; }
}

.mbap-detail table :is(thead tr, tr.mbap-table-header) > :is(th, td),
.mbap-detail table :is(thead tr, tr.mbap-table-header) > :is(th, td) * {
    color: #fff !important;
}
