/* Homepage: generous, readable research publishing with a daylight opening. */
html:has(.home-page) { scroll-snap-type: none; scroll-padding-top: 100px; }
.home-page { background: #fff; color: #142d42; font-size: 19px; }
.lab-container { width: min(1240px, calc(100% - 96px)); margin-inline: auto; }
.lab-section { padding: 80px 0; }
.lab-section [id], .lab-hero [id] { scroll-margin-top: 108px; }
.lab-eyebrow { margin: 0 0 14px; color: #426982; font-size: 14px; font-weight: 650; letter-spacing: .12em; line-height: 1.5; }
.lab-heading h2, .lab-about h2, .lab-join h2 { margin: 0; color: #142d42; font-size: clamp(34px, 3.4vw, 48px); font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.lab-heading::after { content: ""; display: block; width: 64px; height: 3px; margin-top: 22px; background: #347ea3; }
.lab-section-intro { max-width: 780px; margin: 24px auto 0; color: #4e626f; font-size: 19px; line-height: 1.65; text-wrap: balance; }
.lab-section-top { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 38px; }
.lab-text-link, .lab-card-link { display: inline-flex; align-items: center; gap: 24px; color: #175878; font-size: 18px; font-weight: 600; line-height: 1.5; }
.lab-text-link { padding-block: 10px; border-bottom: 1px solid #8caab9; flex-shrink: 0; }
.lab-text-link:hover { color: #071f30; border-color: currentColor; }
.lab-text-link > :last-child, .lab-card-link > :last-child { font-size: 22px; }
.lab-button { display: inline-flex; min-height: 56px; padding: 15px 26px; align-items: center; justify-content: center; gap: 32px; font-size: 17px; font-weight: 600; border: 1px solid transparent; transition: background .2s, color .2s; }
.lab-button-light { color: #17354a; background: #fff; }
.lab-button-light:hover { background: #dbeaf1; }
.home-page a:focus-visible { outline: 3px solid #428eb7; outline-offset: 5px; }
.lab-themes { text-align: center; }
.lab-themes .lab-heading::after { margin-inline: auto; }
.lab-theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 32px; column-gap: 34px; row-gap: 8px; }
.lab-theme { position: relative; display: flex; flex-direction: column; align-items: center; padding: 26px 18px 30px; border-bottom: 1px solid #dbe4e9; transition: background .2s; }
.lab-theme img { width: 88px; height: 88px; margin-bottom: 20px; transition: transform .2s; }
.lab-theme h3 { margin: 0 0 12px; font-size: 23px; font-weight: 600; line-height: 1.35; }
html[lang="en"] .lab-theme h3 { min-height: 2.7em; display: flex; align-items: center; }
.lab-theme p { margin: 0; color: #566e7d; font-size: 17px; line-height: 1.6; }
.lab-theme-arrow { position: absolute; right: 13px; top: 24px; color: #587c92; font-size: 21px; }
.lab-theme:hover { background: #f1f6f9; }
.lab-theme:hover img { transform: translateY(-3px); }
.lab-about { background: #f1f5f7; }
.lab-about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.lab-about-figure { position: relative; aspect-ratio: 1.12; overflow: hidden; background: #dbe6ec; }
.lab-about-figure img { width: 100%; height: 100%; object-fit: cover; object-position: 59% center; }
.lab-about-figure figcaption { position: absolute; bottom: 0; left: 0; width: 100%; padding: 24px 18px 14px; color: white; background: linear-gradient(transparent, #071824d9); font-size: 12px; line-height: 1.5; }
.lab-about-copy h2 { white-space: pre-line; margin-bottom: 24px; font-size: clamp(32px, 3vw, 44px); }
.lab-about-copy > p:not(.lab-eyebrow) { font-size: 19px; line-height: 1.75; color: #4d6472; margin-bottom: 18px; }
.lab-about-copy .lab-text-link { margin-top: 6px; }
.lab-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 36px; margin-top: 40px; border-top: 1px solid #cdd9df; }
.lab-metric { display: flex; flex-direction: column; align-items: center; text-align: center; padding-inline: 16px; border-right: 1px solid #cdd9df; gap: 12px; }
.lab-metric:last-child { border: 0; }
.lab-metric strong { font-size: 52px; font-weight: 500; line-height: 1.1; letter-spacing: -.04em; }
.lab-metric span { color: #4d6472; font-size: 16px; line-height: 1.5; }
.lab-metrics-note { margin: 24px 0 0; text-align: right; color: #5b707e; font-size: 13px; }
.lab-news-grid, .lab-publication-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.lab-news-card > a, .lab-paper > a { display: flex; height: 100%; flex-direction: column; }
.lab-news-image { aspect-ratio: 1.65; overflow: hidden; background: #dbe6ec; }
.lab-news-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.lab-news-card:hover img { transform: scale(1.035); }
.lab-news-body { display: flex; flex-direction: column; flex: 1; padding: 24px 0 0; border-bottom: 1px solid #d4dfe5; }
.lab-news time { margin-bottom: 14px; font-size: 14px; font-weight: 600; letter-spacing: .06em; color: #4c6f86; }
.lab-news h3 { margin: 0 0 18px; font-size: 25px; line-height: 1.3; font-weight: 600; }
.lab-news-body > p { margin: 0 0 24px; font-size: 18px; line-height: 1.7; color: #506877; }
.lab-news .lab-card-link { margin-top: auto; padding-bottom: 24px; }
.lab-media-note { margin: 22px 0 0; color: #607481; font-size: 13px; line-height: 1.5; }
.lab-locations { background: #edf3f6; }
.lab-locations-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.lab-location { display: flex; flex-direction: column; border-top: 1px solid #9eb5c4; padding-top: 25px; }
.lab-location-code { margin: 0 0 13px; color: #416780; font-size: 13px; letter-spacing: .12em; font-weight: 600; }
.lab-location h3 { margin: 0 0 24px; font-size: 38px; font-weight: 500; }
.lab-location h4 { margin: 0 0 18px; font-size: 20px; font-weight: 600; line-height: 1.45; }
html[lang="en"] .lab-location h4 { min-height: 4.35em; }
.lab-location-description { font-size: 18px; line-height: 1.7; color: #526b7c; margin-bottom: 24px; }
.lab-location-lead { font-size: 15px; line-height: 1.6; color: #294f67; margin: auto 0 0; padding-top: 18px; border-top: 1px solid #d1dee6; }
.lab-publications { background: #fff; }
.lab-paper { background: #f1f5f7; }
.lab-paper-image { aspect-ratio: 1.6; overflow: hidden; border-bottom: 1px solid #dce5ea; }
.lab-paper-image img { width: 100%; height: 100%; object-fit: cover; }
.lab-paper-body { display: grid; align-content: start; gap: 20px; min-width: 0; padding: 24px; flex: 1; }
.lab-paper-venue { font-size: 14px; line-height: 1.5; color: #40677e; margin: 0; }
.lab-paper h3 { color: #19384c; font-size: 24px; line-height: 1.35; font-weight: 550; margin: 0; text-wrap: initial; }
.lab-paper-summary { margin: 0; font-size: 17px; line-height: 1.65; color: #526c7a; }
.lab-paper .lab-card-link { margin: 0; align-self: start; justify-self: start; }
.lab-paper:hover h3, .lab-news-card:hover h3 { color: #246f99; }
.lab-join { padding: 58px 0; color: #fff; background: #173e57; }
.lab-join-inner { display: flex; justify-content: space-between; align-items: center; gap: 50px; }
.lab-join .lab-eyebrow { color: #b9dceb; }
.lab-join h2 { color: #fff; font-size: clamp(30px, 2.8vw, 40px); }
.lab-join p:not(.lab-eyebrow) { margin: 18px 0 0; font-size: 18px; line-height: 1.6; color: #d1e0e8; }
.lab-join .lab-button { flex-shrink: 0; }
@media (max-width: 1120px) {
  .lab-container { width: calc(100% - 64px); }
  .lab-section { padding-block: 64px; }
  .lab-about-grid { gap: 36px; }
  .lab-theme-grid { column-gap: 22px; }
  .lab-theme h3 { font-size: 21px; }
  .lab-locations-grid { gap: 26px; }
  .lab-news-grid, .lab-publication-grid { gap: 24px; }
  .lab-news h3, .lab-paper h3 { font-size: 22px; }
}
@media (max-width: 1000px) {
  .lab-theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lab-about-grid { grid-template-columns: 1fr; gap: 34px; }
  .lab-about-figure { aspect-ratio: 1.8; }
  .lab-about-copy { max-width: 760px; }
  .lab-news-grid, .lab-publication-grid { grid-template-columns: 1fr; gap: 32px; }
  .lab-news-card > a, .lab-paper > a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; }
  .lab-news-body { padding-top: 0; }
  .lab-paper > a { gap: 0; }
  .lab-paper-image { height: 100%; aspect-ratio: auto; border-bottom: 0; }
  .lab-locations-grid { grid-template-columns: 1fr; gap: 30px; }
  .lab-location { display: grid; grid-template-columns: 180px 1fr; gap: 0 30px; }
  .lab-location-code { grid-column: 1; }
  .lab-location h3 { grid-column: 1; grid-row: 2 / 5; }
  .lab-location h4 { grid-column: 2; grid-row: 1 / 3; }
  html[lang="en"] .lab-location h4 { min-height: 0; }
  .lab-location-description, .lab-location-lead { grid-column: 2; }
}
@media (max-width: 760px) {
  .lab-container { width: calc(100% - 40px); }
  .lab-section { padding-block: 52px; }
  .lab-heading h2, .lab-about h2 { font-size: 34px; }
  .lab-eyebrow { font-size: 13px; letter-spacing: .09em; }
  .lab-section-intro { font-size: 17px; }
  .lab-section-top { flex-wrap: wrap; align-items: start; gap: 16px; margin-bottom: 30px; }
  .lab-section-top > .lab-text-link { font-size: 16px; }
  .lab-theme { padding-inline: 14px; }
  .lab-theme h3 { font-size: 21px; }
  .lab-theme p { font-size: 16px; }
  .lab-about-copy > p:not(.lab-eyebrow) { font-size: 17px; }
  .lab-metrics { grid-template-columns: 1fr 1fr; row-gap: 28px; margin-top: 30px; padding-top: 30px; }
  .lab-metric:nth-child(2) { border-right: 0; }
  .lab-metric strong { font-size: 44px; }
  .lab-metric span { font-size: 15px; }
  .lab-metrics-note { text-align: left; }
  .lab-news h3, .lab-paper h3 { font-size: 23px; }
  .lab-news-body > p, .lab-location-description, .lab-join p:not(.lab-eyebrow) { font-size: 17px; }
  .lab-join { padding: 46px 0; }
  .lab-join-inner { flex-direction: column; align-items: start; gap: 28px; }
}
@media (max-width: 600px) {
  .lab-theme-grid { grid-template-columns: 1fr; gap: 0; margin-top: 28px; }
  .lab-theme { display: grid; grid-template-columns: 68px 1fr 18px; gap: 6px 18px; padding: 24px 0; text-align: left; }
  .lab-theme img { grid-column: 1; grid-row: 1 / 3; width: 68px; height: 68px; margin: 0; }
  .lab-theme h3 { grid-column: 2; grid-row: 1; margin: 0; text-wrap: initial; }
  html[lang="en"] .lab-theme h3 { min-height: 0; }
  .lab-theme p { grid-column: 2; grid-row: 2; }
  .lab-theme-arrow { position: static; grid-column: 3; grid-row: 1; align-self: start; }
  .lab-about-figure { aspect-ratio: 1.3; }
  .lab-news-card > a, .lab-paper > a { display: flex; flex-direction: column; gap: 0; }
  .lab-news-body { padding-top: 22px; }
  .lab-paper-image { height: auto; aspect-ratio: 1.6; }
  .lab-location { display: flex; gap: 0; }
  .lab-location h3 { margin-bottom: 20px; }
  .lab-location-lead { margin-top: 0; }
}
@media (max-width: 380px) {
  .lab-container { width: calc(100% - 32px); }
  .lab-theme { grid-template-columns: 56px 1fr 16px; column-gap: 14px; }
  .lab-theme img { width: 56px; height: 56px; }
  .lab-theme h3 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .lab-theme, .lab-theme img, .lab-news-image img, .lab-button { transition: none; }
}

/* Bright opening: photography and copy each retain their own space. */
.lab-hero { padding-top: calc(var(--institution-header-height, 100px) + 54px); background: #f1f5f7; }
.lab-hero-grid { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(32px, 4vw, 64px); }
.lab-hero-content { padding: 22px 0 36px; min-width: 0; }
.lab-hero-institution { margin: 0 0 26px; color: #426982; font-size: 15px; font-weight: 650; letter-spacing: .1em; line-height: 1.6; }
.lab-hero h1 { max-width: 560px; margin: 0 0 28px; color: #123247; font-size: clamp(56px, 5.35vw, 78px); line-height: 1.08; font-weight: 600; letter-spacing: -.035em; text-wrap: balance; }
.lab-hero-tagline { max-width: 450px; margin: 0 0 32px; color: #425e70; font-size: 24px; line-height: 1.55; text-wrap: balance; }
.lab-hero .lab-button { color: #fff; background: #175878; font-size: 18px; }
.lab-hero .lab-button:hover { background: #103e57; }
.lab-hero-secondary { display: block; width: fit-content; margin-top: 22px; color: #315d76; font-size: 18px; line-height: 1.6; }
.lab-hero-secondary:hover { text-decoration: underline; text-underline-offset: 5px; }
.lab-hero-figure { margin: 0; min-width: 0; }
.lab-hero-image { display: block; width: 100%; height: auto; aspect-ratio: 1.2; object-fit: cover; object-position: 42% center; }
.lab-hero-figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding-top: 13px; color: #506a7c; font-size: 13px; line-height: 1.5; }
.lab-hero-figure figcaption a { color: #285e7b; text-decoration: underline; text-underline-offset: 3px; }
.lab-hero-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; margin-top: 38px; padding-block: 24px; border-top: 1px solid #ccdbe4; color: #3f6075; font-size: 16px; line-height: 1.6; }
.lab-project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.lab-project-card { min-width: 0; border-bottom: 1px solid #bfd0dc; }
.lab-project-card > a { display: flex; flex-direction: column; height: 100%; }
.lab-project-image { overflow: hidden; aspect-ratio: 8 / 5; background: #eef3f5; }
.lab-project-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.lab-project-card:hover .lab-project-image img { transform: scale(1.025); }
.lab-project-body { display: flex; flex-direction: column; flex: 1; padding: 28px 0; }
.lab-project-category { margin: 0 0 16px; color: #426982; font-size: 13px; line-height: 1.6; letter-spacing: .07em; font-weight: 650; }
.lab-project-card h3 { min-height: 2.5em; margin: 0 0 18px; color: #142d42; font-size: clamp(25px, 2.3vw, 30px); line-height: 1.25; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.lab-project-summary { margin: 0 0 26px; color: #506877; font-size: 19px; line-height: 1.65; }
.lab-project-body .lab-card-link { margin-top: auto; }
.lab-project-card:hover h3 { color: #246f99; }
@media (max-width: 1120px) {
  .lab-hero { padding-top: calc(var(--institution-header-height, 100px) + 36px); }
  .lab-hero-grid { gap: 32px; grid-template-columns: 1fr 1fr; }
  .lab-hero h1 { font-size: 58px; }
  .lab-hero-tagline { font-size: 22px; }
  .lab-project-grid { gap: 24px; }
}
@media (max-width: 900px) {
  .lab-hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .lab-hero-content { padding: 12px 0 0; }
  .lab-hero h1 { max-width: 680px; font-size: 64px; }
  .lab-hero-tagline { max-width: 620px; }
  .lab-hero-image { aspect-ratio: 1.85; object-position: center; }
  .lab-hero-bottom { margin-top: 28px; }
  .lab-project-grid { grid-template-columns: 1fr; gap: 32px; }
  .lab-project-card > a { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: start; }
  .lab-project-body { padding: 0 0 28px; height: 100%; }
  .lab-project-card h3 { min-height: 0; font-size: 29px; }
}
@media (max-width: 600px) {
  .lab-hero { padding-top: calc(var(--institution-header-height, 76px) + 28px); }
  .lab-hero-grid { gap: 30px; }
  .lab-hero h1 { font-size: clamp(42px, 11vw, 60px); margin-bottom: 22px; }
  .lab-hero-institution { font-size: 13px; letter-spacing: .06em; margin-bottom: 20px; }
  .lab-hero-tagline { font-size: 21px; margin-bottom: 26px; }
  .lab-hero-secondary { font-size: 17px; margin-top: 18px; }
  .lab-hero-image { aspect-ratio: 1.5; }
  .lab-hero-figure figcaption { font-size: 12px; }
  .lab-hero-bottom { font-size: 14px; padding-block: 20px; }
  .lab-project-card > a { display: flex; gap: 0; }
  .lab-project-body { padding-top: 24px; }
  .lab-project-card h3 { font-size: 28px; }
  .lab-project-summary { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .lab-project-image img { transition: none; }
}

/* Share content rows across the three cards; translated text can grow freely. */
.lab-publication-grid { gap: 32px; }
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1001px) {
    .lab-publication-grid { row-gap: 0; }
    .lab-paper, .lab-paper > a {
      display: grid;
      grid-template-rows: subgrid;
      grid-row: span 5;
      row-gap: 0;
      min-width: 0;
      height: auto;
    }
    .lab-paper-body { grid-template-rows: subgrid; grid-row: span 4; row-gap: 20px; }
  }
}
