/* Editorial content families: directories, people, guidance and document archives. */
.iate-migration { color: #2b355a; min-width: 0; overflow-wrap: break-word; }
/* Department staff: consistent 3:4 portrait frames and resource chips. */
.iate-migration .iate-staff-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-block: 32px; }
.iate-migration .iate-staff-card { min-width: 0; padding: 24px; border: 1px solid #dfe3ea; background: #fff; }
.iate-migration .iate-staff-card header { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.iate-migration .iate-staff-card img { flex: 0 0 104px; width: 104px; height: calc(104px * 4 / 3); object-fit: cover; object-position: center 20%; background: #f5f6f8; }
.iate-migration .iate-staff-card h2 { margin: 0 0 10px; font-size: 22px; line-height: 1.3; }
.iate-migration .iate-staff-card .iate-staff-role { margin: 0; font-size: 15px; line-height: 1.6; color: #596577; }
.iate-migration .iate-staff-card > p { font-size: 16px; line-height: 1.7; }
.iate-migration .iate-staff-card .iate-document-list { margin-bottom: 0; }
@media (max-width: 1100px) { .iate-migration .iate-staff-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
  .iate-migration .iate-staff-card { padding: 20px; }
  .iate-migration .iate-staff-card header { gap: 14px; }
  .iate-migration .iate-staff-card img { flex-basis: 80px; width: 80px; height: calc(80px * 4 / 3); }
  .iate-migration .iate-staff-card h2 { font-size: 19px; }
}
.iate-migration.iate-wrap { padding-block: 24px 68px; }
.iate-landing .wp-block-post-content > .iate-migration { width: min(var(--wp--style--global--wide-size), calc(100% - 56px)); margin-inline: auto; padding-block: 24px 68px; }
.iate-migration p, .iate-migration li { line-height: 1.75; }
.iate-migration p { margin-block: 0 20px; }
.iate-migration ul, .iate-migration ol { padding-left: 1.35em; }
.iate-migration li + li { margin-top: 10px; }
.iate-migration h2 { margin: 0 0 22px; font-size: clamp(27px, 2.5vw, 34px); line-height: 1.25; letter-spacing: -.02em; }
.iate-migration h3 { margin: 28px 0 14px; font-size: 23px; line-height: 1.35; }
.iate-migration h4 { font-size: 20px; margin-block: 24px 12px; }
.iate-migration a { text-underline-offset: .22em; }
.iate-migration img { max-width: 100%; height: auto; }
.iate-migration figure { margin: 28px 0; }
.iate-migration figcaption { font-size: var(--iate-type-caption); color: #536071; line-height: 1.6; margin-top: 10px; }
.iate-landing .iate-migration h1 { font-size: clamp(36px, 4vw, 64px); line-height: 1.12; letter-spacing: -.025em; margin-block: 20px 32px; }
.iate-content-intro { margin-bottom: 36px; padding: 28px 32px; border-left: 3px solid #651f19; background: #f5f6f8; }
.iate-content-intro > p:not(.iate-eyebrow) { font-size: var(--iate-type-lead); color: #536071; max-width: 66ch; }
p.iate-content-intro { font-size: var(--iate-type-lead); color: #536071; }
.iate-content-intro > :last-child { margin-bottom: 0; }
.iate-content-intro .iate-display { margin-bottom: 26px; }
.iate-migration.iate-wrap > .iate-content-intro { background: none; border: 0; padding: 12px 0 38px; margin-bottom: 0; }
.iate-content-section { padding-block: 34px; border-top: 1px solid #dfe3ea; }
.iate-content-section > :last-child { margin-bottom: 0; }
.iate-info-grid, .iate-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-block: 26px; }
.iate-landing .iate-migration .iate-info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.iate-info-grid > :only-child { grid-column: 1 / -1; }
.iate-info-card, .iate-profile-card { min-width: 0; padding: 28px; border: 1px solid #e0e4eb; border-top: 3px solid #2b355a; background: #f7f8fa; }
.iate-info-card h3, .iate-profile-card h3 { margin-top: 0; font-size: 24px; }
.iate-info-card > :last-child, .iate-profile-card > :last-child { margin-bottom: 0; }
.iate-info-card p, .iate-profile-card p { font-size: var(--iate-type-copy); color: #536071; }
.iate-info-card h3 a, .iate-profile-card h3 a { text-decoration: none; }
.iate-info-card h3 a:hover, .iate-profile-card h3 a:hover { text-decoration: underline; }
/* Stretch the existing section link, retaining its URL and native link behaviour. */
@supports selector(:has(*)) {
.iate-info-card:has(> h3:first-of-type > a[href]:only-child) { position: relative; isolation: isolate; }
.iate-info-card:has(> h3:first-of-type > a[href]:only-child):hover { background: #eef1f6; border-color: #2b355a; }
.iate-info-card:has(> h3:first-of-type > a[href]:only-child:focus-visible) { outline: 2px solid #2b355a; outline-offset: 4px; }
/* Secondary links and controls stay above the stretched link. */
:where(.iate-info-card:has(> h3:first-of-type > a[href]:only-child)) :is(a[href], button, input, select, textarea, summary, iframe, audio, video, [tabindex]) { position: relative; z-index: 2; }
.iate-info-card > h3:first-of-type > a[href]:only-child { position: static; z-index: auto; }
.iate-info-card > h3:first-of-type > a[href]:only-child::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.iate-info-card > h3:first-of-type > a[href]:only-child:focus-visible { outline: none; }
}
.iate-profile-card > img, .iate-profile-card > figure img { width: 150px; height: 180px; object-fit: cover; object-position: center 20%; margin-bottom: 22px; }
.iate-profile-card > figure { margin: 0; }
.iate-profile-card .iate-role { color: #651f19; font-weight: 500; }
.iate-department-head-layout { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 36px; align-items: start; }
.iate-department-head-copy { min-width: 0; }
.iate-migration .iate-department-head-copy h3 { margin-top: 0; }
.iate-department-head-copy > :last-child { margin-bottom: 0; }
.iate-migration .iate-department-head-photo { margin: 0; padding: 8px; border: 1px solid #dfe3ea; background: #fff; }
.iate-department-head-photo img { display: block; width: 100%; height: auto; }
@media (max-width: 600px) {
  .iate-department-head-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .iate-department-head-photo { grid-row: 1; width: 144px; }
}
.iate-memorial-profile { display: flow-root; padding-block: 30px; border-top: 1px solid #dfe3ea; }
.iate-memorial-profile h2, .iate-memorial-profile h3 { margin-top: 0; }
.iate-memorial-profile > img, .iate-memorial-profile > figure { float: left; width: 180px; margin: 0 28px 20px 0; }
.iate-memorial-profile > figure img { width: 100%; display: block; }
.iate-document-list { list-style: none; padding: 0 !important; margin-block: 22px 30px; border-top: 1px solid #dfe3ea; }
.iate-document-list > li { margin: 0 !important; padding: 18px 0; border-bottom: 1px solid #dfe3ea; }
.iate-document-list a { text-decoration: none; font-weight: 500; }
.iate-document-list a:hover { text-decoration: underline; }
.iate-document-link { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; min-height: 30px; }
.iate-document-link > span:last-child:not(:first-child) { flex-shrink: 0; font-size: var(--iate-type-caption); color: #651f19; font-weight: 600; letter-spacing: .03em; }
/* Compact resource actions stay visually separate from section headings. */
.iate-document-list:has(> li > .iate-document-link) { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; border-top: 0; margin-block: 22px 24px; }
.iate-document-list > li:has(> .iate-document-link) { min-width: 0; max-width: 100%; padding: 0; border-bottom: 0; }
.iate-document-list > li:has(> .iate-document-link ~ small),
.iate-document-list > li:has(> .iate-document-link ~ .iate-document-meta) { flex-basis: 100%; }
.iate-document-list .iate-document-link {
  display: inline-flex; position: relative; box-sizing: border-box;
  width: fit-content; max-width: 100%; min-height: 48px; padding: 12px 18px;
  align-items: center; justify-content: flex-start; gap: 14px;
  font-size: var(--iate-type-small); line-height: 1.5; overflow-wrap: anywhere;
  background: #f6f7f9; border: 1px solid #d7dde6; border-radius: 24px;
  text-decoration: none;
}
.iate-document-list .iate-document-link::after {
  content: ''; display: block; flex: 0 0 7px; width: 7px; height: 7px;
  border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor;
  transform: rotate(45deg); margin-inline: 4px 2px;
}
.iate-document-list .iate-document-link:hover,
.iate-document-list .iate-document-link:focus-visible {
  background: #edf0f5; border-color: #929db4; color: #2b355a; text-decoration: none;
}
.iate-document-list .iate-document-link:focus-visible { outline-offset: 3px; }
.iate-document-list > li > .iate-document-link ~ small,
.iate-document-list > li > .iate-document-link ~ .iate-document-meta { margin: 8px 0 14px; }
.iate-document-list small, .iate-document-meta { display: block; font-size: var(--iate-type-caption); color: #536071; font-weight: 400; margin-top: 6px; }
.iate-notice { margin-block: 26px; padding: 22px 26px; background: #f4f1ed; border-left: 3px solid #8c5242; color: #493f3d; }
.iate-notice > :last-child { margin-bottom: 0; }
.iate-year-archive { border: 1px solid #dfe3ea; margin: 14px 0; background: #fff; }
.iate-year-archive > summary { cursor: pointer; font-size: 22px; line-height: 1.4; font-weight: 600; padding: 22px 26px; background: #f6f7f9; }
.iate-year-archive > :not(summary) { margin-inline: 26px; }
.iate-year-archive[open] > summary { margin-bottom: 24px; border-bottom: 1px solid #dfe3ea; }
.iate-year-archive > :last-child { margin-bottom: 26px; }
.iate-table-wrap { max-width: 100%; overflow-x: auto; margin-block: 24px; border: 1px solid #dfe3ea; }
.iate-table-wrap table { margin: 0; width: 100%; min-width: 540px; border-collapse: collapse; font-size: var(--iate-type-small); }
.iate-table-wrap td, .iate-table-wrap th { padding: 14px 16px; vertical-align: top; border: 1px solid #dfe3ea; }
.iate-table-wrap th { background: #eef1f5; font-weight: 600; }
.iate-migration iframe { max-width: 100%; border: 0; }
.iate-migration .iate-cmo-inline { max-width: 480px; margin: 28px 0; }
.iate-cmo-inline img { display: block; width: 100%; height: auto; }
/* Programme pages keep the degree, programme title and study documents distinct. */
.iate-programme-hero { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr); gap: 48px; padding: 32px 0 46px; align-items: start; }
.iate-landing .iate-programme-page h1 { font-size: clamp(34px, 3.7vw, 54px); line-height: 1.18; }
.iate-programme-hero > div > p:not(.iate-eyebrow) { max-width: 65ch; color: #536071; }
.iate-programme-facts { margin: 0; padding: 26px 30px; background: #f5f6f8; border-top: 4px solid #651f19; }
.iate-programme-facts > div + div { margin-top: 22px; padding-top: 20px; border-top: 1px solid #dfe3ea; }
.iate-programme-facts dt { color: #536071; font-size: var(--iate-type-small); margin-bottom: 8px; }
.iate-programme-facts dd { margin: 0; font-weight: 500; line-height: 1.5; }
.iate-programme-page > .iate-content-section { max-width: 1100px; }
.iate-programme-actions, .iate-programme-jump { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.iate-programme-actions a, .iate-programme-jump a { padding: 12px 18px; border: 1px solid #d5dbe5; font-weight: 500; text-decoration: none; line-height: 1.5; }
.iate-programme-actions a:hover, .iate-programme-jump a:hover { background: #f5f6f8; text-decoration: underline; }
@media (max-width: 781px) {
 .iate-programme-hero { grid-template-columns: 1fr; gap: 22px; padding-block: 18px 30px; }
 .iate-programme-facts { padding: 24px; }
 .iate-programme-jump { flex-direction: column; }
}
.iate-video-frame { aspect-ratio: 16 / 9; margin-block: 28px; background: #f4f5f7; }
.iate-video-frame iframe { width: 100%; height: 100%; }
.iate-event-poster { max-width: 320px; padding: 12px; border: 1px solid #e0e4eb; background: #fff; }
.iate-event-poster img { display: block; width: 100%; }
@media (max-width: 1000px) {
  .iate-landing .iate-migration .iate-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iate-info-card, .iate-profile-card { padding: 24px; }
}
@media (max-width: 781px) {
  .iate-migration.iate-wrap { padding-block: 8px 40px; }
  .iate-landing .wp-block-post-content > .iate-migration { width: calc(100% - 40px); padding-block: 8px 40px; }
  .iate-content-intro { padding: 22px; margin-bottom: 28px; }
  .iate-content-intro > p:not(.iate-eyebrow) { font-size: 19px; }
  p.iate-content-intro { font-size: 19px; }
  .iate-content-section { padding-block: 28px; }
  .iate-info-grid, .iate-profile-grid, .iate-landing .iate-migration .iate-info-grid { grid-template-columns: 1fr; gap: 16px; }
  .iate-info-card, .iate-profile-card { padding: 24px; }
  .iate-document-link { gap: 14px; }
  .iate-notice { padding: 20px; }
  .iate-year-archive > summary { padding: 20px; font-size: 20px; }
  .iate-year-archive > :not(summary) { margin-inline: 20px; }
  .iate-migration h3 { font-size: 22px; }
  .iate-memorial-profile > img, .iate-memorial-profile > figure { float: none; width: 150px; margin: 0 0 24px; }
}

/* Prominent conference entry in the research overview. */
.iate-conference-intro { max-width: 72ch; color: #536071; }
.iate-conference-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; margin-top: 28px; }
.iate-conference-feature, .iate-conference-archive { min-width: 0; padding: 32px; display: flex; flex-direction: column; }
.iate-conference-feature { background: #2b355a; color: #fff; border-top: 4px solid #b8907d; }
.iate-conference-archive { background: #f5f6f8; border: 1px solid #dfe3ea; border-top: 4px solid #2b355a; }
.iate-migration .iate-conference-kicker { font-size: var(--iate-type-label); letter-spacing: .075em; text-transform: uppercase; margin: 0 0 18px; }
.iate-conference-feature .iate-conference-kicker { color: #e9d9c9; }
.iate-conference-archive .iate-conference-kicker { color: #651f19; }
.iate-migration .iate-conference-grid h3 { margin: 0 0 18px; font-size: clamp(25px, 2.5vw, 32px); line-height: 1.3; color: inherit; }
.iate-migration .iate-conference-date { font-size: var(--iate-type-small); color: #e0e5ef; }
.iate-conference-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin-top: auto; padding-top: 8px; }
.iate-conference-feature a { color: #fff; }
.iate-conference-feature .iate-conference-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; background: #fff; color: #2b355a; text-decoration: none; font-weight: 600; }
.iate-conference-feature a:hover { color: #fff; text-decoration: underline; }
.iate-conference-feature .iate-conference-button:hover { color: #2b355a; }
.iate-conference-feature a:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
.iate-conference-download { font-size: var(--iate-type-small); }
.iate-migration .iate-conference-years { font-size: clamp(30px, 3vw, 42px); font-weight: 500; line-height: 1.2; letter-spacing: -.03em; }
.iate-conference-year-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 24px; }
.iate-conference-year-links a { display: inline-flex; gap: 16px; padding: 10px 14px; background: #fff; border: 1px solid #d9dde3; color: #2b355a; font-weight: 500; text-decoration: none; }
.iate-conference-year-links a:hover { text-decoration: underline; border-color: #2b355a; }
.iate-conference-archive-link { margin-top: auto; color: #2b355a; font-weight: 600; }
#conference-archive { scroll-margin-top: 24px; }
@media (max-width: 781px) {
 .iate-conference-grid { grid-template-columns: 1fr; gap: 20px; }
 .iate-conference-feature, .iate-conference-archive { padding: 24px; }
}

/* Official department emblems: original media, shared fields, consistent viewports. */
.iate-migration .iate-departments-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.iate-departments-grid .iate-department-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 12px;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.iate-departments-grid .iate-department-card:hover,
.iate-departments-grid .iate-department-card:focus-within {
  border-color: #a6b9d4;
  box-shadow: 0 6px 20px #19375b0d;
}
.iate-department-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 168px;
  background: #fff;
  border-bottom: 1px solid #edf0f5;
}
.iate-department-logo > span {
  display: block;
  position: relative;
  height: 128px;
  max-width: 200px;
  overflow: hidden;
}
.iate-migration .iate-department-logo img {
  display: block;
  position: absolute;
  max-width: none;
  height: auto;
  margin: 0;
}
.iate-department-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 28px;
  background: #f7f9fc;
}
.iate-department-card__body h3 { line-height: 1.3; }
.iate-department-card__body p:last-child { margin-top: auto; padding-top: 12px; margin-bottom: 0; }
@media (min-width: 1100px) {
  .iate-migration .iate-departments-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .iate-departments-grid > article { grid-column: span 2; }
  .iate-departments-grid > article:nth-last-child(-n+2) { grid-column: span 3; }
}
@media (max-width: 680px) {
  .iate-migration .iate-departments-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .iate-department-logo { min-height: 128px; }
  .iate-department-logo > span { height: 96px; max-width: 155px; }
  .iate-department-card__body { padding: 20px; }
  .iate-department-card__body h3 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .iate-departments-grid .iate-department-card { transition: none; }
}
.iate-department-card__body p:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #245e9e;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}
.iate-department-card__body p:last-child a:hover { text-decoration: underline; }
.iate-department-card__body p:last-child a:focus-visible { outline: 2px solid #245e9e; outline-offset: 5px; }

/* Compact shared emblems beside department labels (headings and jump links). */
.iate-migration .iate-department-logo--inline {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 0;
  width: 48px;
  height: 36px;
  border: 0;
  background: transparent;
  vertical-align: middle;
}
.iate-migration .iate-department-logo--inline > span {
  height: 30px;
  max-width: 46px;
}
.iate-migration .iate-department-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.iate-programme-jump > a { display: inline-flex; align-items: center; gap: 8px; }
.iate-programme-jump .iate-department-logo--inline { width: 28px; height: 24px; }
.iate-programme-jump .iate-department-logo--inline > span { height: 19px; max-width: 28px; }

/* One descriptive native link per department card; its hit area covers the card. */
.iate-departments-grid .iate-department-card { position: relative; isolation: isolate; }
.iate-department-card__link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.iate-department-card__link:focus-visible { outline: none; }
.iate-departments-grid .iate-department-card:focus-within {
  outline: 2px solid #245e9e;
  outline-offset: 4px;
}
.iate-department-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #245e9e;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}
.iate-department-card:hover .iate-department-card__cta { text-decoration: underline; }
