/* Battery Coast site, built on the UiA brand book (see _dev/NOTES_Website/UiA Design Guidelines.md).
   Red is the dominant colour, warm grey the calm background. Blue and green are not used. */

:root {
  --uia-red: #C8102E;
  --uia-red-dark: #78111F;
  --link-red: #D0243C;          /* links: a little brighter than the brand red, still 4.5:1 on white and on warm grey (brand red #C8102E stays for headings, buttons and the logo) */
  --uia-red-deeper: #4B161C;
  --uia-red-muted: #FEE7E8;
  --uia-warm-grey: #F8EDDD;
  --uia-ink: #281015;           /* text colour, 15:1 on warm grey */
  --uia-line: #E4D6C3;
  --font: "Acumin Pro", "Acumin", Arial, Helvetica, sans-serif;   /* Acumin if installed, else Arial */
  --radius: 20px;
  --content-width: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--uia-warm-grey);
  color: var(--uia-ink);
  font-family: var(--font);
  font-size: 1.0625rem;          /* 17 px */
  line-height: 1.6;
  /* short pages: the main part takes the free height, so the footer stays at the bottom of the window */
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
}
img { max-width: 100%; height: auto; }
a { color: var(--link-red); text-underline-offset: 3px; }
a:hover { color: var(--uia-red-dark); }
:focus-visible { outline: 3px solid var(--uia-ink); outline-offset: 3px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--uia-ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

/* ---------- header and navigation ---------- */
.site-header { background: #fff; border-bottom: 3px solid var(--uia-red); }
.header-inner {
  max-width: var(--content-width); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo img { display: block; height: 56px; width: auto; }

.main-nav { background: #fff; border-top: 1px solid var(--uia-line); }
.nav-list {
  max-width: var(--content-width); margin: 0 auto; padding: 0 20px;
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px;
}
.nav-list > li { position: relative; }
.nav-list a { display: block; padding: 12px 16px; color: var(--uia-red); text-decoration: none; font-weight: 600; }
.nav-list a:hover, .nav-list a:focus-visible { background: var(--uia-red-muted); }
.nav-list li.active > a { box-shadow: inset 0 -3px 0 var(--uia-red); }
.has-children > a::after { content: "▾"; margin-left: .4em; font-size: .8em; }
.submenu {
  display: none; position: absolute; left: 0; top: 100%; z-index: 20; min-width: 15rem;
  margin: 0; padding: 6px 0; list-style: none; background: #fff;
  border: 1px solid var(--uia-line); border-radius: 0 0 12px 12px; box-shadow: 0 8px 20px rgba(40, 16, 21, .15);
}
.has-children:hover > .submenu, .has-children:focus-within > .submenu { display: block; }
.submenu a { padding: 10px 18px; font-weight: 400; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .logo img { height: 40px; }
  .js .nav-toggle {
    display: block; width: 100%; padding: 12px 20px; border: 0; background: var(--uia-red); color: #fff;
    font: inherit; font-weight: 600; text-align: left; cursor: pointer;
  }
  .js .nav-toggle[aria-expanded="false"] + .nav-list { display: none; }
  .nav-list { flex-direction: column; padding: 0; gap: 0; }
  .nav-list > li { border-top: 1px solid var(--uia-line); }
  .submenu { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 6px 16px; }
  .has-children > a::after { content: none; }
}

/* ---------- main card ---------- */
.site-main { padding: 28px 16px 48px; flex: 1 0 auto; }
.card {
  max-width: var(--content-width); margin: 0 auto; background: #fff;
  border-radius: var(--radius); padding: 32px clamp(18px, 4vw, 48px) 40px;
}
.content > :first-child { margin-top: 0; }
.content::after { content: ""; display: block; clear: both; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; margin: 1.6em 0 .6em; }
h1 { color: var(--uia-red); font-size: clamp(1.75rem, 3.5vw, 2.4rem); margin-top: 0; }
h2 { font-size: 1.5rem; border-top: 2px solid var(--uia-line); padding-top: .6em; }   /* one rule colour everywhere: the beige-brown of the separators */
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }
p, ul, ol { margin: 0 0 1em; }
hr, .wp-block-separator { border: 0; border-top: 2px solid var(--uia-line); margin: 2em 0; }
hr + h2, .wp-block-separator + h2 { border-top: 0; margin-top: .8em; }   /* never two rules in a row; the pill keeps its size */

/* ---------- WordPress blocks, restyled ---------- */
.wp-block-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; margin: 1.5em 0; }
.wp-block-column { min-width: 0; }
.wp-block-image { margin: 0 0 1em; }
.wp-block-image img { display: block; }
.wp-block-image.aligncenter img, .aligncenter { margin-left: auto; margin-right: auto; }
.wp-block-image.aligncenter figcaption { text-align: center; }
.is-style-rounded img, img.is-style-rounded { border-radius: 24px; }
img.aligncenter { display: block; }   /* images written in the notes as ![](file){: .aligncenter } */
.content p > img:only-child, .content p > a:only-child > img { display: block; }   /* a paragraph holding just a picture, as the old figures did */
figcaption { font-size: .875rem; color: #5b4a40; margin-top: .4em; }
.alignleft, .alignright { max-width: 100%; }
@media (min-width: 700px) {
  .alignleft { float: left; max-width: 45%; margin: 0 1.5em 1em 0; }
  .alignright { float: right; max-width: 45%; margin: 0 0 1em 1.5em; }
}
.text-center { text-align: center; }
.text-right { text-align: right; }

.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 1em 0; }
.wp-block-buttons p { margin: 0; }
.wp-block-button__link {
  display: inline-block; background: var(--uia-red); color: #fff; text-decoration: none;
  padding: 10px 22px; border-radius: 30px; font-weight: 600;
}
.wp-block-button__link:hover, .wp-block-button__link:focus-visible { background: var(--uia-red-dark); color: #fff; }

.wp-block-table { overflow-x: auto; margin: 0 0 1em; }
.wp-block-table table { border-collapse: collapse; }
.wp-block-table td, .wp-block-table th { padding: 8px 12px; vertical-align: top; }
.wp-block-table.is-style-stripes tr:nth-child(odd) { background: var(--uia-warm-grey); }
.wp-block-gallery { display: flex; flex-wrap: wrap; gap: 12px; margin: 1em 0; }
.wp-block-gallery figure { margin: 0; flex: 1 1 200px; }
.wp-block-cover { border-radius: var(--radius); background: var(--uia-warm-grey); padding: 24px; margin: 1em 0; }
iframe { max-width: 100%; border: 0; border-radius: 12px; }

/* accordions (from the old toggle blocks) and tab sections */
details.accordion { background: var(--uia-warm-grey); border-radius: 14px; margin: 0 0 12px; }
details.accordion > summary { padding: 14px 20px; font-weight: 600; font-size: 1.125rem; color: var(--uia-red); cursor: pointer; }
details.accordion > .accordion-body { padding: 4px 20px 20px; }
.tab-section { margin: 0 0 2em; }
.tab-section > h3 { color: var(--uia-red); }

/* ---------- team ---------- */
.jump-list { font-weight: 600; }
.year-group { scroll-margin-top: 16px; }

/* Tabs: teams side by side as equals. Only active with JavaScript (class "js"); otherwise all lists are shown. */
.tablist { display: none; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.js .tablist { display: flex; }
.tab {
  font: inherit; font-weight: 600; cursor: pointer; padding: 8px 18px; border-radius: 30px;
  border: 2px solid var(--uia-red); background: #fff; color: var(--uia-red);
}
.tab:hover { background: var(--uia-red-muted); }
.tab[aria-selected="true"] { background: var(--uia-red); color: #fff; }
.tab-count { font-weight: 400; font-size: .875em; opacity: .85; }
.js .panel-title { display: none; }
.tab-panel[hidden] { display: none; }
.person-teams { font-size: .8125rem; color: #5b4a40; }
.people { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.person { display: flex; gap: 16px; align-items: center; background: var(--uia-warm-grey); border-radius: 16px; padding: 14px; }
.person-photo { flex: 0 0 84px; width: 84px; height: 84px; object-fit: cover; border-radius: 16px; background: #fff; }
.person-initials { display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--uia-red); font-size: 1.5rem; }
.person-text { display: flex; flex-direction: column; min-width: 0; }
.person-name a { text-decoration: none; }
.person-name a:hover { text-decoration: underline; }
.person-role { font-size: .9375rem; }
.person-email { font-size: .875rem; overflow-wrap: anywhere; }

/* ---------- life-cycle schematic (home page): stages, and the teams as clickable bands ---------- */
.lifecycle { margin: 1.5em 0 2em; }
.lifecycle-stages, .lifecycle-bands { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.lifecycle-stages li {
  background: var(--uia-warm-grey); padding: .8em .6em; text-align: center; font-weight: 600; font-size: .9rem;
  clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%, 8% 50%);
}
.lifecycle-bands { margin-top: 8px; grid-auto-flow: row dense; }
.lifecycle-bands li { background: var(--uia-red-muted); border-radius: 12px; transition: background .15s, color .15s; }
.lifecycle-bands li > a { display: block; height: 100%; padding: .7em .9em; color: inherit; text-decoration: none; border-radius: 12px; font-size: .9rem; }
.lifecycle-bands li > a span { display: block; font-size: .8125rem; }
.lifecycle-bands li:hover, .lifecycle-bands li:focus-within { background: var(--uia-red); color: #fff; }
@media (max-width: 720px) {
  .lifecycle-stages { grid-template-columns: repeat(2, 1fr); }
  .lifecycle-stages li { clip-path: none; border-radius: 8px; }
  .lifecycle-bands { grid-template-columns: 1fr; }
  .lifecycle-bands li { grid-column: auto !important; }
}

/* ---------- teams, methods, projects, positions ---------- */
.team-cards { list-style: none; padding: 0; margin: 1.5em 0; display: grid; gap: 16px; }
.team-card { display: flex; gap: 20px; align-items: flex-start; background: var(--uia-warm-grey); border-radius: 16px; padding: 18px; }
.team-card h2, .team-card h3 { border: 0; padding: 0; margin: 0 0 .2em; font-size: 1.375rem; }
.team-card h2 a, .team-card h3 a { text-decoration: none; }
.lead { font-size: 1.125rem; }
.see-also { font-weight: 600; }
@media (max-width: 560px) { .team-card { flex-direction: column; } }
.breadcrumb { font-size: .9375rem; margin: 0 0 1em; }
.button { display: inline-block; background: var(--uia-red); color: #fff; text-decoration: none; padding: 8px 20px; border-radius: 30px; font-weight: 600; }
.button:hover, .button:focus-visible { background: var(--uia-red-dark); color: #fff; }

.pi-cards { list-style: none; padding: 0; margin: 1.5em 0 0; display: grid; gap: 16px; }
.pi-card, .pi-header { display: flex; gap: 20px; align-items: flex-start; }
.pi-card { background: var(--uia-warm-grey); border-radius: 16px; padding: 18px; }
.pi-photo { flex: 0 0 96px; width: 96px; height: 96px; object-fit: cover; border-radius: 16px; background: #fff; }
.pi-photo-large { flex-basis: 140px; width: 140px; height: 140px; }
.pi-card h2 { border: 0; padding: 0; margin: 0 0 .2em; font-size: 1.375rem; }
.pi-card h2 a { text-decoration: none; }
.pi-header { margin-bottom: 1.5em; }
.pi-header h1 { margin-bottom: .2em; }
.pi-text p { margin: 0 0 .5em; }
.pi-team { font-weight: 600; color: var(--uia-red); }
.pi-note { font-size: .9375rem; }
.pi-links { font-size: .9375rem; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .pi-card, .pi-header { flex-direction: column; }
}

details.accordion.team-members { margin: 1.5em 0; }
.method { border-top: 1px solid var(--uia-line); padding: 1em 0; }
.method h3 { margin: 0 0 .3em; }
.method h3 a { text-decoration: none; }
.method p { margin: 0 0 .5em; }
.method-team, .method-equipment { font-size: .9375rem; }
.chips { list-style: none; padding: 0; margin: 0 0 .6em; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { background: var(--uia-red-muted); color: var(--uia-red-dark); border-radius: 20px; padding: 2px 12px; font-size: .875rem; }
.method-more { margin-top: .6em; }
.method-figure { margin: 0 0 1em; }
.method-figure img { border-radius: 8px; max-height: 320px; width: auto; }
.app-index { padding-left: 1.2em; }
.app-index li { margin-bottom: .4em; }

.project-meta { display: block; font-weight: 400; font-size: .875rem; color: var(--uia-ink); }
.project-body p > a > img, .project-body p > img { display: block; max-height: 56px; width: auto; margin: 1em 0 .4em; border-radius: 0; }
.project-contact { display: flex; gap: 16px; align-items: center; margin-top: 1em; }
.project-contact img { width: 75px; height: 75px; object-fit: cover; border-radius: 12px; display: block; }
.facts { list-style: none; padding: 0; margin: 0 0 1em; }

/* ---------- publications ---------- */
.publication-list { list-style: none; padding: 0 0 0 56px; margin: 0; }   /* indented under the year heading; the unfold icon sits in the indent */
.publication { position: relative; padding: 14px 0; border-bottom: 1px solid var(--uia-line); }
.publication p { margin: 0 0 .2em; }
.pub-title { font-weight: 600; }
.pub-authors, .pub-meta { font-size: .9375rem; }
.badge { display: inline-block; margin-left: .6em; padding: 1px 10px; border-radius: 20px; background: var(--uia-red-muted); color: var(--uia-red-dark); font-size: .8125rem; font-weight: 600; }
a.badge { text-decoration: none; }
a.badge:hover, a.badge:focus-visible { background: var(--uia-red); color: #fff; }
.publication:last-child { border-bottom: 0; }   /* the line above the next year's heading is the only one between years */

/* highlights of a paper: a quiet underlined line with a "folds out" icon on the left; the opened part is a beige box */
.pub-highlights { margin-top: .5em; }
.pub-highlights > summary {
  list-style: none; display: flex; align-items: center; gap: 8px; width: fit-content;
  cursor: pointer; padding: 4px 0; font-size: .9375rem; color: #6b5a50; text-decoration: underline; text-underline-offset: 3px;
}
.pub-highlights > summary::-webkit-details-marker { display: none; }
.pub-highlights > summary::before {
  content: ""; position: absolute; left: -56px; top: 14px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--uia-beige-dark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8102E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / 20px no-repeat;
  transition: transform .15s ease;
}
.pub-highlights[open] > summary::before { transform: rotate(90deg); }
.pub-highlights > summary:hover::before { background-color: var(--uia-red); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E"); }   /* on hover: UiA red circle, white arrow */
.pub-highlights > summary:focus-visible::before { outline: 3px solid var(--uia-ink); outline-offset: 2px; }
@media (max-width: 640px) { .publication-list { padding-left: 46px; } .pub-highlights > summary::before { left: -46px; width: 34px; height: 34px; } }
.pub-highlights > summary:hover { color: var(--uia-red); }
.pub-highlights-body { margin-top: .4em; padding: 8px 18px 14px; background: var(--uia-warm-grey); border-radius: 12px; font-size: .9375rem; }
.pub-highlights-body h3 { font-size: 1rem; margin: 1em 0 .3em; }

/* ---------- footer ---------- */
.site-footer { background: var(--uia-red); color: #fff; padding: 32px 20px; }
.footer-inner { max-width: var(--content-width); margin: 0 auto; }
.footer-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.footer-logos img { height: 48px; width: auto; }
.site-footer p { margin: 0 0 .4em; }
.site-footer a { color: #fff; }

/* ---------- second menu bar: like the main menu, only smaller; the current page is underlined ---------- */
.sub-nav { background: #fff; border-top: 1px solid var(--uia-line); border-bottom: 1px solid var(--uia-line); }
.sub-nav ul { max-width: var(--content-width); margin: 0 auto; padding: 0 20px; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.sub-nav a { display: block; padding: 8px 14px; color: var(--uia-ink); text-decoration: none; font-size: .875rem; }
.sub-nav a:hover, .sub-nav a:focus-visible { background: var(--uia-red-muted); }
.sub-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--uia-red); }

/* ---------- breadcrumb (only below a menu item), titles as beige pills ---------- */
:root { --uia-beige-dark: #EBDCC4; }
.breadcrumb { font-size: .875rem; color: var(--uia-red); margin: 0 0 .8em; text-align: left; }
.breadcrumb a { color: var(--uia-red); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb a::after { content: "/"; margin: 0 .5em; }
h2 { display: inline-block; background: var(--uia-beige-dark); color: var(--uia-red); border-top: 0; padding: 12px 21px; border-radius: 30px; font-size: 1.25rem; line-height: 1.2; margin: 1.8em 0 .8em; }   /* size as in the UiA profile-page template */
.team-card h2, .team-card h3, .pi-card h2 { display: block; background: none; color: inherit; padding: 0; border-radius: 0; }
.section-sub { margin: 0 0 1em; }

/* ---------- team page header: title left, the leader on the right ---------- */
.team-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 1.2em; }
.team-header h1 { margin: 0; }
.team-lead { margin: 0; text-align: center; flex: none; }
.team-lead-photo { display: block; width: 140px; height: 140px; object-fit: cover; border-radius: 16px; background: #fff; margin: 0 auto .5em; }
.team-lead figcaption strong, .team-lead figcaption a { display: block; font-size: .9375rem; }
.person-topic { display: block; font-size: .875rem; }
@media (max-width: 560px) { .team-header { flex-direction: column-reverse; align-items: center; } }

/* ---------- method boxes: two side by side, a thick beige frame instead of a filled box ---------- */
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 1em 0 1.5em; }
@media (max-width: 760px) { .method-grid { grid-template-columns: 1fr; } }
.method-card { background: var(--uia-warm-grey); border: 5px solid var(--uia-beige-dark); border-radius: 16px; overflow: hidden; }
.method-card .method-figure { margin: 0; padding: 12px; background: #fff; }
.method-card .method-figure img { display: block; width: 100%; height: auto; max-height: 240px; object-fit: contain; border-radius: 0; margin: 0 auto; }
.method-body { padding: 14px 18px 8px; }
.method-card h3 { margin: 0 0 .4em; font-size: 1.25rem; }
.method-card p { margin: 0 0 .6em; }
.method-refs, .method-contacts { font-size: .875rem; overflow-wrap: anywhere; }

/* ---------- Research page prompt, team page focus statement, compact team list ---------- */
.select-hint { font-size: 1.125rem; margin: 0 0 1em; }
.select-hint strong { color: var(--uia-red); font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }
.team-focus { font-size: 1.125rem; margin: .6em 0 0; max-width: 40em; }
.people-compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.people-compact .person { padding: 6px 10px; gap: 10px; border-radius: 12px; }
.people-compact .person-photo { flex-basis: 40px; width: 40px; height: 40px; border-radius: 10px; font-size: .875rem; }
.people-compact .person-name { font-size: .9375rem; line-height: 1.3; }
.people-compact .person-role, .people-compact .person-topic { font-size: .8125rem; line-height: 1.3; }

/* ---------- how to reach us: small logos next to the headings ---------- */
.heading-icon { height: 1.1em; width: auto; vertical-align: -.15em; margin-right: .4em; }
.parking-icon { display: inline-block; width: 1.3em; height: 1.3em; line-height: 1.3em; text-align: center; margin-right: .4em; background: #1f4fb4; color: #fff; border-radius: 4px; font-weight: 700; font-size: .9em; vertical-align: .05em; }
.address-list { margin: 0 0 1em; }
.address-list dt { font-weight: 600; margin-top: .8em; }
.address-list dd { margin: 0; }

/* ---------- life-cycle bands: small portrait of the leader beside the text ---------- */
.lifecycle-bands li > a { display: flex; align-items: center; gap: 12px; }
.lifecycle-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; background: #fff; }
.lifecycle-bands li > a .band-text { display: block; }
.lifecycle-bands li > a .band-text > span { display: block; font-size: .8125rem; }

/* ---------- home: link with a walking person; education: smaller flyer ---------- */
.reach-link { display: flex; align-items: center; gap: 8px; font-size: 1.0625rem; }
.walk-icon { color: var(--uia-red); flex: none; }
img.flyer-thumb { width: auto; max-height: 310px; }

/* ---------- people cards: position above the name; name in red; focus; team ---------- */
.person-name { color: var(--uia-red); }
.person-name a { color: var(--uia-red); }
.person-teams { margin-top: .2em; }
.sort-note { margin: -.4em 0 1em; font-size: .9375rem; color: #6b5a50; }

.team-lead .lead-note { display: block; font-size: .875rem; max-width: 15em; margin: .1em auto .3em; }
.team-lead-photo + figcaption, .team-lead a > .team-lead-photo { }
.research .team-title h1 { margin-bottom: .5em; }

/* ---------- education: text and flyer 7 : 3, centred video ---------- */
.wp-block-columns.split-7-3 { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); }
@media (max-width: 700px) { .wp-block-columns.split-7-3 { grid-template-columns: 1fr; } }
img.flyer-thumb { max-width: 100%; }
.flyer-link { margin: .3em 0 0; font-size: .9375rem; }
.flyer-link a { text-decoration: underline; text-underline-offset: 3px; }
.video-frame { max-width: 820px; aspect-ratio: 16 / 9; margin: 1em auto 2em; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- projects: row with a small picture, text 7 : 3 sidebar, archive without box ---------- */
details.project > summary { display: flex; align-items: center; gap: 14px; }
.project-thumb { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; flex: none; }
.project-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 28px; }
@media (max-width: 760px) { .project-grid { grid-template-columns: 1fr; } }
.project-text h3 { margin: 1.2em 0 .3em; font-size: 1.0625rem; }
.project-side { font-size: .9375rem; }
.project-side h4 { margin: 1em 0 .2em; font-size: .875rem; color: #6b5a50; font-weight: 600; }   /* sentence case: the UiA design manual avoids capitals */
.project-side h4:first-child { margin-top: 0; }
.project-side p { margin: 0; }
.project-lead img { max-height: 40px; max-width: 100%; width: auto; margin-bottom: .3em; }
.project-partners { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; align-items: center; }
.project-partners li { background: #fff; border-radius: 8px; padding: 6px 8px; display: flex; align-items: center; justify-content: center; min-height: 44px; text-align: center; font-size: .8125rem; }
.project-partners img { max-height: 30px; max-width: 100%; width: auto; display: block; }
.project-side .project-contact { display: flex; gap: 10px; align-items: center; }
.project-side .project-contact img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; }
.project-body p > img.project-figure { display: block; max-height: 260px; width: auto; max-width: 100%; margin: 1em 0; border-radius: 12px; }
details.project-archive { background: none; border-top: 1px solid var(--uia-line); border-radius: 0; margin-top: 1.5em; }
.project-archive > summary { font-weight: 400; padding-left: 0; }
.project-archive .project-body { padding-left: 0; }
/* project titles are real h2 headings (the page outline is h1, h2, h3, h4); here they look like the plain text of the accordion */
.project-head { display: block; background: none; color: inherit; padding: 0; border: 0; border-radius: 0; margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }
.project-archive .project-body h2 { display: block; background: none; color: inherit; padding: 0; border: 0; border-radius: 0; margin: 1em 0 .2em; font-size: 1.0625rem; font-weight: 400; line-height: inherit; }
.project-archive .project-body h2:first-child { margin-top: .4em; }
.project-archive .project-meta { font-size: .875rem; }
.project-body .project-side p > a > img, .project-body .project-side p > img { max-height: 36px; margin: 0 0 .3em; width: auto; max-width: 100%; }
.project-body .project-side .project-contact > a > img { max-height: none; width: 56px; margin: 0; }
/* logos keep their proportions: a fixed height with a narrower box must never squeeze the picture (object-fit) */
.project-body .project-side .project-lead img { height: 36px; max-height: none; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.project-partners { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.project-partners li { padding: 8px 10px; min-height: 52px; }
.project-partners img { width: 100%; height: 32px; max-height: none; object-fit: contain; }

/* ---------- publication highlights: text left, the Battery Coast members among the authors on the right ---------- */
.pub-highlights-body.has-side { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.pub-highlights-text > :first-child { margin-top: .6em; }
.pub-members { list-style: none; margin: .6em 0 0; padding: 0; display: grid; gap: 14px; text-align: center; }
.pub-members li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .875rem; line-height: 1.3; }
.pub-member-photo { width: 84px; height: 84px; object-fit: cover; border-radius: 14px; background: #fff; }
.pub-member-photo.is-placeholder { padding: 14px; object-fit: contain; }
@media (max-width: 640px) {
  .pub-highlights-body.has-side { grid-template-columns: 1fr; }
  .pub-members { grid-auto-flow: column; justify-content: start; }
}

/* figure inside a paper's highlights: shown fully, never cropped or rounded further */
.pub-highlights-text p > img.highlight-figure { display: block; max-width: 100%; max-height: 420px; width: auto; height: auto; margin: 1em 0 .4em; background: #fff; padding: 6px; border-radius: 8px; object-fit: contain; }

/* references of a method: small, label on its own line, one bullet per paper */
.method-refs { font-size: .8125rem; overflow-wrap: anywhere; margin: 0 0 .6em; }
.method-refs p { margin: 0 0 .2em; font-size: inherit; }
.method-refs ul { margin: 0; padding-left: 1.2em; }
.method-refs li { margin: 0 0 .15em; }

/* partner logos: transparent files straight on the page, no boxes; wide logos take a line of their own */
.project-partners { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.project-partners li { background: none; border-radius: 0; padding: 0; min-height: 0; display: block; }
.project-partners img { width: auto; max-width: 100%; height: 30px; object-fit: contain; }
.project-partners a { display: block; }

/* right column of the highlights: authors, then the key figure at the width of the column (a click opens the paper) */
.pub-side { min-width: 0; }
.pub-side .pub-members { margin-top: .6em; }
.pub-figure { margin: 18px 0 0; }
.pub-figure a { display: block; }
.pub-figure img { display: block; width: 100%; height: auto; background: #fff; padding: 4px; border-radius: 8px; }
.pub-figure figcaption { margin-top: 4px; font-size: .75rem; line-height: 1.3; color: #6b5a50; }
@media (max-width: 640px) { .pub-figure { max-width: 320px; } }

/* folded section for the papers from before the Battery Coast (earlier than the first UiA affiliation) */
.pre-bc { margin-top: 2em; }
.pre-bc > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; background: var(--uia-beige-dark); color: var(--uia-red); border-radius: 30px; padding: 12px 21px; font-size: 1.25rem; line-height: 1.2; font-weight: 600; }
.pre-bc > summary::-webkit-details-marker { display: none; }
.pre-bc > summary::after { content: ""; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8102E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .15s ease; }
.pre-bc[open] > summary::after { transform: rotate(90deg); }
.pre-bc > summary:focus-visible { outline: 3px solid var(--uia-ink); outline-offset: 3px; }
.pre-bc-note { margin: 1em 0 0; color: #6b5a50; font-size: .9375rem; }

/* almost square lead logos (seals, for example Uppsala University) would be tiny at the height of wide logos */
.project-body .project-side .project-lead img.lead-logo-compact { height: 104px; }

/* project sidebar: every block has a red label with a thin rule, the content below it in the text colour */
.project-side .side-block { margin: 0 0 1.6em; }
.project-side .side-block:last-child { margin-bottom: 0; }
.project-side h4 { margin: 0 0 .6em; padding-bottom: .3em; border-bottom: 1px solid #D6C3A5; font-size: .875rem; font-weight: 700; color: var(--uia-red); }
.project-side .project-contact { margin: 0; }
.project-side .project-lead { margin: 0; }
.project-body .project-side .project-lead img { margin: 0; }
/* the partner logos sit together in one light box with a thin beige-brown line */
.project-side .project-partners { padding: 14px 16px; border: 1px solid #D6C3A5; border-radius: 12px; background: rgba(255, 255, 255, .45); gap: 16px 22px; }

/* team pages: statement and applications on the left (7/3), the team members in one column on the right */
.team-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 32px; align-items: start; }
.team-main > :first-child, .team-side > :first-child { margin-top: 0; }
.team-main .team-focus { margin: 0 0 .4em; }
.team-side h2 { margin-top: 0; }
.people-single { grid-template-columns: 1fr; }
@media (max-width: 760px) { .team-grid { grid-template-columns: 1fr; } }

/* team pages: the title starts the left column; the right column holds the PI and the members from the top */
.team-grid .team-main > h1 { margin: 0 0 .5em; }
.team-side .team-lead { margin: 0 0 .4em; text-align: left; display: flex; align-items: center; gap: 14px; }
.team-side .team-lead-photo { width: 96px; height: 96px; margin: 0; flex: none; }
.team-side .team-lead figcaption { display: block; }
.team-side h2:not(:first-child) { margin-top: 1.2em; }

/* publications: authors who belong to the Battery Coast team in bold */
.pub-authors strong { font-weight: 700; color: var(--uia-ink); }

/* project tabs: a round "folds out" icon in front of each tab, as at the papers; it turns when the tab is open */
details.project > summary, details.project-archive > summary { list-style: none; display: flex; align-items: center; gap: 14px; }
details.project > summary::-webkit-details-marker, details.project-archive > summary::-webkit-details-marker { display: none; }
details.project > summary::before, details.project-archive > summary::before {
  content: ""; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--uia-beige-dark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8102E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / 18px no-repeat;
  transition: transform .15s ease;
}
details.project[open] > summary::before, details.project-archive[open] > summary::before { transform: rotate(90deg); }
details.project > summary:hover::before, details.project-archive > summary:hover::before { background-color: var(--uia-red); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E"); }
details.project > summary:focus-visible::before, details.project-archive > summary:focus-visible::before { outline: 3px solid var(--uia-ink); outline-offset: 2px; }

/* an open project: the sidebar (contact, lead, time span ...) starts at the height of the title, to the right of it */
details.project[open] { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); grid-template-rows: auto 1fr; column-gap: 28px; }
details.project[open] > summary { grid-column: 1; grid-row: 1; }
details.project[open]::details-content { display: contents; }   /* browsers wrap the folded-out part in this box */
details.project[open] > .accordion-body { display: contents; }
details.project[open] .project-text { grid-column: 1; grid-row: 2; padding: 4px 0 20px 20px; }
details.project[open] .project-side { grid-column: 2; grid-row: 1 / span 2; padding: 14px 20px 20px 0; }
@media (max-width: 760px) {
  details.project[open] { display: block; }
  details.project[open] > .accordion-body { display: block; }
  details.project[open] .project-text, details.project[open] .project-side { padding: 4px 0 0; }
  details.project[open] > .accordion-body { padding: 4px 20px 20px; }
}
