/* ===== Tokens ===== */
:root {
	--ink: #0E1E2B;
	--muted: #4B5C68;
	--muted-2: #566773;
	--blue: #0E4A6E;
	--blue-dark: #0A3A57;
	--navy: #0A2233;
	--cyan: #1BA3DD;
	--cyan-soft: #DFF1FA;
	--tint: #E6F1F8;
	--tint-2: #D3E6F3;
	--bg-soft: #F3F7FA;
	--line: #E3EBF1;
	--line-2: #D5E1EA;
	--gold: #F0DE9D;
	--gold-glow: rgba(240, 222, 157, .35);
	--white: #FFFFFF;
	--on-dark: #C9D9E5;
	--on-dark-2: #B5C7D4;
	--radius: 22px;
	--radius-s: 14px;
	--shadow: 0 10px 30px rgba(14, 30, 43, .08);
	--shadow-s: 0 4px 16px rgba(14, 30, 43, .06);
	--shadow-hover: 0 14px 34px rgba(14, 30, 43, .14);
	--font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-name: 'Roboto Condensed', 'Onest', sans-serif;
	--wrap: 1240px;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; }
h3 { font-size: 22px; font-weight: 800; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 16px; top: 16px; z-index: 999; width: auto; height: auto; clip: auto; background: var(--white); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.section { padding-block: 64px; }
.section--soft { background: var(--bg-soft); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 26px; }
.section-title { display: flex; align-items: center; gap: 14px; margin: 0; }
.section-title::before { content: ""; width: 6px; height: 34px; border-radius: 3px; background: var(--blue); flex: none; }
.section-title--alt::before { background: var(--gold); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 15px; line-height: 1.2; border: 1.5px solid transparent; cursor: pointer; font-family: inherit; text-align: center; transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.btn--primary { background: var(--blue); color: var(--white); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--outline { background: var(--white); color: var(--ink); border-color: var(--line-2); }
.btn--ghost-dark { color: var(--white); border-color: rgba(255,255,255,.45); }
.btn--cyan { background: var(--cyan); color: var(--ink); }
.btn--primary:hover, .btn--outline:hover, .btn--ghost-dark:hover, .btn--cyan:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-glow), 0 10px 24px var(--gold-glow); transform: translateY(-1px); }
.btn--gold:hover { background: var(--blue); color: var(--white); box-shadow: 0 0 0 4px rgba(14,74,110,.18), 0 10px 24px rgba(14,74,110,.25); transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.more { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 10px 18px; margin-left: -18px; border-radius: 999px; color: var(--blue); font-weight: 700; font-size: 14px; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.more svg { width: 16px; height: 16px; }
.card:hover .more, .more:hover { background: var(--gold); color: var(--ink); box-shadow: 0 0 0 4px var(--gold-glow); }
.chip { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--tint); color: var(--blue-dark); }
.chip--students { background: var(--cyan-soft); color: #075E89; }
.chip--science { background: #EEF1F4; color: #36505F; }
.chip--international { background: #E3EEF9; color: #1F4E8C; }
.date-badge { position: absolute; left: 20px; top: 20px; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 12px; font-size: 14px; font-weight: 700; }

/* ===== Cards ===== */
.card { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); color: var(--ink); transition: transform .25s ease, box-shadow .25s ease, background .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); color: var(--ink); }
.card--hl:hover { background: var(--tint); }
.card--hl2:hover { background: var(--tint-2) !important; }
.zoom { overflow: hidden; }
.zoom img { transition: transform .6s ease; }
.card:hover .zoom img { transform: scale(1.04); }
.photo { filter: saturate(.88) contrast(1.06) brightness(1.02); object-fit: cover; width: 100%; }

/* ===== Top bar ===== */
.topbar { background: var(--navy); color: var(--on-dark); font-size: 13px; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-block: 8px; }
.topbar a { color: var(--on-dark); }
.topbar a:hover { color: var(--gold); }
.topbar__right { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.lang { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.lang a { display: block; padding: 2px 10px; border-radius: 6px; font-weight: 700; text-transform: uppercase; }
.lang .current-lang a, .lang a[aria-current] { background: var(--gold); color: var(--ink); }
.lang .current-lang a:hover { background: var(--blue); color: var(--white); }

/* ===== Header ===== */
.site-header { background: var(--white); position: relative; z-index: 20; }
.brand-row { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 22px; color: var(--ink); flex: 1 1 520px; min-width: 0; }
.brand:hover { color: var(--ink); }
.brand__logo img, .brand__logo svg { height: 104px; width: auto; }
.brand__name { display: flex; flex-direction: column; gap: 4px; padding-left: 22px; border-left: 2px solid; border-image: linear-gradient(180deg, var(--cyan), var(--blue)) 1; }
.brand__kicker { font-family: var(--font-name); font-size: 15px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
.brand__title { font-family: var(--font-name); font-size: 25px; line-height: 1.15; font-weight: 500; color: var(--blue); max-width: 520px; }
.header-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search-form { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line-2); border-radius: 999px; padding: 4px 6px 4px 18px; min-width: 260px; background: var(--white); }
.search-form input[type=search] { border: 0; outline: 0; font: inherit; font-size: 15px; flex: 1; min-width: 0; background: transparent; color: var(--ink); padding: 8px 0; }
.search-form button { width: 38px; height: 38px; border-radius: 19px; border: 0; background: var(--blue); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; transition: background .2s ease; }
.search-form button:hover { background: var(--gold); }
.search-form button svg { width: 16px; height: 16px; stroke: var(--white); }
.search-form button:hover svg { stroke: var(--ink); }

/* Main navigation */
.main-nav { background: var(--blue); }
.main-nav .wrap { padding-left: max(12px, env(safe-area-inset-left, 0px)); }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.menu > li { position: relative; }
.menu > li > a { display: block; color: var(--white); padding: 16px 16px 13px; font-size: 15px; font-weight: 600; border-bottom: 3px solid transparent; transition: background .2s ease, border-color .2s ease; }
.menu > li > a:hover, .menu > li:focus-within > a { background: var(--blue-dark); border-bottom-color: var(--gold); color: var(--white); }
.menu > li.current-menu-item > a, .menu > li.current-menu-ancestor > a, .menu > li.current-menu-parent > a { background: var(--blue-dark); border-bottom-color: var(--gold); }
.menu .sub-menu { list-style: none; margin: 0; padding: 10px; position: absolute; left: 0; top: 100%; min-width: 280px; background: var(--white); border-radius: 0 0 16px 16px; box-shadow: var(--shadow-hover); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease, visibility .2s; z-index: 30; }
.menu > li:hover > .sub-menu, .menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.menu .sub-menu a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--ink); font-size: 15px; font-weight: 500; }
.menu .sub-menu a:hover { background: var(--tint); color: var(--blue); }
.menu .sub-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 0 12px; min-width: 0; }
.accent-line { height: 3px; background: var(--cyan); }
.nav-toggle { display: none; }

/* ===== Quick access ===== */
.quick { border-bottom: 1px solid var(--line); background: var(--white); }
.quick__list { list-style: none; margin: 0 auto; padding-block: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.quick__item a { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--white); color: var(--ink); height: 100%; transition: background .2s ease, box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.quick__ico { width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--tint); display: flex; align-items: center; justify-content: center; transition: background .2s ease; }
.quick__ico svg { width: 24px; height: 24px; stroke: var(--blue); }
.quick__label { display: flex; flex-direction: column; gap: 2px; }
.quick__label strong { font-size: 17px; font-weight: 800; line-height: 1.25; }
.quick__label span { font-size: 13px; color: var(--muted-2); }
.quick__item--primary a { background: var(--blue); border-color: var(--blue); color: var(--white); }
.quick__item--primary .quick__ico { background: rgba(255,255,255,.16); }
.quick__item--primary .quick__ico svg { stroke: var(--white); }
.quick__item--primary .quick__label span { color: var(--on-dark); }
.quick__item a:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); box-shadow: 0 0 0 4px var(--gold-glow), 0 10px 24px var(--gold-glow); transform: translateY(-1px); }
.quick__item a:hover .quick__ico { background: var(--white); }
.quick__item a:hover .quick__ico svg { stroke: var(--blue); }
.quick__item a:hover .quick__label span { color: var(--ink); }

/* ===== News on front page ===== */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { font-family: inherit; cursor: pointer; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--white); color: var(--ink); border: 1px solid var(--line-2); transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.tab[aria-selected="true"] { background: var(--blue); color: var(--white); border-color: var(--blue); }
.tab:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-glow); }
.news-grid { display: flex; flex-wrap: wrap; gap: 24px; }
.news-feature { flex: 3 1 560px; min-width: 0; overflow: hidden; box-shadow: var(--shadow); }
.news-feature .zoom { position: relative; }
.news-feature .photo { height: 360px; }
.news-feature__body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 12px; }
.news-feature__title { font-size: 24px; line-height: 1.3; font-weight: 700; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-feature__excerpt { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-side { flex: 2 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.news-item { flex-direction: row; gap: 16px; align-items: center; padding: 12px; border-radius: 18px; box-shadow: var(--shadow-s); }
.news-item .photo { width: 118px; height: 88px; border-radius: 12px; flex: none; }
.news-item__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.news-item__title { font-size: 16px; line-height: 1.35; font-weight: 700; }
.news-empty { background: var(--white); border-radius: 18px; padding: 24px; color: var(--muted-2); }
.tabpanel[hidden] { display: none !important; }

/* ===== Audience cards ===== */
.audience { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.audience .card { border: 1px solid var(--line); border-top: 5px solid var(--cyan); padding: 26px; gap: 14px; min-height: 200px; box-shadow: 0 6px 20px rgba(14,30,43,.06); }
.audience .card:nth-child(4) { border-top-color: var(--navy); }
.audience__ico { width: 52px; height: 52px; border-radius: 16px; background: var(--tint); display: flex; align-items: center; justify-content: center; }
.audience__ico svg { width: 26px; height: 26px; stroke: var(--blue-dark); }
.audience .card strong { font-size: 20px; }
.audience .card span.txt { font-size: 15px; line-height: 1.5; color: var(--muted); flex-grow: 1; }

/* ===== Levels / programmes ===== */
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.level { padding: 30px; gap: 12px; min-height: 220px; }
.level small { font-size: 14px; font-weight: 700; }
.level strong { font-size: 28px; font-weight: 800; line-height: 1.2; }
.level span.txt { font-size: 15px; line-height: 1.5; flex-grow: 1; }
.level--dark { background: var(--blue); color: var(--white); }
.level--dark:hover { color: var(--white); }
.level--dark small { color: #9FD6EF; }
.level--dark span.txt { color: #D6E6F1; }
.level--light { background: var(--tint); }
.level--sky { background: var(--cyan-soft); }
.level--light small, .level--sky small { color: var(--blue-dark); }
.level--light span.txt, .level--sky span.txt { color: var(--muted); }
.level .pill { align-self: flex-start; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; background: var(--white); color: var(--blue-dark); transition: background .2s ease, color .2s ease; }
.level--light .pill, .level--sky .pill { background: var(--blue); color: var(--white); }
.level:hover .pill { background: var(--gold); color: var(--ink); }

/* ===== Labs band ===== */
.band { position: relative; overflow: hidden; background: var(--navy); color: var(--white); }
.band__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) contrast(1.05); }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,34,51,.94) 0%, rgba(10,34,51,.78) 45%, rgba(10,34,51,.15) 100%); }
.band__inner { position: relative; z-index: 1; padding-block: 110px; display: flex; flex-direction: column; gap: 22px; }
.band h2 { color: var(--white); font-size: clamp(30px, 4vw, 46px); max-width: 640px; margin: 0; }
.band p { color: #D6E6F1; font-size: 18px; max-width: 560px; margin: 0; }
.band .chip { background: rgba(27,163,221,.22); color: #CDEBF9; }
.band__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* ===== Books ===== */
.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 28px; }
.book { gap: 12px; background: transparent; border-radius: 16px; }
.book img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; box-shadow: 0 10px 24px rgba(14,30,43,.18); }
.book strong { font-size: 15px; line-height: 1.35; }
.book .kind { font-size: 12px; font-weight: 700; color: #075E89; }

/* ===== Partners ===== */
.partners { padding-block: 44px; border-top: 1px solid var(--line); }
.partners__head { margin-bottom: 20px; }
.partners__head h2 { margin: 0; font-size: 26px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee__track { display: flex; gap: 18px; width: max-content; padding-block: 6px; animation: kafvp-marquee var(--marquee-time, 40s) linear infinite; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes kafvp-marquee { to { transform: translateX(calc(-50% - 9px)); } }
.partner { flex: none; display: flex; align-items: center; justify-content: center; gap: 14px; min-width: 220px; height: 96px; padding: 16px 26px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius-s); color: var(--ink); text-decoration: none; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.partner img { max-height: 56px; max-width: 150px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .2s ease, opacity .2s ease; }
.partner strong { font-size: 16px; line-height: 1.3; font-weight: 700; max-width: 200px; }
.partner:hover, .partner:focus-visible { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-glow); transform: translateY(-2px); }
.partner:hover img, .partner:focus-visible img { filter: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
	.marquee { -webkit-mask-image: none; mask-image: none; }
	.marquee__track { animation: none; flex-wrap: wrap; width: auto; }
	.marquee__track [aria-hidden="true"] { display: none; }
}

/* ===== CTA ===== */
.cta { background: var(--blue); color: var(--white); overflow: hidden; }
.cta .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding-block: 56px; }
.cta h2 { color: var(--white); margin: 0 0 8px; }
.cta p { color: #D6E6F1; margin: 0; }

/* ===== Footer ===== */
.site-footer { background: var(--navy); color: var(--on-dark-2); font-size: 15px; line-height: 1.7; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; padding-block: 56px 32px; }
.site-footer strong { color: var(--white); display: block; margin-bottom: 8px; }
.site-footer a { color: var(--on-dark-2); }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer .footer-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-footer .footer-menu a { display: inline-block; padding: 2px 0; }
.site-footer .footer-menu .current-menu-item > a { color: var(--gold); }
.footer-logo { background: var(--white); border-radius: 14px; padding: 6px 12px; display: inline-flex; margin-bottom: 12px; }
.footer-logo img { height: 52px; width: auto; }
.socials { display: flex; gap: 10px; }
.socials a { width: 44px; height: 44px; border-radius: 22px; background: var(--blue); display: flex; align-items: center; justify-content: center; transition: background .2s ease, transform .2s ease, box-shadow .2s ease; }
.socials a:hover { background: var(--gold); transform: translateY(-2px); box-shadow: 0 0 0 4px var(--gold-glow); }
.socials svg { width: 18px; height: 18px; stroke: var(--white); }
.socials a:hover svg { stroke: var(--ink); }
.copyright { border-top: 1px solid #1C3547; padding-block: 20px 32px; font-size: 13px; color: #8DA2B2; }

/* ===== Inner pages ===== */
.page-hero { background: var(--bg-soft); padding-block: 28px 40px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted-2); margin-bottom: 14px; list-style: none; padding: 0; }
.breadcrumbs a { color: var(--muted-2); }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs li + li::before { content: "›"; margin-right: 8px; }
.page-hero h1 { margin: 0; }
.page-hero .lead { color: var(--muted); font-size: 18px; max-width: 760px; margin: 12px 0 0; }
.layout { display: flex; flex-wrap: wrap; gap: 48px; padding-block: 48px 72px; }
.layout__aside { flex: 1 1 240px; }
.layout__main { flex: 999 1 560px; min-width: 0; }
.subnav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 16px; }
.subnav a { padding: 10px 14px; border-radius: 12px; color: var(--ink); font-weight: 600; font-size: 15px; }
.subnav a:hover { background: var(--tint); color: var(--blue); }
.subnav a[aria-current] { background: var(--blue); color: var(--white); }
.subnav strong { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); padding: 0 14px 6px; }

/* Readable content from the editor */
.content { max-width: 820px; }
.content > * + * { margin-top: 1em; }
.content h2 { font-size: 28px; margin-top: 1.6em; }
.content h3 { font-size: 22px; margin-top: 1.4em; }
.content a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.content a:hover { text-decoration-color: var(--gold); }
.content img { border-radius: 14px; }
.content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-size: 15px; }
.content th, .content td { border: 1px solid var(--line-2); padding: 10px 12px; text-align: left; vertical-align: top; }
.content th { background: var(--bg-soft); }
.content [style*="justify"] { text-align: left !important; }
.content blockquote { border-left: 4px solid var(--cyan); margin-left: 0; padding: 6px 0 6px 18px; color: var(--muted); }
.content .wp-block-gallery { gap: 10px; }
.content ul, .content ol { padding-left: 1.3em; }
.content iframe { max-width: 100%; }
.alignwide { max-width: 1100px; }
.alignfull { width: 100%; }

/* News archive */
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.news-card { overflow: hidden; box-shadow: var(--shadow-s); }
.news-card .photo { height: 200px; }
.news-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.news-card__title { font-size: 18px; line-height: 1.35; font-weight: 700; }
.news-card__date { font-size: 13px; color: var(--muted-2); }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.pagination .page-numbers { min-width: 44px; height: 44px; padding: 0 14px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); color: var(--ink); font-weight: 600; }
.pagination .page-numbers.current { background: var(--blue); color: var(--white); border-color: var(--blue); }
.pagination a.page-numbers:hover { background: var(--gold); border-color: var(--gold); }

/* Single news */
.article-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; color: var(--muted-2); font-size: 14px; }
.article-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; }
.related { margin-top: 56px; }

/* Staff */
.staff-group { margin-bottom: 48px; }
.staff-group h2 { font-size: 26px; display: flex; align-items: center; gap: 12px; }
.staff-group h2 small { font-size: 15px; color: var(--muted-2); font-weight: 600; }
.staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.person { overflow: hidden; border: 1px solid var(--line); }
.person .photo { aspect-ratio: 4 / 5; height: auto; background: var(--bg-soft); }
.person__ph { aspect-ratio: 4 / 5; background: var(--tint); display: flex; align-items: center; justify-content: center; color: var(--blue); font-size: 44px; font-weight: 800; }
.person__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.person__name { font-size: 17px; font-weight: 800; line-height: 1.3; }
.person__pos { font-size: 14px; color: var(--muted); }
.profile { display: flex; flex-wrap: wrap; gap: 40px; }
.profile__photo { flex: 0 1 300px; }
.profile__photo img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.profile__info { flex: 1 1 420px; min-width: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 22px 0; }
.fact { background: var(--bg-soft); border-radius: 16px; padding: 16px 18px; }
.fact small { display: block; font-size: 13px; color: var(--muted-2); font-weight: 600; }
.fact strong { font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tags li { padding: 8px 14px; border-radius: 999px; background: var(--tint); font-size: 14px; font-weight: 600; }
.ids { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Labs and programmes */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.lab-card { overflow: hidden; box-shadow: var(--shadow-s); }
.lab-card .photo { height: 210px; }
.lab-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.docs { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-2); }
.docs li { border-bottom: 1px solid var(--line-2); }
.docs a { display: flex; flex-wrap: nowrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 16px 4px; color: var(--ink); font-weight: 600; }
.docs a:hover { background: var(--tint); }
.docs svg { width: 20px; height: 20px; stroke: var(--blue); flex: none; }

/* Search, 404 */
.empty-state { text-align: left; padding-block: 40px; }
.empty-state .search-form { max-width: 520px; margin-top: 18px; }

/* ===== Mobile ===== */
@media (max-width: 900px) {
	body { font-size: 16px; }
	.brand { flex: 1 1 auto; gap: 12px; }
	.brand__logo img, .brand__logo svg { height: 60px; }
	.brand__name { display: none; }
	.header-tools .search-form, .header-tools .btn { display: none; }
	.nav-toggle { display: inline-flex; width: 46px; height: 46px; border-radius: 23px; border: 0; background: var(--blue); align-items: center; justify-content: center; cursor: pointer; }
	.nav-toggle svg { width: 22px; height: 22px; stroke: var(--white); }
	.main-nav { display: none; }
	.main-nav.is-open { display: block; }
	.main-nav .menu { flex-direction: column; padding-block: 8px; }
	.menu > li > a { padding: 14px 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
	.menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; padding: 0 0 8px 12px; min-width: 0; border-radius: 0; }
	.menu .sub-menu a { color: #D6E6F1; padding: 8px; }
	.menu .sub-menu a:hover { background: transparent; color: var(--gold); }
	.mobile-tools { display: flex; flex-direction: column; gap: 10px; padding: 12px 0 18px; }
	.mobile-tools .search-form { min-width: 0; }
	.topbar .wrap { flex-wrap: nowrap; }
	.topbar__right { gap: 12px; flex-wrap: nowrap; }
	.topbar__right a[href^="mailto"], .topbar > .wrap > a { display: none; }
	.topbar .wrap { justify-content: flex-end; }
	.audience { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.audience .card { padding: 16px; min-height: 0; gap: 10px; border-top-width: 4px; }
	.audience .card span.txt, .audience .card .more { display: none; }
	.audience .card strong { font-size: 16px; }
	.audience__ico { width: 40px; height: 40px; border-radius: 12px; }
	.audience__ico svg { width: 20px; height: 20px; }
	.quick__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-block: 14px; }
	.quick__item:first-child { grid-column: span 2; }
	.quick__item a { padding: 12px; gap: 10px; }
	.quick__ico { width: 38px; height: 38px; border-radius: 11px; }
	.quick__ico svg { width: 20px; height: 20px; }
	.quick__label strong { font-size: 15px; }
	.quick__label span { display: none; }
	.section { padding-block: 40px; }
	.news-feature .photo { height: 220px; }
	.news-feature__title { font-size: 19px; }
	.band__inner { padding-block: 150px 36px; }
	.band::after { background: linear-gradient(0deg, rgba(10,34,51,.95) 0%, rgba(10,34,51,.75) 55%, rgba(10,34,51,.25) 100%); }
	.books { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 140px; overflow-x: auto; padding-bottom: 8px; }
	.layout { gap: 24px; padding-block: 28px 48px; }
	.subnav { position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin-inline: -16px; padding: 0 16px 6px; scrollbar-width: none; }
	.subnav::-webkit-scrollbar { display: none; }
	.subnav strong { display: none; }
	.subnav a { flex: none; white-space: nowrap; background: var(--bg-soft); border-radius: 999px; padding: 9px 16px; font-size: 14px; }
}
@media (min-width: 901px) {
	.mobile-tools { display: none; }
}

/* Text migrated from the old site: neutralise its inline colours, justification and layout tables */
.content--legacy [style*="color"] { color: inherit !important; }
.content--legacy [style*="justify"] { text-align: left !important; }
.content--legacy [style*="font-family"] { font-family: inherit !important; }
.content--legacy [style*="font-size"] { font-size: inherit !important; }
.content--legacy table, .content--legacy tbody, .content--legacy tr, .content--legacy td { display: block; width: auto !important; height: auto !important; border: 0; padding: 0; }
.content--legacy table { font-size: inherit; overflow: visible; }
.content--legacy td:empty { display: none; }
.content--legacy td + td { margin-top: 1em; }
.content--legacy h1, .content--legacy h2 { font-size: 24px; }
.content--legacy hr { border: 0; border-top: 1px solid var(--line); }

/* Phones: two teacher cards per row */
@media (max-width: 600px) {
	.staff { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.person__body { padding: 12px 12px 14px; }
	.person__name { font-size: 15px; }
	.person__pos { font-size: 13px; }
	.person__ph { font-size: 32px; }
	.staff-group { margin-bottom: 36px; }
	.staff-group h2 { font-size: 22px; }
}
.docs a > span { min-width: 0; }
.layout > * { min-width: 0; }

/* ===== Main navigation: dropdowns and mega menu ===== */
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav__item { position: static; }
.nav__top { display: flex; align-items: center; gap: 6px; color: var(--white); padding: 16px 16px 13px; font: 600 15px/1.2 var(--font); background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.nav__top svg { width: 14px; height: 14px; stroke: currentColor; transition: transform .2s ease; }
.nav__top:hover, .nav__item:focus-within > .nav__top, .nav__item.is-open > .nav__top { background: var(--blue-dark); border-bottom-color: var(--gold); color: var(--white); }
.nav__item.is-current > .nav__top { border-bottom-color: var(--gold); }
.nav__item.is-open > .nav__top svg { transform: rotate(180deg); }
.main-nav { position: relative; z-index: 40; }
.main-nav > .wrap { position: relative; }
.nav__panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-radius: 0 0 22px 22px; box-shadow: var(--shadow-hover); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease, visibility .18s; }
.nav__item.has-panel:hover > .nav__panel, .nav__item.is-open > .nav__panel { opacity: 1; visibility: visible; transform: none; }
.nav__item.has-panel:not(.is-open):focus-within > .nav__panel { opacity: 1; visibility: visible; transform: none; }
.nav__panel-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 28px; padding: 26px 30px 30px; max-width: 1060px; }
.nav__panel:not(.nav__panel--mega) .nav__panel-inner { grid-template-columns: 1fr; max-width: 360px; }
.nav__panel:not(.nav__panel--mega) .nav__col--two ul { columns: 2; column-gap: 24px; }
.nav__panel:not(.nav__panel--mega) .nav__panel-inner:has(.nav__col--two) { max-width: 680px; }
.nav__col ul { list-style: none; margin: 0; padding: 0; }
.nav__col li { break-inside: avoid; }
.nav__heading { display: block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); padding: 6px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.nav__col a { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px; color: var(--ink); font-size: 15px; font-weight: 500; line-height: 1.35; }
.nav__col a:hover { background: var(--tint); color: var(--blue); }
.nav__col a.is-current { color: var(--blue); font-weight: 700; }
.nav__col .ext svg, .subnav a svg, .nav__top .ext svg { width: 13px; height: 13px; stroke: var(--muted-2); flex: none; }
.nav__item > a.nav__top:hover { color: var(--white); }

@media (max-width: 900px) {
	.nav { flex-direction: column; padding-block: 6px; }
	.nav__top { width: 100%; justify-content: space-between; padding: 14px 8px; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 16px; }
	.nav__top:hover, .nav__item:focus-within > .nav__top, .nav__item.is-open > .nav__top { background: transparent; border-bottom-color: rgba(255,255,255,.12); }
	.nav__panel { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; border-radius: 0; display: none; }
	.nav__item.has-panel:not(.is-open):hover > .nav__panel, .nav__item.has-panel:not(.is-open):focus-within > .nav__panel { display: none; }
	.nav__item.is-open > .nav__panel { display: block; }
	.nav__panel-inner, .nav__panel:not(.nav__panel--mega) .nav__panel-inner { display: block; padding: 4px 0 12px 8px; max-width: none; }
	.nav__panel:not(.nav__panel--mega) .nav__col--two ul { columns: 1; }
	.nav__heading { color: var(--gold); border-bottom: 0; padding: 12px 8px 4px; margin: 0; }
	.nav__col a { color: #D6E6F1; padding: 9px 8px; }
	.nav__col a:hover { background: transparent; color: var(--gold); }
	.nav__col .ext svg { stroke: #9FB6C6; }
}

/* ===== Pages without a side menu ===== */
.layout--full .layout__main { flex-basis: 100%; }
.empty-note { color: var(--muted); }

/* ===== Old content: bring it to the site style ===== */
.content--legacy { max-width: 860px; }
.layout--full .content--legacy { max-width: 900px; }
.content--legacy [style*="color"]:not(a):not(mark) { color: inherit !important; }
.content--legacy [style*="background"] { background: none !important; }
.content--legacy [style*="justify"] { text-align: left !important; }
.content--legacy [style*="font-family"], .content--legacy font { font-family: inherit !important; }
.content--legacy [style*="font-size"] { font-size: inherit !important; }
.content--legacy [style*="height"]:not(img):not(iframe) { height: auto !important; }
.content--legacy [style*="width"]:not(img):not(iframe) { width: auto !important; max-width: 100%; }
.content--legacy h1, .content--legacy h2 { font-size: 26px; margin-top: 1.4em; }
.content--legacy h3, .content--legacy h4 { font-size: 20px; margin-top: 1.3em; }
.content--legacy img { border-radius: 14px; height: auto; }
.content--legacy .alignright, .content--legacy .alignleft { max-width: 42%; }
.content--legacy .alignright { float: right; margin: 6px 0 18px 24px; }
.content--legacy .alignleft { float: left; margin: 6px 24px 18px 0; }
.content--legacy .aligncenter { margin-inline: auto; }
.content--legacy::after { content: ""; display: table; clear: both; }
.content--legacy table { display: table; width: 100% !important; font-size: 15px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; }
.content--legacy td, .content--legacy th { border: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; }
.content--legacy tr:last-child td { border-bottom: 0; }
/* tables used only to place photos: lay them out as a photo grid */
.content--legacy table:not(:has(td:nth-child(2) p, td:nth-child(2) li)) td:has(> img:only-child), .content--legacy table:not(:has(td:nth-child(2) p)) td:has(> a:only-child > img) { padding: 6px; }
.content--legacy hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.content--legacy p:empty { display: none; }
@media (max-width: 700px) {
	.content--legacy table, .content--legacy tbody, .content--legacy tr, .content--legacy td { display: block; width: 100% !important; }
	.content--legacy td { border-bottom: 0; padding: 8px 12px; }
	.content--legacy tr { border-bottom: 1px solid var(--line); }
	.content--legacy .alignright, .content--legacy .alignleft { float: none; max-width: 100%; margin: 0 0 16px; }
}

/* ===== Section cards (pages that group sub-pages) ===== */
.section-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 40px; }
.section-card { overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.section-card__media { height: 160px; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.section-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.section-card:hover .section-card__media img { transform: scale(1.04); }
.section-card__media.is-empty { background: linear-gradient(135deg, var(--tint), var(--bg-soft)); }
.section-card__media.is-empty svg { width: 46px; height: 46px; stroke: var(--blue); }
.section-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.section-card__body strong { font-size: 19px; line-height: 1.3; }
.section-card__body > span:not(.more) { color: var(--muted); font-size: 14px; }
.section-card .more { margin-top: auto; }

/* ===== Labs ===== */
.labs-intro { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-bottom: 36px; }
.labs-intro .lead { font-size: 18px; color: var(--muted); margin: 0; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stats li { background: var(--tint); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 2px; }
.stats strong { font-size: 34px; line-height: 1; font-weight: 800; color: var(--blue); }
.stats span { font-size: 14px; color: var(--muted); line-height: 1.3; }
.labs-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.lab-card { border: 1px solid var(--line); }
.lab-card .photo { height: 220px; width: 100%; object-fit: cover; }
.lab-card__title { font-size: 19px; line-height: 1.3; }
.lab-card__text { color: var(--muted); font-size: 15px; }
.lab-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.lab-card__count { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--blue-dark); }
.lab-card__count svg { width: 18px; height: 18px; stroke: var(--blue); }
.lab-card .more { margin-left: 0; }
.lab__top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 28px; align-items: start; }
.collage { display: grid; gap: 10px; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; height: 420px; }
.collage figure { margin: 0; border-radius: 18px; overflow: hidden; background: var(--bg-soft); }
.collage figure img { width: 100%; height: 100%; object-fit: cover; }
.collage figure:first-child { grid-row: span 2; }
.collage--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.collage--2 { grid-template-rows: 1fr; }
.collage--2 figure:first-child { grid-row: auto; }
.facts--stack { grid-template-columns: 1fr; margin: 0; }
.lab__text { margin-top: 32px; }
.lab__h { font-size: 26px; margin: 48px 0 18px; display: flex; align-items: center; gap: 12px; }
.lab__h small { font-size: 15px; color: var(--muted-2); font-weight: 600; }
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.eq-card { overflow: hidden; border: 1px solid var(--line); }
.eq-card__media { height: 190px; background: var(--white); display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); overflow: hidden; }
.eq-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.eq-card:hover .eq-card__media img { transform: scale(1.04); }
.eq-card__media.is-empty { background: linear-gradient(135deg, var(--tint), var(--bg-soft)); }
.eq-card__media.is-empty svg { width: 48px; height: 48px; stroke: var(--blue); }
.eq-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.eq-card__title { font-size: 17px; line-height: 1.3; }
.eq-card__text { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.eq-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.tag { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--blue-dark); }
.tag--more { background: var(--bg-soft); color: var(--muted-2); }
.eq__top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.eq__top--noimg { grid-template-columns: minmax(0, 860px); }
.eq__h { font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 10px; }
.eq__info > * + .eq__h { margin-top: 26px; }
.eq__purpose { font-size: 18px; line-height: 1.6; margin: 0; }
.eq__works { margin: 0; padding-left: 1.2em; }
.eq__works li + li { margin-top: 6px; }
.eq__info .btn { margin-top: 28px; }
.eq__info .btn svg { width: 18px; height: 18px; stroke: currentColor; }
.viewer__main { border-radius: 20px; overflow: hidden; background: var(--white); border: 1px solid var(--line); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.viewer__main img { width: 100%; height: 100%; object-fit: contain; }
.viewer__thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.viewer__thumb { width: 78px; height: 62px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: var(--bg-soft); cursor: pointer; }
.viewer__thumb img { width: 100%; height: 100%; object-fit: cover; }
.viewer__thumb.is-active, .viewer__thumb:hover { border-color: var(--blue); }
.eq__specs { margin-top: 12px; }
.specs { max-width: 900px; }
.specs h3 { font-size: 18px; margin: 1.6em 0 .6em; }
.specs ul { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.specs ul li { padding: 11px 16px; font-size: 15px; }
.specs ul li:nth-child(odd) { background: var(--bg-soft); }
.specs .wp-block-gallery { margin-top: 24px; }
@media (max-width: 900px) {
	.labs-intro, .lab__top, .eq__top { grid-template-columns: 1fr; gap: 20px; }
	.stats strong { font-size: 28px; }
	.collage { height: 300px; }
	.lab__h { font-size: 22px; margin-top: 36px; }
	.eq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.eq-card__media { height: 130px; }
	.eq-card__body { padding: 12px; }
	.eq-card__title { font-size: 15px; }
	.eq-card__text { display: none; }
}
@media (min-width: 901px) {
	.nav__item:has(> .nav__panel:not(.nav__panel--mega)) { position: relative; }
	.nav__panel:not(.nav__panel--mega) { right: auto; min-width: 330px; border-radius: 0 0 18px 18px; }
	.nav__panel:not(.nav__panel--mega) .nav__panel-inner { padding: 14px; max-width: none; }
	.nav__panel:not(.nav__panel--mega) .nav__col--two { min-width: 620px; }
	.nav__panel--mega .nav__panel-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; gap: 10px 32px; }
	.nav__panel--mega .nav__col a { padding: 7px 12px; }
}
.labs-intro--stack { grid-template-columns: 1fr; gap: 22px; }
.labs-intro--stack .stats { max-width: 640px; }
/* layout tables from the old editor: no grid lines, cells flow like columns */
.content--legacy table.layout-table { display: block; border: 0; border-radius: 0; overflow: visible; width: auto !important; margin: 0 0 1.2em; }
.content--legacy table.layout-table > tbody, .content--legacy table.layout-table > thead { display: block; }
.content--legacy table.layout-table tr { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; margin-bottom: 14px; border: 0; }
.content--legacy table.layout-table td { display: block; flex: 1 1 240px; padding: 0; border: 0; width: auto !important; }
.content--legacy table.layout-table td:has(> img:only-child), .content--legacy table.layout-table td:has(> a:only-child > img), .content--legacy table.layout-table td:has(> p:only-child > img:only-child) { flex: 0 1 auto; }
.content--legacy table.layout-table td > *:first-child { margin-top: 0; }
.content--legacy table.layout-table img { margin: 0; float: none !important; }
.facts--stack { background: var(--bg-soft); border-radius: 18px; padding: 6px 18px; gap: 0; }
.facts--stack .fact { background: none; border-radius: 0; padding: 12px 0; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.facts--stack .fact + .fact { border-top: 1px solid var(--line-2); }
.facts--stack .fact small { font-size: 14px; }
.facts--stack .fact strong { text-align: right; }

/* ===== Dropdown accents ===== */
@media (min-width: 901px) {
	.nav__panel { border-top: 3px solid var(--gold); }
	.nav__panel:not(.nav__panel--mega) .nav__col--two ul { column-rule: 1px solid var(--line); column-gap: 40px; }
	.nav__panel .nav__col a { position: relative; padding-left: 26px; transition: background .2s ease, color .2s ease, padding-left .2s ease; }
	.nav__col a::before { content: ""; position: absolute; left: 11px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--tint-2); box-shadow: inset 0 0 0 1.5px var(--blue); opacity: .55; transition: all .2s ease; }
	.nav__col a::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-top: 2px solid var(--blue); border-right: 2px solid var(--blue); transform: translateX(-6px) rotate(45deg); opacity: 0; transition: opacity .2s ease, transform .2s ease; flex: none; }
	.nav__panel .nav__col a:hover, .nav__panel .nav__col a:focus-visible { background: var(--tint); color: var(--blue); padding-left: 30px; }
	.nav__col a:hover::before, .nav__col a:focus-visible::before { left: 10px; width: 4px; height: 20px; margin-top: -10px; border-radius: 2px; background: var(--gold); box-shadow: none; opacity: 1; }
	.nav__col a:hover::after, .nav__col a:focus-visible::after { opacity: 1; transform: translateX(0) rotate(45deg); }
	.nav__col a.is-current { background: var(--tint); }
	.nav__col a.is-current::before { background: var(--gold); box-shadow: none; opacity: 1; }
	.nav__col a:has(.ext)::after { display: none; }
	.nav__heading { color: var(--blue); border-bottom: 2px solid var(--gold); }
}
@media (prefers-reduced-motion: reduce) {
	.nav__col a, .nav__col a::before, .nav__col a::after { transition: none; }
}

/* ===== Quick access: every card carries its accent ===== */
.quick__item a { border-color: var(--tint-2); box-shadow: 0 2px 10px rgba(14, 74, 110, .06); }
.quick__ico { background: var(--blue); box-shadow: 0 6px 14px rgba(14, 74, 110, .18); }
.quick__ico svg { stroke: var(--white); }
.quick__label strong { color: var(--blue-dark); }
.quick__item--primary .quick__label strong { color: var(--white); }
.quick__item--primary .quick__ico { background: var(--gold); box-shadow: none; }
.quick__item--primary .quick__ico svg { stroke: var(--blue-dark); }
.quick__item a:hover .quick__label strong { color: var(--ink); }
.quick__item a:hover .quick__ico { background: var(--white); box-shadow: none; }

/* ===== Teacher profile ===== */
.tp { background: linear-gradient(180deg, var(--bg-soft) 0, var(--bg-soft) 260px, var(--white) 260px); padding: 26px 0 72px; }
.tp__grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px; align-items: start; }
.tp__card { position: sticky; top: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 26px; padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; overflow: hidden; }
.tp__card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--blue) 0 65%, var(--gold) 65% 100%); }
.tp__photo { width: 168px; margin: 6px 0 4px; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 24px rgba(14, 74, 110, .18); outline: 4px solid var(--white); }
.tp__photo img, .tp__ph { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; transition: transform .5s ease; }
.tp__card:hover .tp__photo img { transform: scale(1.04); }
.tp__ph { display: flex; align-items: center; justify-content: center; background: var(--tint); color: var(--blue); font-size: 44px; font-weight: 800; }
.tp__group { margin-top: 2px; }
.tp__name { margin: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.tp__surname { font-size: 26px; font-weight: 800; letter-spacing: .01em; color: var(--blue-dark); }
.tp__given { font-size: 19px; font-weight: 600; color: var(--ink); }
.tp__role { margin: 0; font-size: 15px; line-height: 1.45; font-weight: 600; color: var(--muted); padding-left: 12px; border-left: 3px solid var(--gold); }
.tp__contacts { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 4px; }
.tp__contact { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--tint); color: var(--blue-dark); font-weight: 600; font-size: 14px; word-break: break-all; transition: background .2s ease, box-shadow .2s ease, transform .2s ease; }
.tp__contact svg { width: 18px; height: 18px; stroke: var(--blue); flex: none; }
a.tp__contact:hover { background: var(--gold); color: var(--ink); box-shadow: 0 0 0 4px var(--gold-glow); transform: translateY(-1px); }
.tp__ids { display: flex; flex-direction: column; gap: 6px; width: 100%; padding-top: 12px; border-top: 1px solid var(--line); }
.tp__ids a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 12px; color: var(--blue); font-weight: 700; font-size: 14px; transition: border-color .2s ease, background .2s ease, padding .2s ease; }
.tp__ids svg { width: 14px; height: 14px; stroke: currentColor; opacity: .6; transition: transform .2s ease; }
.tp__ids a:hover { border-color: var(--gold); background: var(--gold); color: var(--ink); padding-left: 18px; }
.tp__ids a:hover svg { transform: translate(2px, -2px); opacity: 1; }
.tp__back { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 700; font-size: 14px; color: var(--blue); }
.tp__back svg { width: 16px; height: 16px; stroke: currentColor; transform: rotate(180deg); transition: transform .2s ease; }
.tp__back:hover svg { transform: rotate(180deg) translateX(4px); }

.tp__main { display: flex; flex-direction: column; gap: 18px; min-width: 0; padding-top: 4px; }
.tp__facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tp__facts li { background: var(--blue); color: var(--white); border-radius: 18px; padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-s); transition: transform .2s ease, background .2s ease; }
.tp__facts li:nth-child(2n) { background: var(--blue-dark); }
.tp__facts li:hover { transform: translateY(-2px); }
.tp__facts small { font-size: 13px; color: var(--on-dark); font-weight: 600; }
.tp__facts strong { font-size: 22px; font-weight: 800; color: var(--gold); }
.tp__nav { position: sticky; top: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-s); }
.tp__nav a { padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--muted); transition: background .2s ease, color .2s ease; }
.tp__nav a:hover { background: var(--tint); color: var(--blue); }
.tp__nav a.is-active { background: var(--blue); color: var(--white); }
.tp-sec { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 24px 28px; box-shadow: var(--shadow-s); scroll-margin-top: 84px; transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease; }
.tp-sec::before { content: ""; position: absolute; left: -1px; top: 22px; bottom: 22px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); opacity: 0; transition: opacity .25s ease; }
.tp-sec:hover { box-shadow: var(--shadow-hover); border-color: var(--tint-2); }
.tp-sec:hover::before { opacity: 1; }
.tp-sec__title { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 20px; color: var(--blue-dark); }
.tp-sec__ico { width: 40px; height: 40px; border-radius: 12px; background: var(--tint); display: inline-flex; align-items: center; justify-content: center; flex: none; transition: background .25s ease; }
.tp-sec__ico svg { width: 20px; height: 20px; stroke: var(--blue); }
.tp-sec:hover .tp-sec__ico { background: var(--gold); }
.tp-sec__body { font-size: 16px; line-height: 1.7; color: var(--ink); max-width: none; }
.tp-sec__body p { margin: 0 0 10px; }
.tp-sec__body p:last-child { margin-bottom: 0; }
.tp-sec__body img { max-width: 100%; height: auto; border-radius: 14px; float: none !important; }
.tp-sec__body a { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.tp-sec__body pre { white-space: pre-wrap; font: inherit; background: none; padding: 0; margin: 0; }
.tp-sec__tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tp-sec__tags li { padding: 8px 14px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--blue-dark); transition: background .2s ease, border-color .2s ease; }
.tp-sec__tags li:hover { background: var(--gold); border-color: var(--gold); }
.tp-sec__tags a { color: inherit; }
.tp-sec__tags + .tp-sec__body { margin-top: 14px; }
.tp-sec.is-long:not(.is-open) .tp-sec__body { max-height: 260px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.tp-sec__more { margin-top: 14px; padding: 9px 18px; border: 0; border-radius: 999px; background: var(--tint); color: var(--blue); font: 700 14px/1 var(--font); cursor: pointer; transition: background .2s ease; }
.tp-sec__more:hover { background: var(--gold); color: var(--ink); }
.tp-anim { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.tp-anim.is-in { opacity: 1; transform: none; }
@media (max-width: 900px) {
	.tp__grid { grid-template-columns: 1fr; gap: 20px; }
	.tp__card { position: relative; top: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 18px; align-items: start; }
	.tp__card > :not(.tp__photo) { grid-column: 2; }
	.tp__photo { grid-row: 1 / span 4; width: 120px; margin: 4px 0 0; }
	.tp__contacts, .tp__ids, .tp__back { grid-column: 1 / -1 !important; }
	.tp__nav { top: 0; }
	.tp-sec { padding: 20px; }
}

/* legacy wrappers from pasted documents */
.content .section, .content .layoutArea, .content .column, .content div.page { padding: 0; margin: 0; background: none; }
.tp-sec__sub { font-size: 16px; color: var(--blue); margin: 18px 0 8px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.tp-sec__sub:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* social and mail buttons inside texts */
.soc-btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 24px; }
.soc-btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 12px; border-radius: 999px; background: var(--tint); color: var(--blue-dark) !important; font-weight: 700; font-size: 15px; text-decoration: none !important; transition: background .2s ease, box-shadow .2s ease, transform .2s ease; }
.soc-btn svg { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--blue); stroke: var(--white); flex: none; transition: background .2s ease, stroke .2s ease; }
.soc-btn:hover { background: var(--gold); color: var(--ink) !important; box-shadow: 0 0 0 4px var(--gold-glow); transform: translateY(-1px); }
.soc-btn:hover svg { background: var(--white); stroke: var(--blue); }

.brand__abbr { font: inherit; color: inherit; letter-spacing: inherit; }

.tp-sec__empty { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--bg-soft); color: var(--muted-2); font-size: 15px; font-style: italic; }

/* old texts on small screens: nothing wider than the screen */
.content { overflow-wrap: break-word; }
.content pre { white-space: pre-wrap; overflow-wrap: break-word; font: inherit; background: none; padding: 0; margin: 0 0 1em; }
.content img, .content iframe, .content video, .content embed, .content object, .content table, .content [style*="width"] { max-width: 100% !important; }
.content img { height: auto; }
@media (max-width: 700px) {
	.content table { display: block; overflow-x: auto; }
	.news-rubrics { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	.news-rubrics .tab { flex: none; white-space: nowrap; }
}
.page-hero h1, .tp__surname, .section-title { overflow-wrap: anywhere; hyphens: auto; }
