/* Research-grant recipient timeline and tables. */
.uni-grants { --grants-ink: #14243a; --grants-muted: #5b6778; --grants-line: #dce2e9; padding: 8px 0 34px; color: var(--grants-ink); }
.uni-grants-header { max-width: 840px; margin: 0 auto 58px; text-align: center; }
.uni-grants-header .uni-eyebrow { margin-bottom: 10px; }
.uni-grants-header h1 { margin: 0; color: var(--grants-ink); font-size: clamp(34px, 4.2vw, 52px); line-height: 1.12; }
.uni-grants-header h1::after { display: block; width: 88px; height: 3px; margin: 24px auto 0; content: ''; background: var(--secondary-color); border-radius: 3px; }
.uni-grants-header > p:last-child:not(.uni-eyebrow) { max-width: 700px; margin: 20px auto 0; color: var(--grants-muted); font-size: 17px; line-height: 1.7; }

.uni-grants-timeline { position: relative; }
.uni-grants-year { position: relative; display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 34px; padding-bottom: 58px; }
.uni-grants-year:last-child { padding-bottom: 0; }
.uni-grants-year__rail { position: relative; display: flex; justify-content: center; }
.uni-grants-year__rail::after { position: absolute; top: 86px; bottom: -58px; left: 50%; width: 2px; content: ''; background: linear-gradient(var(--grants-line), var(--grants-line)); transform: translateX(-50%); }
.uni-grants-year:last-child .uni-grants-year__rail::after { display: none; }
.uni-grants-year__rail span { position: relative; z-index: 1; display: inline-flex; width: 86px; height: 86px; align-items: center; justify-content: center; color: #fff; background: var(--primary-color); border: 7px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--grants-line), 0 10px 28px rgba(16, 36, 61, .15); font-size: 18px; font-weight: 900; letter-spacing: .02em; }
.uni-grants-year__content { display: grid; gap: 24px; min-width: 0; }

.uni-grants-panel { position: relative; min-width: 0; overflow: visible; background: #fff; border: 1px solid var(--grants-line); border-radius: 12px; box-shadow: 0 12px 34px rgba(16, 36, 61, .07); }
.uni-grants-panel:first-child::before { position: absolute; top: 30px; left: -11px; width: 20px; height: 20px; content: ''; background: #fff; border-bottom: 1px solid var(--grants-line); border-left: 1px solid var(--grants-line); transform: rotate(45deg); }
.uni-grants-panel__heading { position: relative; padding: 25px 28px 20px; border-bottom: 1px solid var(--grants-line); }
.uni-grants-panel__heading p { margin: 0 0 6px; color: var(--primary-color); font-size: 13px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.uni-grants-panel--external .uni-grants-panel__heading p { color: #8b6711; }
.uni-grants-panel__heading h2 { max-width: 950px; margin: 0; color: var(--grants-ink); font-size: clamp(19px, 2vw, 24px); line-height: 1.35; }
.uni-grants-table-wrap { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; border-radius: 0 0 12px 12px; scrollbar-color: var(--primary-color) #eef1f4; }
.uni-grants-table-wrap:focus { outline: 3px solid var(--primary-color); outline-offset: 3px; }
.uni-grants-table { width: 100%; min-width: 720px; margin: 0; border-collapse: collapse; table-layout: fixed; }
.uni-grants-table th, .uni-grants-table td { padding: 15px 17px; border-right: 1px solid var(--grants-line); border-bottom: 1px solid var(--grants-line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.uni-grants-table th:last-child, .uni-grants-table td:last-child { border-right: 0; }
.uni-grants-table tbody tr:last-child td { border-bottom: 0; }
.uni-grants-table th { color: #314158; background: #f4f6f8; font-size: 13px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.uni-grants-table td { color: #34445a; font-size: 15px; line-height: 1.65; }
.uni-grants-table th:nth-child(1), .uni-grants-table td:nth-child(1) { width: 64px; text-align: center; }
.uni-grants-table th:nth-child(2), .uni-grants-table td:nth-child(2) { width: 24%; }
.uni-grants-table th:nth-child(4), .uni-grants-table td:nth-child(4) { width: 23%; }
.uni-grants-table tbody tr:not(.uni-grants-table__empty):hover { background: color-mix(in srgb, var(--primary-color) 4%, #fff); }
.uni-grants-table__empty td { padding: 25px 18px; color: var(--grants-muted); text-align: center; font-style: italic; }

@media (max-width: 760px) {
    .uni-grants-header { margin-bottom: 42px; text-align: left; }
    .uni-grants-header h1::after { margin-left: 0; }
    .uni-grants-year { grid-template-columns: 68px minmax(0, 1fr); gap: 18px; padding-bottom: 42px; }
    .uni-grants-year__rail::after { top: 68px; bottom: -42px; }
    .uni-grants-year__rail span { width: 64px; height: 64px; border-width: 5px; font-size: 14px; }
    .uni-grants-panel:first-child::before { top: 22px; }
    .uni-grants-panel__heading { padding: 20px 21px 17px; }
    .uni-grants-table { min-width: 650px; }
}

@media (max-width: 480px) {
    .uni-grants { margin-right: -6px; margin-left: -6px; }
    .uni-grants-year { grid-template-columns: 1fr; gap: 16px; }
    .uni-grants-year__rail { justify-content: flex-start; }
    .uni-grants-year__rail::after { top: 64px; bottom: -42px; left: 31px; }
    .uni-grants-panel:first-child::before { top: -10px; left: 22px; border-top: 1px solid var(--grants-line); border-right: 0; border-bottom: 0; border-left: 1px solid var(--grants-line); }
}

@media (prefers-reduced-motion: reduce) {
    .uni-grants-table tbody tr { transition: none; }
}
