
/* The active site design remains the shared visual language. */
.unified {
    --content-edge: clamp(20px, 3vw, 36px);
    --paragraph-space: .75rem;
    --heading-space: .6rem;
    --section-space: 1.75rem;
}
.unified > .content {
    display: flow-root;
    margin-block: 0;
    padding-block: var(--content-edge);
}
.unified :is(.content, .home, .material-container) :is(h1, h2, h3, h4, h5, h6) {
    margin-block: var(--section-space) var(--heading-space);
    padding-block: 0;
}
.unified :is(.content, .resource-directory, article, .home2, .material-container, .tags) > :is(h1, h2, h3, h4, h5, h6):first-child {
    margin-block-start: 0;
}
.unified :where(.content, .home, .material-container) :where(p, ul, ol, dl, blockquote, pre):not(:where(
    table *, .pgwSlider, .pgwSlideshow *, .slick-dots, .slick-slider *, .tags *
)) {
    margin-block: var(--paragraph-space);
}
.unified :where(.content, .home, .material-container) :where(h1, h2, h3, h4, h5, h6) + :where(p, ul, ol, dl) {
    margin-block-start: 0;
}
.unified .content article {
    margin-block: 0;
    padding-block-end: 0;
}
.unified .content article + article { margin-block-start: var(--section-space); }
.unified .content hr { margin-block: 0 var(--paragraph-space); }
.unified .content :is(.gallery, #photo_gallery) {
    padding-block: 0;
    margin-block: 0 var(--paragraph-space);
}
.unified > .page-heading {
    padding-block: .7rem;
}
.unified .page-heading .navigation {
    box-sizing: border-box;
    padding-inline: 0;
    text-align: left;
    word-wrap: break-word;
}
.unified .page-heading ol { margin: 0; padding: 0; list-style: none; }
.unified .page-heading li, .unified .page-heading a { display: inline; font: inherit; letter-spacing: inherit; }
.unified .page-heading .path-separator { margin-inline: .45em; }
.unified .page-heading h1 {
    display: inline;
    margin: 0;
    padding: 0;
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
}
.unified .page-heading a:is(:hover, :focus-visible) { text-decoration: underline; }
.unified .page-heading a:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
.unified #faculty-timetable,
.unified #faculty-timetable > h2 { margin-block-start: 0; }
.unified #faculty-timetable .event-anchors { text-align: left; margin: 0; }
.unified #faculty-timetable .event-anchors a {
    margin: 0 .5em;
    font-size: inherit;
    white-space: nowrap;
}
.unified #faculty-timetable a[aria-current] { color: inherit; }
.unified #faculty-timetable a:focus-visible { outline: 1px solid currentColor; }
.unified #faculty-timetable th { font-weight: normal; text-align: left; white-space: nowrap; padding-inline: 0 1em; }
.unified .news { margin-block: 0; }
.unified .news .section > hr { margin-block: var(--section-space) .95rem; }
.unified .news .section > hr:first-of-type { margin-block-start: 0; }
.unified .news .section > h1 { margin-block: 0 .35rem; }
.unified .news .section > .time { padding-block: 0; margin-block-end: var(--paragraph-space); }
.unified .news .section > .text { display: flow-root; }
.unified .news .section > .text > p:first-child { margin-block-start: 0; }
.unified .home1 { justify-content: flex-start; gap: var(--paragraph-space); }
.unified :is(.home1, .home2) { padding-block: var(--content-edge); }
.unified .home .box3 { min-height: 0; margin-block: 0; padding-block: 0 var(--paragraph-space); }
.unified .home .box3 h3:first-child { margin-block-start: 0; }
.unified :is(p,li,dd,dt,figcaption,blockquote,td,th,.text) a[href]:not(:is(
    nav *, .tags *, .event-anchors *, .navigation *, .gallery *, .gallery1 *, .pgwSlider *,
    .related-materials *, h1 *, h2 *, h3 *, h4 *, .clavulus, .material-search-results > li > a, [role="button"]
)):not(:has(img, .box, .box1, h2, h3)) {
    text-decoration: underline;
    text-underline-offset: .15em;
}
.unified .resource-directory > section { width: auto; margin: 0; }
.unified .resource-directory > section + section { margin-block-start: var(--section-space); }
.unified .resource-directory > section h2 { margin-block-start: 0; }
.unified .material-disclosure { margin: 1.2em 0; }
.unified .material-disclosure > summary { cursor: pointer; }
.unified .material-disclosure[open] > summary { margin-bottom: .8em; }
.unified .standalone-photo { margin: .9em 0; }
.unified .standalone-photo img { display: block; width: auto; max-height: 24rem; object-fit: contain; }
.unified .standalone-photo figcaption { font-size: .94em; margin-top: .4em; }
.unified .material-photo-grid .standalone-photo img { max-height: 10rem; }
.unified .material-photo-grid .standalone-photo { width: 180px; max-width: 100%; }
.unified .material-photo-grid .standalone-photo p { font-size: .9em; }
.unified .bibliography-entry { margin: 1.25em 0; }
.photo-viewer { max-width: 92vw; max-height: 92vh; padding: 1rem; border: none; background: #fff; }
.photo-viewer::backdrop { background: rgba(60, 72, 89, .8); }
.photo-viewer button { display: block; margin: 0 0 .5em auto; }
.photo-viewer img { display: block; max-width: 87vw; max-height: 78vh; object-fit: contain; }
.unified .content { min-width: 0; }
.unified .content > .board { box-sizing: border-box; }
.unified :where(.box, .box1, .box2) { color: #8394ab; border-color: #8394ab; }
.unified .staff-intro { display: flow-root; }
.unified .staff-intro > .tags { margin-bottom: 0; }
.unified img.alumni-memorial { filter: grayscale(100%); }
.unified .staff-columns > .section { text-align: left; }
.unified .staff-columns > .section > article { margin-inline: 0; }
.unified .staff-columns [aria-current="page"].box1 { color: #3c4859; cursor: default; }
.unified .staff-portrait {
    display: block;
    position: relative;
    overflow: hidden;
    width: 180px;
    max-width: 100%;
    aspect-ratio: 9 / 11;
}
.unified .third .staff-portrait { margin-inline: auto; }
.unified .staff-portrait img {
    position: absolute;
    width: 194%;
    max-width: none;
    top: -30%;
    left: -41%;
}
.unified .conference-event { display: inline-block; vertical-align: top; max-width: 100%; margin-bottom: .75em; }
.unified .conference-event :is(.box, .box1) { box-sizing: border-box; max-width: 100%; }
.unified { overflow-wrap: anywhere; }
.unified img { max-width: 100%; height: auto; }
.unified h1, .unified h2, .unified h3 { text-align: left; }
.unified iframe, .unified object, .unified embed { max-width: 100%; }
.unified iframe[src*="youtube"], .unified iframe[src*="vimeo"] { width: 100%; height: auto; aspect-ratio: 16/9; }
.unified .pgwSlider { display: flow-root; }
/* The original PgwSlider allocates its thumbnail height across every slide.
   For long albums keep its native column/strip and let only that list scroll. */
.unified .pgwSlider.long-album.wide { position: relative; }
.unified .pgwSlider.long-album.wide > .ps-list {
    position: absolute; right: 0; top: 0; bottom: 0;
    overflow-y: auto; overflow-x: hidden;
}
.unified .pgwSlider.long-album.wide.listOnTheLeft > .ps-list { left: 0; right: auto; }
.unified .pgwSlider.long-album.wide > .ps-list > li {
    height: 72px !important; min-height: 72px; width: 100% !important;
}
.unified .pgwSlider.long-album.narrow > .ps-list {
    display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
}
.unified .pgwSlider.long-album.narrow > .ps-list > li {
    float: none; flex: 0 0 15%; width: 15% !important;
    height: 50px !important; min-height: 50px; margin-bottom: 0;
}
.unified .pgwSlider.long-album > .ps-list > li img {
    width: 100%; height: 100%; object-fit: cover;
}

.unified .pgwSlider .ps-current > .ps-prev,
.unified .pgwSlider .ps-current > .ps-next { z-index: 3; }
.unified pre { white-space: pre-wrap; }
.unified audio, .unified video { display: block; max-width: 100%; margin: 1em 0; }
.unified video { width: 100%; max-height: 75vh; }
.unified table { max-width: 100%; border-collapse: collapse; }
.unified td, .unified th { padding: .35em .5em; vertical-align: top; }
.table-scroll { width: 100%; overflow-x: auto; }
.unified .event-material, .unified .downloads { clear: both; margin: 1.8em 0; }
.unified .related-materials { clear: both; margin: 2em 0; }
.unified .material-photo-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.unified .material-photo-grid a { display: block; max-width: 220px; }
.unified .material-photo-grid img { width: 220px; height: 160px; object-fit: contain; }
.unified .material-center { text-align: center; }
.unified .unavailable { color: inherit; text-decoration: none; }
.unified .text-break { display: block; margin: 1em 0; }
.unified .year-anchor, .unified h1[id], .unified h2[id], .unified #fotografii { scroll-margin-top: 18px; }
.unified .section { display: flow-root; }
.unified .section > .text { clear: none; }
.unified .section section { width: auto; margin-left: 0; max-width: 100%; box-sizing: border-box; }
.unified > .content > section { width: auto; margin-left: 0; }
.unified .event-material, .unified .related-materials, .unified .downloads, .unified .table-scroll, .unified .recordings { width: auto; margin-left: 0; }
.unified .tags ul { list-style: none; padding: 0; }
.unified .news > .tags ul { margin-block-start: 0; }
.unified .tags li { padding: .3em 0; }
.site-search label { display: block; margin-bottom: .5em; }
.site-search input { width: 65%; min-width: 0; padding: .5em; }
.material-search input { max-width: 100%; padding: .6em; }
button.clavulus { cursor: pointer; font-family: inherit; }
button.clavulus:hover { background-color: #3c4859; border-color: #3c4859; }
.material-search-results li { margin: 1em 0; }
.material-search-results p { margin-block-start: .25rem; overflow-wrap: anywhere; }
.slicknav_menu { clear: both; }
@media (max-width: 800px) {
  .unified .content { padding-left: 16px; padding-right: 16px; }
  .unified .page-heading .navigation { padding-inline: 16px; }
  .unified .gallery { display: flex; flex-wrap: wrap; justify-content: center; }
  .unified .gallery > a { max-width: 100%; }
  .unified .box { box-sizing: border-box; max-width: 100%; }
  .unified .tags { display: none; }
  .unified .section { margin-left: 0; width: auto; }
  .unified .section { text-align: left; }
  .unified table { width: auto; }
  .unified .three { display: flex; flex-wrap: wrap; justify-content: center; }
}

/* Use the catalogue's original 180 × 220 cover proportions and column rhythm. */
.unified .three.publication-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    gap: 2.5rem 1.5rem;
}
.unified .publication-grid > .third {
    width: auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0 20px;
    overflow: visible;
    overflow-wrap: break-word;
}
.unified .publication-covers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    height: 220px;
    min-width: 0;
    max-width: 100%;
}
.unified .publication-covers > a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 180px;
    min-width: 0;
    height: 100%;
}
.unified .publication-covers > img,
.unified .publication-covers > a > img {
    display: block;
    width: 180px;
    height: 220px;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    object-fit: contain;
}
.unified .publication-covers > img { flex: 0 1 180px; min-width: 0; }
@media (max-width: 1000px) {
    .unified .three.publication-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .unified .three.publication-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Continuous groups of the reference site's three/third and gallery/box cards.
   Track size is limited by available content width, not by the window alone. */
.unified :is(.site-card-grid, .site-tile-grid, .site-compact-grid, .site-photo-grid, .site-card-media) {
    --grid-gap: 1.5rem;
    --grid-min: 220px;
    --grid-column-floor: calc((100% - 2 * var(--grid-gap)) / 3);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--grid-min), var(--grid-column-floor))), 1fr));
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    align-items: start;
    justify-content: start;
    margin-inline: auto;
    gap: 2.5rem var(--grid-gap);
}
.unified :is(.site-card-grid, .site-card-media) > :is(a, .third),
.unified .site-card-grid > a > .third {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    margin: 0;
    overflow: visible;
}
.unified :is(.site-card-grid, .site-card-media) > .third,
.unified .site-card-grid > a > .third {
    padding-inline: 20px;
    overflow-wrap: break-word;
}
.unified .site-card-media > :is(ul.pgwSlider, .pgwSlideshow) {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
}
.unified :is(.site-tile-grid, .site-compact-grid) {
    gap: .75rem var(--grid-gap);
    margin-block: 0 var(--paragraph-space);
}
.unified .site-compact-grid,
.unified .site-photo-grid {
    --grid-gap: .75rem;
    --grid-min: 220px;
    --grid-column-floor: calc((100% - 3 * var(--grid-gap)) / 4);
}
.unified :is(.site-tile-grid, .site-compact-grid) > :is(a, .conference-event),
.unified :is(.site-tile-grid, .site-compact-grid, .site-card-grid) > a > .gallery {
    display: block;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    width: 100%;
    margin: 0;
}
.unified :is(.site-tile-grid, .site-compact-grid) > :is(.box, .box1),
.unified :is(.site-tile-grid, .site-compact-grid, .site-card-grid) > a > :is(.box, .box1),
.unified .site-tile-grid > .conference-event > a > :is(.box, .box1) {
    display: block;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    margin: 0;
    overflow-wrap: break-word;
}
/* The conference title is the only tile; column count follows the content box. */
.unified .site-tile-grid.conference-list {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    align-items: stretch;
    gap: .75rem;
}
.unified .conference-list > .conference-event {
    width: 100%;
    min-width: 0;
    margin: 0;
    align-self: stretch;
}
.unified .conference-list > .conference-event > a {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
}
.unified .site-tile-grid.conference-list > .conference-event > a > .box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
/* A single independent document keeps the reference's natural button width. */
.unified .gallery.site-tile-grid:has(> a:only-child):not(a *, .site-illustrated-grid *, .conference-event *) {
    display: block;
}
.unified .gallery.site-tile-grid:has(> a:only-child):not(a *, .site-illustrated-grid *, .conference-event *) > a {
    display: inline-block;
    width: auto;
}
.unified .site-compact-grid:has(> a:only-child) {
    display: block;
}
.unified .site-compact-grid:has(> a:only-child) > a {
    display: inline-block;
    width: auto;
}
.unified .site-photo-grid {
    --grid-min: 180px;
    row-gap: 1rem;
    justify-items: center;
}
.unified .site-photo-grid > :is(a, .standalone-photo) {
    display: block;
    min-width: 0;
    max-width: 100%;
    margin: 0;
}
.unified .site-media-flow {
    display: flow-root;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.unified .site-illustrated-grid {
    display: grid;
    grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
}
.unified .site-illustrated-grid > a { display: block; min-width: 0; }
.unified .site-illustrated-grid > a > img {
    display: block;
    float: none !important;
    margin: 0 !important;
    max-width: 100%;
}
.unified .site-illustrated-grid > .site-exam-documents {
    --grid-column-floor: 100%;
    margin-block: 0;
}
.unified .home1 { min-width: 0; }
.unified .home1 > a {
    display: block;
    min-width: 0;
    max-width: 100%;
}
.unified .home1 .box3 {
    display: block;
    max-width: 100%;
    width: 350px;
    margin-inline: 0;
    overflow-wrap: break-word;
}
@media (max-width: 1030px) {
    .unified .home1 {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(min(100%, max(220px, calc((100% - 2 * 1.5rem) / 3))), 1fr));
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        gap: 1.5rem;
        padding-inline: 0;
        align-items: start;
    }
    .unified .home1 > a { width: 100%; max-width: 100%; }
    .unified .home1 .box3 { width: 100%; }
}
@media (max-width: 1000px) {
    .unified :is(.site-card-grid, .site-card-media, .site-tile-grid, .site-compact-grid, .site-photo-grid) {
        --grid-column-floor: calc((100% - var(--grid-gap)) / 2);
    }
    .unified .home1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    .unified .site-illustrated-grid { grid-template-columns: minmax(0, 1fr); }
    .unified .site-illustrated-grid > .site-exam-documents { --grid-column-floor: calc((100% - var(--grid-gap)) / 2); }
}
@media (max-width: 650px) {
    .unified :is(.site-card-grid, .site-card-media, .site-tile-grid) {
        grid-template-columns: minmax(0, 1fr);
    }
    .unified .site-compact-grid { --grid-min: 200px; }
    .unified .home1 { grid-template-columns: minmax(0, 1fr); }
    .unified .home1 > a { max-width: 390px; margin-inline: auto; }
}

/* Presentation only: the editorial database retains the original addresses.
   The server supplies the visibility flag before the page is painted. */
html[data-facebook-links="hidden"]:not([data-editor]) :is(
    [data-cf-facebook-only="1"], [data-cf-facebook-link="1"],
    a[href*="facebook.com" i], a[href*="fb.com" i], a[href*="fb.me" i],
    a[href*="fb.watch" i], a[href*="fbcdn.net" i],
    area[href*="facebook.com" i], iframe[src*="facebook.com" i],
    .ya-share2__item_service_facebook),
.desk-preview[data-facebook-links="hidden"] :is(
    [data-cf-facebook-only="1"], [data-cf-facebook-link="1"],
    a[href*="facebook.com" i], a[href*="fb.com" i], a[href*="fb.me" i],
    a[href*="fb.watch" i], a[href*="fbcdn.net" i],
    area[href*="facebook.com" i], iframe[src*="facebook.com" i],
    .ya-share2__item_service_facebook) {
    display: none !important;
}


/* Search is a single native form, not a content section with a fixed height. */
.unified.search-page { min-height: 0; }
.search-page .material-search label {
    display: block;
    margin-bottom: .45em;
}
.search-page .material-search > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: .5em;
}
.search-page .material-search input[type="search"] {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: .5em .75em;
    border: 1px solid #8394ab;
    border-radius: 4px;
    background: #fff;
    color: #3c4859;
    font: inherit;
    font-size: max(16px, 1em);
    -webkit-appearance: none;
    appearance: none;
}
.search-page .material-search :is(input, button):focus-visible {
    outline: 2px solid #3c4859;
    outline-offset: 2px;
}
.search-page .material-search button.clavulus {
    min-height: 44px;
    margin: 0;
    white-space: nowrap;
}
@media (max-width: 360px) {
    .search-page .material-search > div { grid-template-columns: minmax(0, 1fr); }
    .search-page .material-search button.clavulus { justify-self: end; }
}

/* Composition and colours from the department's err404.php. */
.error-page { text-align: center; }
.error-folio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 250px;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    background: linear-gradient(rgba(60,72,89,.75), rgba(60,72,89,.75)),
                #3c4859 url(/404.jpg) center / cover no-repeat;
}
.error-folio .error-number { margin: 0; padding: 0; font-size: 4em; line-height: 1.2; color: #fff; }
.error-folio .big { margin: 0; color: #e9e9e9; }
.error-reading {
    display: inline-block;
    max-width: 700px;
    margin-top: 10px;
    font-size: 1.1em;
    line-height: 1.6;
    text-align: left;
}
.unified .content .error-game hr { margin: 40px 0; border: 0; border-top: 2px solid #e9e9e9; }
.error-note { max-width: 700px; margin: 0 auto; text-align: left; }
.error-game .board { box-sizing: border-box; }
html:not(.js) .error-game .board { display: none; }
@media (max-width: 600px) {
    .error-reading { margin-inline: 26px; padding-inline: 10px; }
    .error-reading::before, .error-reading::after { font-size: 64px; line-height: 1; }
    .error-game .tile { min-width: 0; overflow-wrap: anywhere; }
}

/* Only an actual tap places the existing dropdown in this state. */
#menu[data-touch-menu] > li:not([data-touch-open]) > .submenu {
    transform: rotateX(-90deg); visibility: hidden; opacity: 0;
}
#menu[data-touch-menu] > li[data-touch-open] > .submenu {
    transform: rotateX(0deg); visibility: visible; opacity: 1;
}
[data-touch-pages] { touch-action: pan-y pinch-zoom; }

/* Keep the reference tile width when it fits, with equal space on either side. */
@media (max-width: 650px) {
    .unified .home1 > a { width: 100%; max-width: 390px; min-width: 0; }
    .unified .home1 .box3 {
        display: block;
        max-width: 100%;
        margin-inline: auto;
        transition-property: color, border-color, box-shadow, background-color;
    }
}
/* The header must also fit before the phone menu is ready, or without scripts. */
@media (max-width: 1000px) {
    .js #menu { display: none; }
    .js .slicknav_menu { display: block; }
    html:not(.js) #menu { flex-wrap: wrap; justify-content: center; }
    #header:not(:has(.slicknav_menu)) #menu { display: flex; flex-wrap: wrap; justify-content: center; }
    #header:not(:has(.slicknav_menu)) #menu > li > ul { display: none; }
    #header:not(:has(.slicknav_menu)) #menu > li:is(:hover, :focus-within) > ul {
        display: block; position: static; min-width: 0; transform: none; visibility: visible; opacity: 1;
    }
}

/* Keep the visual size of the 2017 photographs while the slider loads. */
.unified ul.pgwSlider[data-gallery-reserve] {
    list-style: none;
    padding: 0;
    margin: 0;
}
.unified ul.pgwSlider[data-gallery-reserve] > li { display: inline-block; vertical-align: top; width: 47%; margin: 0 2% 12px 0; }
.unified ul.pgwSlider[data-gallery-reserve] > li img { display: block; max-width: 100%; height: auto; }
.unified ul.pgwSlider[data-gallery-reserve][data-enhancing] > li { display: none; }
.unified ul.pgwSlider[data-gallery-reserve][data-enhancing] > li:first-child {
    display: block;
    width: 100%;
    margin: 0;
}
.unified .photo-archive-link { display: inline-block; line-height: 24px; min-height: 24px; }
.unified .event-anchors a, .unified .site-tile-grid .box, .unified .site-tile-grid .box1 { color: #536884; }
