/* Shared department profile: content comes from the existing department CRUD. */
.uos-department-profile-page { background: #fff; }
.uos-department-profile-page .uos-department-page { --dept-navy: #17143b; --dept-gold: #ffc107; --dept-line: #e4e4e8; background: #fff; color: #29292d; font: 14px/1.65 var(--font-primary,sans-serif); width: 100%; }
.uos-department-page *, .uos-department-page *::before, .uos-department-page *::after { box-sizing: border-box; }
.uos-department-page [hidden] { display: none !important; }
.uos-department-page :is(h1,h2,h3,p,figure) { margin: 0; font-family: inherit; }
.uos-department-page :is(h1,h2,h3) { color: #16161b; line-height: 1.25; font-weight: 650; }
html:root body.uos-department-profile-page .uos-department-page h2 { font-size: clamp(22px,1.7vw,29px) !important; }
html:root body.uos-department-profile-page .uos-department-page h3 { font-size: 18px !important; }
.uos-department-page p { font-size: 14px; line-height: 1.65; }
.uos-department-page a { color: inherit; text-decoration: none; }
.uos-department-page a:visited { color: inherit; }
.uos-department-page :is(a,button,summary,[tabindex]):focus-visible { outline: 3px solid #b58a00; outline-offset: 4px; }
.uos-department-page :is(section,article,details)[id] { scroll-margin-top: calc(var(--uos-sticky-header-height,120px) + 20px); }
.uos-department-page .dept-shell { width: min(1800px,calc(100% - 80px)); margin-inline: auto; min-width: 0; }
.uos-department-page .dept-shell > *, .dept-section-heading > div { min-width: 0; }
.dept-section { padding: 24px 0; }
.dept-section--soft { background: #f7f7f8; }
.uos-department-page .dept-kicker { color: #48484f; font-size: 13px; margin-bottom: 8px; letter-spacing: .025em; }
.dept-richtext { overflow-wrap: anywhere; }
.dept-richtext :is(p,ul,ol) { margin-bottom: 14px; }
.dept-richtext > :last-child { margin-bottom: 0; }
.dept-richtext img { max-width: 100%; height: auto; }
.dept-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.uos-department-page .dept-button { display: inline-flex; justify-content: center; align-items: center; width: auto; min-height: 38px; padding: 9px 15px; border: 1px solid #a6a6b3; border-radius: 4px; background: #fff; color: var(--dept-navy); font: 500 12px/1.4 var(--font-primary,sans-serif); cursor: pointer; }
.uos-department-page .dept-button:hover { background: var(--dept-navy); color: #fff; border-color: var(--dept-navy); }
.uos-department-page .dept-button--gold:is(:link,:visited,:active,:focus), .uos-department-page button.dept-button--gold { background: var(--dept-gold); border-color: var(--dept-gold); color: #17143b; }
.uos-department-page .dept-button--gold:hover { background: #ffd04a; border-color: #ffd04a; color: #17143b; }
.dept-intro { isolation: isolate; }
.dept-banner { height: clamp(250px,28vw,450px); overflow: hidden; background: var(--dept-navy); }
.dept-banner img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.uos-department-page .dept-welcome { position: relative; margin-top: -115px; min-height: 235px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; padding: 36px 44px; border: 1px solid var(--dept-line); border-radius: 12px; background: #fff; }
.dept-welcome .dept-kicker { font-size: 19px; text-transform: uppercase; margin-bottom: 10px; }
html:root body.uos-department-profile-page .dept-welcome h1 { font-size: clamp(34px,4.6vw,76px) !important; color: var(--dept-navy); font-weight: 800; text-transform: uppercase; line-height: 1.04; letter-spacing: -.03em; overflow-wrap: anywhere; }
.dept-welcome h1 span { display: block; color: var(--dept-gold); }
html:root body.uos-department-profile-page .dept-welcome h1 span { font-size: inherit !important; font-weight: inherit; line-height: inherit; }
.dept-welcome .dept-actions { gap: 12px; }
.uos-department-page .dept-welcome .dept-slogan { color: var(--dept-navy); font-size: clamp(18px,1.5vw,26px); font-weight: 600; line-height: 1.5; }
.dept-chair { display: grid; grid-template-columns: minmax(0,.42fr) minmax(0,1fr); min-height: 320px; border-radius: 12px; overflow: hidden; background: var(--dept-navy); }
.dept-chair__photo { position: relative; min-height: 300px; background: #eeeff2; }
.dept-chair__photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.dept-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100%; min-height: 190px; color: #b5b6bd; background: #eeeff2; }
.dept-placeholder i { font-size: 55px; }
.dept-placeholder span { font-size: 12px; }
.dept-chair__message { display: flex; flex-direction: column; align-items: stretch; padding: 28px 32px; color: #fff; }
.dept-chair__message::before { content: ''; width: 60px; height: 3px; border-radius: 2px; background: var(--dept-gold); margin-bottom: 20px; flex-shrink: 0; }
html:root body.uos-department-profile-page .dept-chair__message h2 { color: #fff; font-size: 20px !important; margin-bottom: 16px; }
.dept-chair__message .dept-richtext { color: #ecebf5; }
.uos-department-profile-page .dept-chair__message :is(p,li) { color: #ecebf5 !important; }
.dept-chair__signature { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-top: auto; padding-top: 24px; }
.dept-chair__signature strong { color: #fff; font-size: 14px; font-style: italic; }
.dept-chair__signature p { font-size: 12px; margin-top: 3px; color: #e4e3ef; }
.dept-chair__signature .dept-button { flex-shrink: 0; }
.dept-overview { display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1fr); gap: 24px; align-items: stretch; }
.dept-values { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.dept-value, .dept-about { border: 1px solid var(--dept-line); border-radius: 10px; overflow: hidden; background: #fff; }
.dept-value { padding: 28px; }
.dept-value > i { display: block; color: var(--dept-navy); font-size: 52px; margin: 5px 0 24px; }
.dept-value h2, .dept-value h3 { margin-bottom: 18px; }
.dept-about { display: flex; flex-direction: column; }
.dept-about__image { width: 100%; height: auto; aspect-ratio: 8 / 3; object-fit: cover; object-position: center; display: block; flex-shrink: 0; }
.dept-about__body { padding: 24px; }
.dept-about__body h2 { margin-bottom: 16px; }
.dept-about__body > .dept-button { margin-top: 18px; }
.dept-statistics { margin-top: 24px; padding: 54px 0; background: var(--dept-navy); }
.dept-stats { display: grid; grid-template-columns: repeat(var(--stat-count,4),minmax(0,1fr)); gap: 24px; }
.dept-stats article { display: flex; flex-direction: column; justify-content: center; padding: 30px; min-height: 200px; border: 1px solid #8a879f; border-radius: 10px; color: #fff; }
.dept-stats strong { display: block; color: inherit; line-height: 1.15; font-weight: 650; margin-bottom: 18px; }
.dept-stats strong, .uos-faculty-stat strong { white-space:nowrap; word-break:normal; overflow-wrap:normal; font-variant-numeric:tabular-nums; }
html:root body.uos-department-profile-page .dept-stats strong { font-size: clamp(35px,3.6vw,60px) !important; }
.dept-stats article:last-child { background: #fff; color: var(--dept-navy); border-color: #fff; }
.dept-stats p { color: inherit; }
.uos-department-page #department-stats-title { color: #fff; margin: 0; }
.uos-department-page #department-at-a-glance { margin-top: 0; padding: 24px 0 20px; }
.uos-department-page #department-at-a-glance .dept-section-heading { align-items: center; margin-bottom: 16px; }
.uos-department-page #department-at-a-glance .dept-controls { padding-bottom: 0; }
.uos-department-page #department-at-a-glance .dept-controls button:is(:hover,:focus-visible) { background: var(--dept-gold); border-color: var(--dept-gold); color: var(--dept-navy); }
.uos-department-page .dept-stats--scroll { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(220px,1fr); gap: 20px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--dept-gold) transparent; padding-bottom: 16px; }
.uos-department-page .dept-stats--scroll article { min-width: 0; min-height: 150px; padding: 20px; scroll-snap-align: start; }
.uos-department-profile-page .dept-stats p { color: inherit !important; }
.dept-statistics + .dept-section { padding-top: 42px; }
.dept-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.dept-section-heading h2 { margin-bottom: 8px; }
.dept-section-heading > div > :last-child { margin-bottom: 0; }
.uos-department-detail > .dept-section { padding: 18px 0; }
.uos-department-detail .dept-section-heading { margin-bottom: 18px; }
.uos-department-detail .dept-overview { gap: 18px; }
.uos-department-detail .dept-values { gap: 16px; }
.dept-table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid var(--dept-line); border-radius: 9px; margin-bottom: 24px; }
.dept-programme-table { width: 100%; min-width: 620px; border-collapse: collapse; margin: 0; table-layout: auto; }
.dept-programme-table :is(th,td) { border: 0; border-bottom: 1px solid #ececef; padding: 14px 18px; font-size: 13px; text-align: left; vertical-align: top; }
.dept-programme-table th { background: #f5f5f6; color: #37373e; font-weight: 600; white-space: nowrap; text-transform: none; }
.dept-programme-table tbody tr { background: #fff; }
.dept-programme-table tr:last-child td { border-bottom: 0; }
.dept-programme-table a:hover { text-decoration: underline; }
.dept-programmes { display: grid; gap: 10px; }
.dept-programme { min-width: 0; border: 1px solid var(--dept-line); border-radius: 8px; overflow: hidden; }
.dept-programme summary { display: flex; align-items: center; gap: 15px; padding: 18px 20px; list-style: none; cursor: pointer; color: #18181e; font-size: 15px; font-weight: 550; }
.dept-programme summary::-webkit-details-marker { display: none; }
.dept-programme summary > span:first-child { min-width: 0; }
.dept-programme summary svg { flex-shrink: 0; transition: transform .2s; }
.dept-programme summary:hover, .dept-programme summary:focus-visible { background: var(--dept-navy); color: #fff; }
.dept-programme[open] summary svg { transform: rotate(90deg); }
.dept-programme__level { margin-left: auto; padding: 3px 7px; border-radius: 3px; background: #eeedf2; color: #686675; text-transform: uppercase; font-size: 10px !important; font-weight: 500; white-space: nowrap; }
.dept-programme__body { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 28px; padding: 0 20px 22px; }
.dept-programme__facts { display: flex; flex-direction: column; gap: 10px; }
.dept-programme__facts > div { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100px; padding: 15px; text-align: center; border: 1px solid #eeeeF2; border-radius: 9px; }
.dept-programme__facts strong { color: var(--dept-navy); font-weight: 600; line-height: 1.15; margin-bottom: 5px; }
html:root body.uos-department-profile-page .dept-programme__facts strong { font-size: var(--dept-fact-size,42px) !important; }
html:root body.uos-department-profile-page .dept-programme__facts strong.dept-programme__long-value { font-size: 15px !important; line-height: 1.5; }
.dept-programme__facts span { font-size: 11px; }
.dept-programme__copy { padding-top: 12px; }
.dept-programme__copy h3 { margin-bottom: 10px; }
.dept-programme__copy > p, .dept-programme__copy > .dept-richtext { margin-bottom: 22px; }
.dept-programme__copy .dept-actions { margin-top: 20px; }
.dept-programme__details { font-size: 12px; text-decoration: underline !important; text-underline-offset: 4px; }
.dept-controls { display: flex; gap: 8px; flex-shrink: 0; padding-bottom: 4px; }
.dept-controls button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--dept-line); border-radius: 4px; background: #fff; color: var(--dept-navy); font-size: 24px; line-height: 1; padding: 0; cursor: pointer; }
.dept-controls button:hover { background: var(--dept-navy); border-color: var(--dept-navy); color: #fff; }
.dept-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px)/3); gap: 24px; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; padding: 2px 0 14px; }
.dept-track > * { min-width: 0; scroll-snap-align: start; }
.dept-person { border: 1px solid var(--dept-line); border-radius: 8px; overflow: hidden; background: #fff; }
.dept-person__photo { display: block; height: 210px; background: #eeeff2; }
.dept-person__photo img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center top; }
.dept-person__body { padding: 18px 20px; }
.dept-person__body h3 { margin-bottom: 7px; }
.dept-person__body p { font-size: 12px; color: #55545f; }
.dept-person__links { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; }
.dept-person__links a { font-size: 11px; color: #504e68; }
.dept-person__links a:hover { text-decoration: underline; }
/* Compact faculty cards, scoped to department staff so office cards retain their layout. */
.uos-department-page #people .dept-track--faculty { grid-auto-columns: 280px; gap: 20px; }
.uos-department-page #people .dept-person { display: flex; flex-direction: column; border-top: 3px solid var(--dept-gold); border-radius: 12px; box-shadow: 0 3px 10px rgba(23,20,59,.05); transition: border-color .2s,box-shadow .2s; }
.uos-department-page #people .dept-person__photo { flex-shrink: 0; height: 190px; background: #eeedf4; }
.uos-department-page #people .dept-person__photo .dept-placeholder { min-height: 0; background: #eeedf4; color: var(--dept-navy); }
.uos-department-page #people .dept-person__body { flex: 1; padding: 16px 18px; border-top: 1px solid var(--dept-line); transition: background .2s,border-color .2s; }
.uos-department-page #people .dept-person__body h3 { color: var(--dept-navy); line-height: 1.4; overflow-wrap: anywhere; }
.uos-department-page #people .dept-person__body h3 a { transition: color .2s; }
.uos-department-page #people .dept-person__body p { color: #55516d; transition: color .2s; }
.uos-department-page #people .dept-person:is(:hover,:focus-within) { border-color: var(--dept-navy); border-top-color: var(--dept-gold); box-shadow: 0 5px 14px rgba(23,20,59,.12); }
.uos-department-page #people .dept-person:is(:hover,:focus-within) .dept-person__body { background: var(--dept-navy); border-top-color: var(--dept-navy); }
.uos-department-page #people .dept-person:is(:hover,:focus-within) h3 a { color: var(--dept-gold); }
html:root body .uos-department-page #people .dept-person:is(:hover,:focus-within) .dept-person__body p,
html:root body .uos-department-page #people .dept-person:is(:hover,:focus-within) .dept-person__links a { color: #fff; }
@media(max-width:767px) { .uos-department-page #people .dept-track--faculty { grid-auto-columns: min(280px,85%); gap: 16px; } }
.dept-track--research { grid-auto-columns: calc((100% - 72px)/3.5); }
.dept-research-card { padding: 22px; min-height: 170px; background: #fff; border: 1px solid var(--dept-line); border-radius: 8px; }
.dept-research-card h3 { margin-bottom: 14px; }
.dept-research-card p { font-size: 12px; color: #666570; }
.dept-research-card:hover { background: var(--dept-navy); color: #fff; }
.dept-research-card:hover :is(h3,p) { color: #fff; }
.dept-research-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 4px; font-size: 12px; }
.dept-research-links a { text-decoration: underline; text-underline-offset: 4px; }
.dept-news .uos-office-news { width: 100%; padding: 0; }
.dept-news .uos-office-news__header h2 { margin-bottom: 8px; }
.dept-news .uos-office-news__header p { font-size: 14px; }
.dept-extra-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 24px; }
.dept-accreditation { display: block; width: 90px; height: 90px; object-fit: contain; margin-bottom: 20px; }
.dept-student-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.dept-student-grid > a { display: flex; align-items: center; min-width: 0; gap: 14px; border: 1px solid var(--dept-line); border-radius: 8px; padding: 18px; }
.dept-student-grid > a > i { color: var(--dept-navy); font-size: 30px; flex: 0 0 30px; }
html:root body.uos-department-profile-page .dept-student-grid h3 { font-size: 16px !important; font-weight: 500; }
.dept-student-grid span { color: #777780; font-size: 11px; }
.dept-student-grid .dept-link-arrow { margin-left: auto; font-size: 25px; color: #696875; }
.dept-student-grid > a:hover, .dept-student-grid > a:focus-visible { background: var(--dept-navy); border-color: var(--dept-navy); }
.dept-student-grid > a:is(:hover,:focus-visible) :is(h3,i,span) { color: #fff; }
.dept-alumni { --uos-red: #d13b34; }
.uos-department-page .dept-alumni .dept-shell { max-width: 1260px; }
.dept-alumni .rts__section--wrapper.v__9 { text-align: center; margin-bottom: 20px; }
.uos-department-page .dept-alumni .rts__section--description { margin-top: 16px; color: #79797f; }
.dept-alumni .rts__testimonial--active { min-width: 0; }
.dept-alumni .swiper-wrapper { align-items: stretch; }
.dept-alumni .swiper-slide { height: auto; }
.dept-alumni .rts__single--testimonial { height: 100%; }
.dept-alumni .rts__author--info { flex: 1; }
.dept-alumni .rts__single--testimonial--author--meta { min-width: 0; flex: 1; }
.dept-alumni .rts__single--testimonial--quote { flex-shrink: 0; }
.dept-alumni__placeholder { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #d9d9df; color: var(--dept-navy); }
.dept-alumni__empty, .dept-alumni__actions { text-align: center; }
.dept-alumni__actions { margin-top: 20px; }
.dept-contact-section { background: linear-gradient(180deg,#fff 65%,var(--dept-navy) 65%); padding-bottom: 24px; }
.dept-contact { display: grid; grid-template-columns: minmax(0,.7fr) minmax(0,1.4fr); gap: 60px; align-items: center; padding: 36px; border: 1px solid #d8d8df; border-radius: 14px; background: #fff; }
.dept-contact__heading .dept-kicker { font-size: 20px; }
html:root body.uos-department-profile-page .dept-contact__heading h2 { font-size: clamp(38px,4vw,64px) !important; font-weight: 800; text-transform: uppercase; line-height: 1.05; }
.dept-contact__heading h2 span { display: block; color: var(--dept-gold); }
html:root body.uos-department-profile-page .dept-contact__heading h2 span { font-size: inherit !important; font-weight: inherit; line-height: inherit; }
.dept-contact__grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 30px; }
.dept-contact__grid article { display: flex; align-items: flex-start; gap: 18px; min-width: 0; }
.dept-contact__grid article > i { flex: 0 0 34px; width: 34px; font-size: 35px; color: #332b75; text-align: center; margin-top: 5px; }
.dept-contact__grid article > div { min-width: 0; }
.dept-contact__grid h3 { margin-bottom: 10px; }
.dept-contact__grid p { font-size: 13px; overflow-wrap: anywhere; }
@media(max-width:1100px) {
    .uos-department-page .dept-shell { width: calc(100% - 48px); }
    .uos-department-page .dept-welcome { gap: 28px; padding: 30px; }
    .dept-chair__message { padding: 24px; }
    .dept-student-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dept-contact { grid-template-columns: minmax(0,.6fr) minmax(0,1.4fr); gap: 30px; padding: 28px; }
    .dept-contact__grid { gap: 24px; }
    .dept-track { grid-auto-columns: calc((100% - 24px)/2); }
    .dept-track--research { grid-auto-columns: 42%; }
}
@media(max-width:767px) {
    .uos-department-page .dept-shell { width: calc(100% - 32px); }
    .dept-banner { height: 250px; }
    .uos-department-page .dept-welcome { margin-top: -60px; grid-template-columns: 1fr; gap: 22px; min-height: 0; padding: 24px; }
    .dept-welcome .dept-kicker { font-size: 15px; }
    .dept-welcome .dept-actions { gap: 8px; }
    .uos-department-page .dept-button { padding: 9px 12px; }
    .dept-chair { grid-template-columns: 1fr; }
    .dept-chair__photo { min-height: 0; height: 260px; }
    .dept-chair__photo img { min-height: 0; max-height: none; height: 260px; }
    .dept-chair__message { padding: 24px; }
    .dept-chair__signature { align-items: flex-start; }
    .dept-overview { grid-template-columns: 1fr; }
    .dept-values { grid-template-rows: auto; grid-template-columns: 1fr 1fr; gap: 16px; }
    .dept-value { padding: 22px; }
    .dept-value > i { font-size: 40px; margin-bottom: 20px; }
    .dept-statistics { padding: 30px 0; margin-top: 12px; }
    .dept-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
    .dept-stats article { padding: 22px; min-height: 155px; }
    .dept-statistics + .dept-section { padding-top: 30px; }
    .dept-programme__body { grid-template-columns: 135px minmax(0,1fr); gap: 18px; padding: 0 16px 18px; }
    .dept-programme__facts { --dept-fact-size: 34px; }
    .dept-programme summary { padding: 16px; gap: 10px; font-size: 14px; }
    .dept-programme__level { font-size: 9px !important; }
    .dept-track { grid-auto-columns: 85%; gap: 16px; }
    .dept-section-heading { gap: 16px; }
    .dept-contact { grid-template-columns: 1fr; gap: 30px; padding: 26px; }
    .dept-contact__grid h3 { margin-bottom: 8px; }
    .dept-contact__grid article > i { flex-basis: 26px; width: 26px; font-size: 28px; }
    .dept-contact__grid article { gap: 12px; }
}
@media(max-width:480px) {
    .dept-values { grid-template-columns: 1fr; }
    .dept-programme__body { grid-template-columns: 1fr; }
    .dept-programme__facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
    .dept-programme__facts > div { min-height: 100px; padding: 10px 5px; }
    .dept-programme__facts { --dept-fact-size: 30px; }
    html:root body.uos-department-profile-page .dept-programme__facts strong.dept-programme__long-value { font-size: 11px !important; }
    .dept-programme__facts span { font-size: 10px; }
    .dept-programme__level { white-space: nowrap; text-align: center; }
    .dept-student-grid { grid-template-columns: 1fr; gap: 12px; }
    .dept-contact__grid { grid-template-columns: 1fr; }
    .dept-controls button { width: 32px; height: 32px; }
}
@media(prefers-reduced-motion:reduce) { .uos-department-page * { transition: none !important; scroll-behavior: auto !important; } }
