/*
 * ITI website, styled after the new corporate design of the Universität zu Lübeck
 * (www2.uni-luebeck.de): white header with the seal logo and dark teal navigation,
 * teal headings, orange links, dark teal footer.
 *
 * Colours are CSS variables with a light and a dark set, switched by the
 * data-bs-theme attribute on <html> (set in base.html before the page renders).
 * Their values live in design/tokens.json; design/build_tokens.py writes them to
 * tokens.css, which base.html loads before this file.
 * Variables also reach into the shadow DOM of the custom elements, so the React
 * widgets follow the theme by using them.
 */

/* Source Sans 3 comes from fonts.css, loaded before this file (also by the admin). */

/* ---------------------------------------------------------------- tokens */

:root,
[data-bs-theme=light] {
  --iti-font: 'Source Sans 3', 'Myriad Pro', 'Segoe UI', Arial, sans-serif;
  /* colours: --iti-* from tokens.css (design/tokens.json) */

  --bs-body-font-family: var(--iti-font);
  --bs-body-bg: var(--iti-bg);
  --bs-body-color: var(--iti-text);
  --bs-emphasis-color: var(--iti-nav);
  --bs-secondary-color: var(--iti-muted);
  --bs-tertiary-bg: var(--iti-surface);
  --bs-border-color: var(--iti-border);
  --bs-link-color: var(--iti-link);
  --bs-link-color-rgb: var(--iti-link-rgb);
  --bs-link-hover-color: var(--iti-link-hover);
  --bs-link-hover-color-rgb: var(--iti-link-hover-rgb);
  --bs-heading-color: var(--iti-heading);
  color-scheme: light;
}

[data-bs-theme=dark] {
  --bs-body-bg: var(--iti-bg);
  --bs-body-color: var(--iti-text);
  --bs-emphasis-color: var(--iti-nav);
  --bs-secondary-color: var(--iti-muted);
  --bs-tertiary-bg: var(--iti-surface);
  --bs-border-color: var(--iti-border);
  --bs-link-color: var(--iti-link);
  --bs-link-color-rgb: var(--iti-link-rgb);
  --bs-link-hover-color: var(--iti-link-hover);
  --bs-link-hover-color-rgb: var(--iti-link-hover-rgb);
  --bs-heading-color: var(--iti-heading);
  color-scheme: dark;
}

/* ----------------------------------------------------------------- base */

body {
  font-family: var(--iti-font);
  font-size: 1.0625rem;
  line-height: 1.55;
  background: var(--iti-bg);
  color: var(--iti-text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--iti-font);
  color: var(--iti-heading);
  font-weight: 600;
  line-height: 1.15;
  margin: 1.2em 0 .5em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); margin-top: .4em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.1rem); }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }
h5, h6 { font-size: 1.05rem; }

a { color: var(--iti-link); text-decoration: none; }
a:hover, a:focus { color: var(--iti-link-hover); text-decoration: underline; }
:focus-visible { outline: var(--border-nav) solid var(--iti-accent); outline-offset: 2px; }

img { max-width: 100%; height: auto; }
hr { border-color: var(--iti-border); opacity: 1; }
table { color: inherit; }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 2000;
  padding: .5rem 1rem; background: var(--iti-nav); color: var(--iti-bg);
}
.skip-link:focus { top: 1rem; color: var(--iti-bg); }

/* ---------------------------------------------------------------- header */

/* The header and the breadcrumb stay at the top while the page scrolls; a picture banner
   between them scrolls away under the header, then the breadcrumb joins it. */
:root {
  --iti-top: 0px;                /* where the page starts: below the CMS toolbar in edit mode */
  --iti-header-height: 0px;      /* both measured by static/js/header.js */
  --iti-breadcrumb-height: 0px;
  /* below this line the page is free: for whatever else sticks, such as the team strip */
  --iti-sticky-bottom: calc(var(--iti-top) + var(--iti-header-height) + var(--iti-breadcrumb-height));
}
html.cms-toolbar-expanded, html.cms-toolbar-expanding { --iti-top: 46px; }
/* targets of links within the page stop below the bar, not behind it */
html { scroll-padding-top: calc(var(--iti-sticky-bottom) + 1rem); }

.site-header {
  position: sticky; top: var(--iti-top); z-index: 1030;
  background: var(--iti-bg);
  border-bottom: var(--border-hair) solid var(--iti-border);
  transition: box-shadow .2s ease;
}
/* scrolled: a shadow under the bar, which the breadcrumb carries once it has joined */
.site-header.is-compact { box-shadow: var(--iti-shadow); }
.site-header.is-compact:has(~ .site-breadcrumb.is-stuck) { box-shadow: none; }
.site-header__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1.25rem var(--gutter) 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.site-logo { display: block; margin-right: auto; padding: .25rem 0; }
.site-logo img { display: block; height: 92px; width: auto; }
.site-logo__dark { display: none !important; }
[data-bs-theme=dark] .site-logo__light { display: none !important; }
[data-bs-theme=dark] .site-logo__dark { display: block !important; }

.site-nav { flex-direction: column; align-items: flex-end; }
@media (min-width: 992px) {
  .site-nav.navbar-collapse { display: flex; flex-direction: column; align-items: flex-end; gap: 1.1rem; }
}

.site-meta {
  display: flex; align-items: center; gap: 1.25rem;
  list-style: none; margin: 0; padding: 0;
  font-size: .95rem;
}
.site-meta .nav-item { list-style: none; }
.site-meta a, .site-meta .nav-link { color: var(--iti-nav); padding: 0; }
.site-meta a:hover { color: var(--iti-link); text-decoration: none; }

.site-languages { display: flex; align-items: center; }
.site-languages > * + *, .site-meta .site-languages > * + * { border-left: var(--border-hair) solid var(--iti-nav); margin-left: .45rem; padding-left: .45rem; }
.site-languages__current { font-weight: 700; color: var(--iti-nav); }

.site-menu { gap: 1.9rem; margin: 0; }
.site-menu .nav-link {
  color: var(--iti-nav);
  font-size: 1.1rem;
  font-weight: 600;
  padding: .35rem 0;
  border-bottom: var(--border-nav) solid transparent;
}
.site-menu .nav-link:hover { color: var(--iti-link); text-decoration: none; }
.site-menu .nav-link.active, .site-menu .ancestor > .nav-link {
  color: var(--iti-nav);
  border-bottom-color: var(--iti-link);
}
.site-menu .dropdown-menu {
  background: var(--iti-bg); border-color: var(--iti-border); box-shadow: var(--iti-shadow);
}
.site-menu .dropdown-item { color: var(--iti-nav); }
.site-menu .dropdown-item:hover { background: var(--iti-surface); color: var(--iti-link); }

.site-nav__toggle { border: 0; padding: .5rem; margin-left: 1rem; align-self: center; }
.site-nav__toggle:focus { box-shadow: none; }
.site-nav__toggle-bar { display: block; width: 28px; height: 3px; margin: 5px 0; background: var(--iti-nav); border-radius: 1px; }

/* scrolled: a smaller logo and one row, so the bar leaves more room for the page */
@media (min-width: 992px) {
  .site-header__inner { transition: padding .2s ease; }
  .site-logo img { transition: height .2s ease; }
  .site-header.is-compact .site-header__inner { padding-top: .5rem; padding-bottom: .45rem; align-items: center; }
  .site-header.is-compact .site-logo img { height: 52px; }
  .site-header.is-compact .site-nav.navbar-collapse { flex-direction: row-reverse; align-items: center; gap: 2rem; }
  .site-header.is-compact .site-menu { gap: 1.5rem; }
}
/* no room for the meta links beside the menu: they are at the top of the page and in the footer */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .site-header.is-compact .site-meta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header, .site-header__inner, .site-logo img { transition: none; }
}

@media (max-width: 991.98px) {
  .site-header__inner { align-items: center; padding: .75rem var(--gutter-narrow); }
  .site-logo img { height: 52px; }
  .site-nav { align-items: stretch; width: 100%; }
  /* the open menu scrolls by itself: the header no longer scrolls away with the page */
  .site-nav.navbar-collapse { max-height: calc(100vh - var(--iti-top) - 5rem); max-height: calc(100dvh - var(--iti-top) - 5rem); overflow-y: auto; }
  .site-menu { gap: 0; padding: .5rem 0; }
  .site-menu .nav-link { padding: .6rem 0; border-bottom: var(--border-hair) solid var(--iti-border); }
  .site-meta { order: 2; flex-wrap: wrap; padding: .75rem 0 .25rem; }
}

/* ------------------------------------------------------------ breadcrumb */

/* one pixel under the header, so nothing shows between the two */
.site-breadcrumb {
  position: sticky; top: calc(var(--iti-top) + var(--iti-header-height) - 1px); z-index: 1020;
  background: var(--iti-bg); font-size: 1rem;
  transition: box-shadow .2s ease;
}
.site-breadcrumb.is-stuck { box-shadow: var(--iti-shadow); }
.site-breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; max-width: var(--page-max); margin: 0 auto; padding: .75rem var(--gutter) .5rem; }
.site-breadcrumb li { color: var(--iti-muted); }
.site-breadcrumb li + li::before {
  content: "";
  display: inline-block;
  width: .45em; height: .45em;
  margin: 0 .6em .12em .45em;
  border-right: 2px solid var(--iti-muted);
  border-top: 2px solid var(--iti-muted);
  transform: rotate(45deg);
}
.site-breadcrumb a { color: var(--iti-muted); }
.site-breadcrumb a:hover { color: var(--iti-link); }
.site-breadcrumb [aria-current] { color: var(--iti-heading); }

/* ------------------------------------------------------------------ main */

.site-main { max-width: var(--page-max); margin: 0 auto; padding: .5rem var(--gutter) 3.5rem; min-height: 40vh; }
@media (max-width: 991.98px) {
  .site-main, .site-breadcrumb ol { padding-left: var(--gutter-narrow); padding-right: var(--gutter-narrow); }
  /* the breadcrumb keeps to one line and scrolls sideways (header.js shows its end, the current page) */
  .site-breadcrumb ol { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .site-breadcrumb ol::-webkit-scrollbar { display: none; }
  .site-breadcrumb li { flex: none; }
}

/* ---------------------------------------------------------------- footer */

.site-footer { background: var(--iti-footer-bg); color: var(--iti-footer-text); margin-top: 2rem; }
.site-footer a { color: var(--iti-footer-text); letter-spacing: .02em; }
.site-footer a:hover { color: var(--iti-footer-text); text-decoration: underline; }
.site-footer__main {
  max-width: var(--page-max); margin: 0 auto; padding: 3rem var(--gutter) 2.5rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem var(--footer-gap);
}
.site-footer h2 {
  color: var(--iti-footer-heading);
  font-size: 1.15rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  margin: 0 0 1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 .45rem; }
.site-footer p { margin: 0; line-height: 1.8; }
.site-footer__col .row { margin: 0; }                 /* the grid plugins inside the footer alias */
.site-footer__col [class*=col] { width: 100%; max-width: none; margin: 0; padding: 0; flex: 0 0 100%; }
.site-footer__bar { background: var(--iti-footer-bar); }
.site-footer__bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2.5rem;
  padding: 1rem max(var(--gutter), calc((100% - var(--page-max)) / 2 + var(--gutter)));
  font-size: .95rem;
}
.site-footer__bar ul { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }   /* wraps on small phones */
.site-footer__bar li { margin: 0; }
.site-footer__languages .site-languages > * + * { border-color: var(--iti-footer-text); }
.site-footer__languages .site-languages__current { color: var(--iti-footer-text); }
.site-footer__copyright { margin-left: auto !important; }

/* ------------------------------------------------ content from the CMS */

.site-main .table { --bs-table-bg: transparent; --bs-table-color: var(--iti-text); --bs-table-border-color: var(--iti-border); }
.site-main .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: var(--iti-surface); }
blockquote { border-left: var(--border-quote) solid var(--iti-accent); padding-left: 1rem; color: var(--iti-muted); }
.post-detail { list-style: none; display: inline; padding: 0; color: var(--iti-muted); font-size: .85rem; text-transform: uppercase; }
.post-detail li { display: inline; margin-right: .75rem; }
.post-detail.tags li a { padding: .1rem .5rem; border: var(--border-hair) solid var(--iti-accent); border-radius: var(--radius-pill); color: var(--iti-accent); }

/* ------------------------------------- sidebar menus of the React pages */

.vlist { margin-bottom: 2rem; }
.vlist ul { list-style: none; margin: 0; padding: 0; }
/* the section: a heading; its pages: a plain list with room between the entries (after the university's menus) */
.vlist > ul > li > a, .vlist > ul > li > strong {
  display: block; padding: 0 0 .9rem; font-size: 1.3rem; line-height: 1.25; font-weight: 700; color: var(--iti-nav);
}
.vlist ul ul li a, .vlist ul ul li strong {
  display: block; padding: .42rem 0; font-size: 1.05rem; line-height: 1.3; font-weight: 400; color: var(--iti-heading);
}
.vlist ul ul ul { margin: 0 0 1rem .9rem; }
/* room under each group (the list after its heading), about three times the space between entries */
.vlist > ul > li:has(> ul) { margin-bottom: 2.5rem; }
.vlist > ul > li:last-child { margin-bottom: 0; }
/* a current entry is marked with <strong> around or inside its link: keep the heading's or the list's colour */
.vlist li strong a, .vlist li a strong { color: inherit; font-weight: inherit; padding: 0; font-size: inherit; }
.vlist ul ul ul li a, .vlist ul ul ul li strong { padding: .28rem 0; font-size: .95rem; color: var(--iti-muted); }
.vlist li a:hover, .vlist li a:focus-visible { color: var(--iti-link); background: none; text-decoration: none; }
.vlist ul ul li strong, .vlist li.actives > a { color: var(--iti-link); font-weight: 600; background: none; }
.vlist > ul > li.actives > a, .vlist > ul > li.activep > a { color: var(--iti-nav); font-weight: 700; }
/* the roof picture of the old design above the menu is not part of the university's design */
.headImg2, .vlist > img:first-child { display: none; }

/* staff table (class name kept from the old TYPO3 directory) */
.tx-wtdirectory-pi1 table th { color: var(--iti-muted); font-weight: 600; }
.tx-wtdirectory-pi1 table th span { cursor: pointer; }
/* phone and room stay on one line, the columns take just the room they need */
.tx-wtdirectory-pi1 table .th-3, .tx-wtdirectory-pi1 table .td-3,
.tx-wtdirectory-pi1 table .th-4, .tx-wtdirectory-pi1 table .td-4 { width: 1%; white-space: nowrap; }
/* on narrow screens scroll the table sideways instead of squeezing it */
.tx-wtdirectory-pi1 { overflow-x: auto; }

/* loading animation: <div class="loader"></div> */
.loader { display: inline-grid; }
.loader:before, .loader:after {
  content: "";
  grid-area: 1/1;
  height: 30px;
  aspect-ratio: 6;
  --c: #0000 64%, var(--iti-accent) 66% 98%, #0000 101%;
  background: radial-gradient(35% 146% at 50% 159%, var(--c)) 0 0, radial-gradient(35% 146% at 50% -59%, var(--c)) 25% 100%;
  background-size: calc(100% / 3) 50%;
  background-repeat: repeat-x;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 15%, #0000 0 50%) 0 0 / 200%;
  mask: repeating-linear-gradient(90deg, #000 0 15%, #0000 0 50%) 0 0 / 200%;
  animation: l9 .8s infinite linear;
}
.loader:after { scale: 1 -1; animation-delay: -.2s; }
@keyframes l9 { 100% { -webkit-mask-position: -100% 0; mask-position: -100% 0; } }

/* separator inside the breadcrumb entry the page apps render (e.g. Team > name) */
.site-breadcrumb__chevron {
  display: inline-block;
  width: .45em; height: .45em;
  margin: 0 .6em .12em .45em;
  border-right: 2px solid var(--iti-muted);
  border-top: 2px solid var(--iti-muted);
  transform: rotate(45deg);
}

/* ------------------------------------------- site and floor plans (staff) */

.iti-map svg { display: block; width: 100%; height: auto; }
.iti-map .iti-map__current { fill: var(--iti-map-highlight) !important; }
/* The plans are drawings with their own colours: in dark mode flip their
   lightness but keep the hues, so the highlight stays orange-red. */
[data-bs-theme=dark] .iti-map svg { filter: invert(.92) hue-rotate(180deg); }

.iti-map-trigger {
  padding: 0; border: 0; background: none;
  color: var(--iti-link); font: inherit;
  text-decoration: underline dotted; text-underline-offset: .2em;
  cursor: pointer;
}
.iti-map-trigger:hover, .iti-map-trigger[aria-expanded=true] { color: var(--iti-link-hover); text-decoration-style: solid; }
.iti-map-popover {
  width: min(700px, calc(100vw - 2rem));
  padding: .5rem;
  background: var(--iti-bg);
  border: var(--border-hair) solid var(--iti-border);
  box-shadow: var(--iti-shadow);
}

.iti-location { clear: both; margin-top: 2rem; }
/* person page: address and small maps side by side, the maps below the address on phones */
.staff-top { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-start; }
.staff-top .vcard { flex: 1 1 260px; }
.iti-location--compact { clear: none; margin-top: .3rem; flex: 0 1 340px; }
.iti-location--compact h2 { font-size: 1rem; margin: 0 0 .5rem; color: var(--iti-muted); font-weight: 600; }
.iti-location--compact .iti-location__maps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.iti-location--compact figcaption { font-size: .8rem; line-height: 1.3; }
.iti-location__open { display: block; width: 100%; padding: 0; border: var(--border-hair) solid var(--iti-border); background: var(--iti-bg); cursor: zoom-in; }
.iti-location__open:hover, .iti-location__open:focus-visible { border-color: var(--iti-accent); }
.iti-location__open .iti-map svg { display: block; width: 100%; height: 120px; }
@media (max-width: 700px) {
  .iti-location--compact { flex-basis: 100%; }
  .iti-location__open .iti-map svg { height: 100px; }
}
.iti-location__maps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.iti-location figure { margin: 0; }
.iti-location figcaption { color: var(--iti-muted); font-size: .95rem; margin-top: .35rem; }

/* ---- picture banner between header and page (plugin "Picture banner", backend/templates/banner) ---- */
.iti-banner {
  position: relative;
  height: clamp(200px, 18.75vw, 320px);
  overflow: hidden;
  background: var(--iti-card);
}
.iti-banner__slides, .iti-banner__slide { position: absolute; inset: 0; margin: 0; }
.iti-banner__slide { opacity: 0; transition: opacity .7s ease; }
.iti-banner__slide.is-current { opacity: 1; z-index: 1; }
.iti-banner__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iti-banner__slide figcaption {
  position: absolute; left: 12px; bottom: 8px;
  color: var(--iti-on-band); font-size: 12px; text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}
.iti-banner button {
  position: absolute; z-index: 2; border: 0; padding: 0; cursor: pointer;
  color: var(--iti-heading); background: color-mix(in srgb, var(--iti-bg) 72%, transparent);
}
.iti-banner button:hover, .iti-banner button:focus-visible { background: color-mix(in srgb, var(--iti-bg) 92%, transparent); }
.iti-banner button:focus-visible { outline: var(--border-nav) solid var(--iti-accent); outline-offset: calc(-1 * var(--border-nav)); }
.iti-banner button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iti-banner__prev, .iti-banner__next { top: calc(50% - 30px); width: 50px; height: 60px; }
.iti-banner__prev { left: 0; }
.iti-banner__next { right: 0; }
.iti-banner__prev svg, .iti-banner__next svg { padding: 14px 10px; }
.iti-banner__dots {
  position: absolute; z-index: 2; left: 50%; bottom: 0; transform: translateX(-50%);
  display: flex; gap: 10px; padding: 11px 12px; background: color-mix(in srgb, var(--iti-bg) 60%, transparent);
}
.iti-banner__dots button { position: static; width: 10px; height: 10px; background: var(--iti-heading); }
.iti-banner__dots button[aria-current="true"] { background: var(--iti-link); }
.iti-banner__pause { right: 0; bottom: 0; width: 38px; height: 38px; }
.iti-banner__pause svg { padding: 10px; }
.iti-banner__pause .play { display: none; fill: currentColor; stroke: none; }
.iti-banner__pause.is-paused .play { display: inline; }
.iti-banner__pause.is-paused .pause { display: none; }
@media (max-width: 700px) {
  .iti-banner { height: 290px; }
  .iti-banner__dots { left: auto; right: 0; top: 0; bottom: auto; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .iti-banner__slide { transition: none; } }

/* ---- latest news in the side column (stories plugin, template "Seitenleiste") ---- */
.news-side { margin-bottom: 2.5rem; }
.news-side__title { margin: 0 0 .9rem; font-size: 1.3rem; line-height: 1.25; font-weight: 700; color: var(--iti-nav); }
.news-side ul { list-style: none; margin: 0; padding: 0; }
.news-side li a { display: block; padding: .5rem 0; color: var(--iti-heading); text-decoration: none; line-height: 1.3; }
.news-side li a:hover, .news-side li a:focus-visible { color: var(--iti-link); text-decoration: none; }
.news-side time { display: block; font-size: .85rem; color: var(--iti-muted); }
.news-side li a span { font-size: 1.05rem; }
.news-side__empty { color: var(--iti-muted); }
.news-side__all { display: inline-block; margin-top: .6rem; font-weight: 700; color: var(--iti-heading); }
.news-side__all:hover { color: var(--iti-link); text-decoration: none; }

/* ---- pictures in running text: beside the text on wide screens (class set in the text) ---- */
.iti-figure { margin: .4rem 0 1.4rem; }
.iti-figure img { display: block; width: 100%; height: auto; }
.iti-figure figcaption { margin-top: .4rem; font-size: .9rem; color: var(--iti-muted); }
@media (min-width: 900px) {
  .iti-figure--right { float: right; width: 42%; max-width: 440px; margin: .3rem 0 1.2rem 2rem; }
  .iti-figure--left { float: left; width: 42%; max-width: 440px; margin: .3rem 2rem 1.2rem 0; }
  .iti-figure + h2, .iti-figure + h3 { margin-top: 0; }
}
/* a section starts below a picture beside the text, except the section the picture belongs to */
main h2 { clear: both; }
main .iti-figure + h2 { clear: none; }

/* research structure: on phones it takes the whole width (its box in the text has a padding of 2em) */
@media (max-width: 700px) {
  div:has(> ancient-architecture) { padding: 1em 0 !important; }
}

/* site plan: the buildings in the university's teal, as the floor in the floor plans (the SVG itself uses orange) */
.iti-map [style*="fill:#f08269"], .iti-map [fill="#f08269"] { fill: var(--iti-map-building) !important; }

/* person and project pages: the side column (photo, fields, groups) floats right with a fixed width;
   on phones it goes above the text at full width */
@media (max-width: 700px) {
  .col3 { float: none !important; width: auto !important; margin: 0 0 1rem !important; }
  .col3 .photo { margin-left: 0 !important; }
  /* person page on a phone: name, address with the maps, then photo and fields, then the rest */
  .staff-details { display: flex; flex-direction: column; }
  .staff-details > * { order: 3; }
  .staff-details > h5, .staff-details > h1 { order: 0; }
  .staff-details > .staff-top { order: 1; }
  .staff-details > .col3 { order: 2; margin-top: 1.5rem !important; }
}

/* a call to action in running text, like the university's outlined buttons */
.iti-button {
  display: inline-flex; align-items: center; gap: 1.2rem; margin: .4rem 0 .6rem; padding: .85rem 1.2rem;
  border: var(--border-hair) solid var(--iti-border); color: var(--iti-text); font-weight: 700; text-decoration: none;
}
.iti-button::after { content: "→"; color: var(--iti-heading); font-size: 1.3rem; line-height: 1; }
.iti-button:hover, .iti-button:focus-visible { border-color: var(--iti-heading); color: var(--iti-text); text-decoration: none; }
/* the way to the admin under the title of a person's, project's, field's or group's page (contentpages/editing.py) */
.record-edit { margin: .25rem 0 1rem; }
.iti-offer--teal .record-edit .iti-button,
.iti-offer--teal .record-edit .iti-button:hover,
.iti-offer--teal .record-edit .iti-button:focus-visible { border-color: var(--iti-on-band); color: var(--iti-on-band); text-decoration: none; }
.iti-offer--teal .record-edit .iti-button::after { color: var(--iti-on-band); }

/* ---- an offer in running text (the positions on the Jobs page, the blocks of the home and
   Contact pages and the legal notice), after the university's text-and-picture sections:
   heading and introduction, the picture beside them, and a box with the details that
   reaches under the picture. The block is tinted, the picture stands out of its top;
   --teal colours it, --reverse puts the picture on the left, --plain has no picture.
   The layout follows the width of the column the block is in, not of the window: the
   home page has the news beside it. */
.site-main:has(.iti-offer), .site-main .col:has(.iti-offer) { container-type: inline-size; }

/* narrow: one column, the picture between the introduction and the box, nothing overlaps */
.iti-offer {
  /* --offer-out: how far the picture stands out of the block; --offer-under: how far the box
     reaches under the picture (tokens.css; a block may set its own) */
  margin: 2.5rem 0; padding: 1.5rem;
  background: var(--iti-surface);
}
.iti-offer__text h1, .iti-offer__text h2 { margin-top: 0; }
.iti-offer__text > :last-child { margin-bottom: 0; }
.iti-offer__picture { position: relative; z-index: 2; margin: 1.5rem 0 0; }
.iti-offer__picture a { display: block; }
.iti-offer__picture img, .iti-offer__picture .news-tile { display: block; width: 100%; height: clamp(200px, 50cqw, 320px); object-fit: cover; }
.iti-offer__picture figcaption {
  position: absolute; left: 12px; bottom: 8px; right: 12px;
  color: var(--iti-on-band); font-size: 12px; text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}
/* shown whole, not cut to the block: a group photo, or a drawing such as a plan (on white, as drawn) */
.iti-offer .iti-offer__picture--whole img { height: auto; object-fit: contain; }
.iti-offer__picture--whole img[src$=".svg"] { padding: 1rem; background: var(--iti-paper); }
.iti-offer__box {
  position: relative; z-index: 1; margin-top: 1.5rem; padding: 1.5rem;
  background: var(--iti-bg); color: var(--iti-text);
  border: var(--border-box) solid var(--iti-border); border-radius: var(--radius-box);
}
.iti-offer__box > :first-child { margin-top: 0; }
.iti-offer__box > :last-child, .iti-offer__box .iti-button { margin-bottom: 0; }
.iti-offer--teal { background: var(--iti-band); color: var(--iti-on-band); }
.iti-offer--teal .iti-offer__text h1, .iti-offer--teal .iti-offer__text h2, .iti-offer--teal .iti-offer__text a { color: var(--iti-on-band); }
.iti-offer--teal .iti-offer__text a { text-decoration: underline; }
@media (max-width: 600px) {
  .iti-offer { margin-left: -1rem; margin-right: -1rem; padding: 1.5rem 1rem; }   /* to the edges of the screen */
  .iti-offer__box { padding: 1.25rem 1rem; }
}

/* wide: text and picture side by side, the box under the text and partly under the picture */
@container (min-width: 900px) {
  .iti-offer {
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr;
    margin: calc(var(--offer-out) + var(--block-pad)) 0 var(--block-pad); padding: var(--block-pad);
  }
  .iti-offer__text { grid-column: 1; grid-row: 1; padding-right: var(--block-pad); }
  .iti-offer__picture {
    grid-column: 2; grid-row: 1 / span 2; align-self: start;
    margin: calc(-1 * var(--block-pad) - var(--offer-out)) 0 0;
  }
  .iti-offer__picture img, .iti-offer__picture .news-tile { height: min(460px, 40cqw); }
  .iti-offer__box {
    grid-column: 1; grid-row: 2; align-self: start;
    width: calc(100% + var(--offer-under)); margin-top: var(--box-pad);
    padding: var(--box-pad) calc(var(--offer-under) + var(--box-pad)) var(--box-pad) var(--box-pad);
  }
  .iti-offer--teal .iti-offer__box { border-color: transparent; }
  .iti-offer--reverse .iti-offer__text { grid-column: 2; padding: 0 0 0 var(--block-pad); }
  .iti-offer--reverse .iti-offer__picture { grid-column: 1; }
  .iti-offer--reverse .iti-offer__box {
    grid-column: 2; margin-left: calc(-1 * var(--offer-under));
    padding: var(--box-pad) var(--box-pad) var(--box-pad) calc(var(--offer-under) + var(--box-pad));
  }
  /* without a picture: the box takes its place beside the text and stands out of the block */
  .iti-offer--plain .iti-offer__box, .iti-offer--plain.iti-offer--reverse .iti-offer__box {
    grid-column: 2; grid-row: 1 / span 2; align-self: start;
    width: auto; margin: calc(-1 * var(--block-pad) - var(--offer-out)) 0 0; padding: var(--box-pad);
    border-color: var(--iti-border);
  }
  .iti-offer--plain.iti-offer--reverse .iti-offer__box { grid-column: 1; }
}

/* ---- news (templates/djangocms_stories): the latest post as a block like the ones above,
   the others as cards; a post without a picture shows a tile with its date ---- */
.news-date { margin: 0 0 .5rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--iti-muted); }
.iti-offer--teal .news-date { color: var(--iti-on-band); }
.news-subtitle { font-size: 1.2rem; color: var(--iti-muted); }
.news-abstract > :last-child { margin-bottom: 0; }
.news-lead h2 a, .news-card h3 a { color: var(--iti-heading); }
.news-lead h2 a:hover, .news-card h3 a:hover { color: var(--iti-link); text-decoration: none; }
.news-lead .iti-button { margin-top: 1.5rem; }
.news-tile {
  display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
  background: var(--iti-band); color: var(--iti-on-band);
}
.news-lead .news-tile, .news-card:nth-child(even) .news-tile { background: var(--iti-footer-bg); }
.news-tile__day { font-size: clamp(3.5rem, 12cqw, 6rem); font-weight: 700; line-height: 1; }
.news-tile__month { font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--box-pad); margin: 3rem 0; }
.news-card { display: flex; flex-direction: column; background: var(--iti-surface); }
.news-card__picture { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.news-card__picture img, .news-card__picture .news-tile { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.news-card:hover .news-card__picture img { transform: scale(1.03); }
.news-card__text { padding: 1.25rem var(--card-pad) var(--card-pad); }
.news-card h3 { margin: 0 0 .6rem; font-size: 1.3rem; line-height: 1.25; }
.news-pages { display: flex; gap: 1.5rem; align-items: center; margin: 2rem 0; }
.news-post .blog-content, .news-post .blog-visual { max-width: 52rem; }
.news-post .blog-content { font-size: 1.1rem; overflow-wrap: anywhere; }
.news-back { margin-top: 2.5rem; }
@media (prefers-reduced-motion: reduce) { .news-card__picture img { transition: none; } }

/* ---- what a person teaches, on their page (institute/person_detail.html) ---- */
.person-teaching h3 { margin: 1.2rem 0 .5rem; font-size: 1.05rem; color: var(--iti-muted); text-transform: uppercase; letter-spacing: .05em; }
.person-courses { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.person-courses a {
  display: inline-block; padding: .55rem .9rem; border: var(--border-box) solid var(--iti-border); border-radius: var(--radius-box);
  color: var(--iti-text); font-weight: 600; text-decoration: none;
}
.person-courses a:hover, .person-courses a:focus-visible { border-color: var(--iti-heading); color: var(--iti-link); }
.person-courses-earlier { margin-top: 1.5rem; }
.person-courses-earlier summary { cursor: pointer; font-weight: 600; color: var(--iti-heading); }
.person-courses-earlier dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 1rem 0 0; }
.person-courses-earlier dt { color: var(--iti-muted); font-weight: 600; }
.person-courses-earlier dd { margin: 0; }
@media (max-width: 600px) { .person-courses-earlier dl { grid-template-columns: 1fr; } .person-courses-earlier dd { margin-bottom: .6rem; } }

/* ---- the pencil after a publication's title, for the team (publications/publication.html) ---- */
.publication-edit { display: inline-flex; align-items: center; margin-left: .35rem; color: var(--iti-heading); vertical-align: baseline; }
.publication-edit svg { width: .85em; height: .85em; fill: currentColor; }
.publication-edit:is(:hover, :focus-visible) { color: var(--iti-link); }

/* ---- pictures with caption and source, picture rows, the lightbox (plugins "Picture" and "Picture row",
   backend/templates/gallery, static/js/gallery.js). Square and flat like every picture of the site;
   a click shows the whole picture with its whole caption. ---- */
.iti-picture { margin: 1.4rem 0; }
.iti-picture a { display: block; cursor: zoom-in; }
.iti-picture img { display: block; width: 100%; height: auto; background: var(--iti-surface); transition: opacity .15s ease; }
.iti-picture a:hover img { opacity: .88; }
.iti-picture a:focus-visible { outline: var(--border-nav) solid var(--iti-accent); outline-offset: 2px; }
.iti-picture figcaption { padding-top: .45rem; font-size: .93rem; line-height: 1.45; }
.iti-picture__source { white-space: nowrap; font-size: .9em; }
.iti-picture__source::before { content: "· "; }
.iti-picture__missing {
  margin: .35rem 0 0; padding: .2rem .5rem; font-size: .85rem; font-weight: 700;
  color: var(--iti-text); background: var(--iti-draft);
}
@media (prefers-reduced-motion: reduce) { .iti-picture img { transition: none; } }
.iti-picture--small { max-width: 300px; }
.iti-picture--medium { max-width: 500px; }
.iti-picture--large { max-width: 800px; }
.iti-picture--center { margin-left: auto; margin-right: auto; }
.iti-picture--left { float: left; clear: left; margin: .3rem 1.6rem 1rem 0; width: 45%; }
.iti-picture--right { float: right; clear: right; margin: .3rem 0 1rem 1.6rem; width: 45%; }
@media (max-width: 700px) { .iti-picture--left, .iti-picture--right { float: none; width: auto; margin: 1.2rem 0; } }

/* a row: tiles of one size, cut to 4:3; the caption shows three lines, the lightbox all of it */
.iti-row { clear: both; margin: 1.8rem 0; }
.iti-row__items { display: grid; gap: 1.4rem 1.2rem; align-items: start; }
.iti-row--small .iti-row__items { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.iti-row--medium .iti-row__items { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.iti-row--large .iti-row__items { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.iti-row .iti-picture { float: none; width: auto; max-width: none; margin: 0; }
.iti-row .iti-picture img { aspect-ratio: 4 / 3; object-fit: cover; }
.iti-row .iti-picture figcaption {
  font-size: .88rem; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.iti-row[data-row-upload] .iti-picture[draggable="true"] { cursor: grab; transition: opacity .15s; }
.iti-row .iti-picture.is-dragged { opacity: .35; outline: var(--border-box) dashed var(--iti-heading); outline-offset: 4px; }
.iti-row__drop {
  display: flex; flex-direction: column; align-items: center; gap: .35rem; margin-top: 1.2rem; padding: 1.3rem 1rem;
  border: var(--border-box) dashed var(--iti-border); border-radius: var(--radius-content); background: var(--iti-surface);
  color: var(--iti-muted); text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.iti-row__drop strong { color: var(--iti-text); }
.iti-row__drop svg { width: 2rem; height: 2rem; fill: none; stroke: var(--iti-heading); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iti-row__drop:hover, .iti-row__drop:focus-visible, .iti-row__drop.is-over {
  border-color: var(--iti-heading); background: color-mix(in srgb, var(--iti-heading) 10%, var(--iti-bg));
}
.iti-row__drop.is-busy { cursor: progress; opacity: .8; }
.iti-row__hint { font-size: .84rem; max-width: 40rem; }
.iti-row__status { font-size: .9rem; color: var(--iti-text); }
.iti-row__status:empty { display: none; }

/* the lightbox lies over the whole page in the frame's colours; buttons as in the banner */
.iti-lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--iti-bg); color: var(--iti-text);
}
.iti-lightbox::backdrop { background: transparent; }
.iti-lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 80px 84px; }
/* the stage clips a zoomed picture, so it never runs over the caption and the buttons */
.iti-lightbox__stage {
  flex: 1 1 auto; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: none; cursor: zoom-in;
}
.iti-lightbox.is-zoomed .iti-lightbox__stage { cursor: grab; }
.iti-lightbox.is-zoomed .iti-lightbox__stage:active { cursor: grabbing; }
.iti-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; user-select: none; -webkit-user-drag: none; }
.iti-lightbox figcaption {
  flex: none; max-width: 900px; margin-top: 14px; padding: 0 1rem; max-height: 110px; overflow: auto;
  color: var(--iti-muted); font-size: 1rem; line-height: 1.5; text-align: center;
}
.iti-lightbox figcaption:empty { display: none; }
.iti-lightbox button {
  position: absolute; border: 0; padding: 0; cursor: pointer;
  color: var(--iti-heading); background: var(--iti-surface);
}
.iti-lightbox button:hover { background: var(--iti-card); }
.iti-lightbox button:focus-visible { outline: var(--border-nav) solid var(--iti-accent); outline-offset: calc(-1 * var(--border-nav)); }
.iti-lightbox button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iti-lightbox__prev, .iti-lightbox__next { top: calc(50% - 30px); width: 50px; height: 60px; }
.iti-lightbox__prev { left: 16px; }
.iti-lightbox__next { right: 16px; }
.iti-lightbox__prev svg, .iti-lightbox__next svg { padding: 14px 10px; }
.iti-lightbox__close { top: 16px; right: 16px; width: 44px; height: 44px; }
.iti-lightbox__close svg { padding: 12px; }
.iti-lightbox.is-single .iti-lightbox__prev, .iti-lightbox.is-single .iti-lightbox__next { display: none; }
.iti-lightbox__zoom { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 8px; }
.iti-lightbox__zoom button { position: static; width: 44px; height: 44px; }
.iti-lightbox__zoom svg { padding: 12px; }
@media (max-width: 700px) {
  .iti-lightbox figure { padding: 68px 12px 84px; }
  /* phones: back and forth at the outer edges, the zoom in the middle */
  .iti-lightbox__prev, .iti-lightbox__next { top: auto; bottom: 18px; height: 44px; }
  .iti-lightbox__prev { left: 12px; }
  .iti-lightbox__next { right: 12px; }
  .iti-lightbox__prev svg, .iti-lightbox__next svg { padding: 10px 14px; }
}

/* ---- content area in the slide colours (design/README.md): every page carries .iti-content
   on <main> (base.html; a template can empty the block main_class to leave it out). The frame keeps the site colours, and so do the
   side columns inside <main> (side menu, latest news); everything else takes the colours and
   drawing rules of the lecture slides: petrol headings, warm ink, a short accent bar above each
   h2, hairlines between list items, cards with small round corners, no shadows. The accent
   (iti-c-accent) only draws rules and frames; orange text stays the link orange. ---- */
.iti-content { color: var(--iti-c-ink); }
.iti-content :where(h1, h2, h3, h4, h5, h6):not(:where(.vlist, .news-side, .teaching-sidebar, .record-sidebar) *) { color: var(--iti-c-heading); }
.iti-content :where(.lead, figcaption, .news-date, .record-kind, .news-subtitle) { color: var(--iti-c-muted); }

/* the statement rule of the slides: a short bar above each section heading of the running text */
.iti-content h2:not(:where(.vlist, .news-side, .teaching-sidebar, .record-sidebar, .record-side, .col3, .iti-offer, .iti-location) *) {
  position: relative; padding-top: 16px;
}
.iti-content h2:not(:where(.vlist, .news-side, .teaching-sidebar, .record-sidebar, .record-side, .col3, .iti-offer, .iti-location) *)::before {
  content: ""; position: absolute; left: 0; top: 0; width: 64px; height: var(--rule-heading); background: var(--iti-c-accent);
}

/* the React widgets of the content take their colours from the --iti-* variables: hand them the content
   colours (their side menus are drawn into the side column, outside the element, and keep the frame's;
   the maps of <staff-location> are drawings and keep theirs) */
.iti-content :is(teaching-overview, team-overview, course-card-list, project-card-list, ancient-architecture,
                 teaser-tabs, teaser-tile, picture-card, video-preview) {
  --iti-text: var(--iti-c-ink); --iti-muted: var(--iti-c-muted); --iti-heading: var(--iti-c-heading);
  --iti-border: var(--iti-c-hair); --iti-surface: var(--iti-c-neutral); --iti-card: var(--iti-c-fill);
}

/* the facts column of a course (.col3): its headings carry the card rule, the separator of the slides' cards */
.iti-content .col3 h2 {
  padding-bottom: .35rem; border-bottom: var(--rule-card) solid var(--iti-c-accent); font-size: 1.3rem;
}

/* lines: hairlines only */
.iti-content hr { border-color: var(--iti-c-hair); }
.iti-content .table { --bs-table-color: var(--iti-c-ink); --bs-table-border-color: var(--iti-c-hair); }
.iti-content .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: var(--iti-c-neutral); }
.iti-content :is(.record-links, .record-news) li { border-top-color: var(--iti-c-hair); }
.iti-content .iti-button { border-color: var(--iti-c-hair); color: var(--iti-c-ink); }
.iti-content .iti-button::after { color: var(--iti-c-heading); }
.iti-content .iti-button:hover, .iti-content .iti-button:focus-visible { border-color: var(--iti-c-line); color: var(--iti-c-ink); }

/* notes and context: a neutral field with round corners instead of a rule at the side */
.iti-content :is(blockquote, .record-note, .course-update, .iti-note) {
  padding: .75rem 1rem; border: 0; border-radius: var(--radius-content); background: var(--iti-c-neutral); color: var(--iti-c-muted);
}
.iti-content :is(blockquote, .record-note, .course-update, .iti-note) > :last-child { margin-bottom: 0; }
.iti-content .course-update button { border-color: var(--iti-c-heading); border-radius: var(--radius-content); background: var(--iti-c-heading); color: var(--iti-c-panel); }
.iti-content .course-update button:hover, .iti-content .course-update button:focus-visible { border-color: var(--iti-c-line); background: var(--iti-c-line); }

/* building blocks for the text editor (class on a div or list):
   .iti-list   a list with hairlines between its items, no bullets
   .iti-card   a heading with the accent rule under it, then an .iti-panel
   .iti-panel  a white card with a hairline frame
   .iti-chip   a short label on the petrol-light fill (a number, a level, a code)
   .iti-highlight  the one box per page that holds what the page is about */
.iti-content .iti-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.iti-content .iti-list > li { padding: .65rem 0; }
.iti-content .iti-list > li + li { border-top: var(--border-hair) solid var(--iti-c-hair); }
.iti-content .iti-card > :is(h2, h3, h4):first-child {
  margin: 0 .9rem; padding: 0 0 .35rem; border-bottom: var(--rule-card) solid var(--iti-c-accent); font-size: 1.1rem; font-weight: 700;
}
.iti-content .iti-card > :is(h2, h3, h4):first-child::before { content: none; }
.iti-content .iti-panel {
  margin-top: .75rem; padding: .75rem 1rem;
  border: var(--border-hair) solid var(--iti-c-hair); border-radius: var(--radius-content); background: var(--iti-c-panel);
}
.iti-content .iti-panel > :last-child { margin-bottom: 0; }
.iti-content .iti-chip {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.1rem; padding: .1rem .5rem;
  border-radius: var(--radius-content); background: var(--iti-c-fill); color: var(--iti-c-heading);
  font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums;
}
.iti-content .iti-highlight {
  margin: 1.5rem 0; padding: 1.1rem 1.25rem;
  border: var(--border-box) solid var(--iti-c-accent); border-radius: var(--radius-content); background: var(--iti-c-accent-fill); color: var(--iti-c-ink);
}
.iti-content .iti-highlight > :first-child { margin-top: 0; }
.iti-content .iti-highlight > :last-child { margin-bottom: 0; }
.iti-content .iti-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin: 1rem 0; }

/* links that look like headings, and the arrows of link lists: petrol instead of the site teal */
.iti-content :is(.news-lead h2 a, .news-card h3 a, .record-news a, .record-facts dd a, .record-side ul.record-related a,
                 .record-completed a, .person-courses-earlier summary) { color: var(--iti-c-heading); }
.iti-content :is(.record-links a, .record-more > summary)::after { color: var(--iti-c-heading); }
.iti-content :is(.news-lead h2 a, .news-card h3 a, .record-news a, .record-facts dd a, .record-side ul.record-related a,
                 .record-completed a):is(:hover, :focus-visible) { color: var(--iti-c-accent-text); }

/* chips and boxes that already exist on the pages */
.iti-content :is(.person-courses a, .record-chips a) { border: 0; border-radius: var(--radius-content); background: var(--iti-c-fill); color: var(--iti-c-heading); }
.iti-content :is(.person-courses a, .record-chips a):is(:hover, :focus-visible) { color: var(--iti-c-accent-text); }
.iti-content .record-side { border-color: var(--iti-c-hair); border-radius: var(--radius-content); background: var(--iti-c-panel); }
