/* Typography and palette follow WHML.ORG's corporate site and page hero. */
:root {
  --portal-navy: #081e2d;
  --portal-ink: #123449;
  --portal-muted: #566b78;
  --portal-paper: #f7f8f5;
  --portal-blue: #005b9e;
  --portal-line: #dce4e7;
  --portal-gutter: clamp(16px, 3.35vw, 48px);
  --whml-header-gutter: var(--portal-gutter);
  --whml-header-max-width: 1516px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--portal-paper);
  color: var(--portal-ink);
  font: 400 1.125rem/1.55 "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
}
a { color: var(--portal-blue); text-underline-offset: .18em; }
:is(a, button, summary, input):focus-visible { outline: 3px solid #e59424; outline-offset: 3px; }
.skip {
  position: fixed;
  z-index: 30;
  inset-block-start: .5rem;
  inset-inline-start: .5rem;
  background: #fff;
  padding: .45rem .8rem;
}
.skip:not(:focus) { clip-path: inset(50%); }
whml-visitor-slider:not(:defined) { display: none; }

whml-visitor-header { color: #fff; background: var(--portal-navy); }
whml-visitor-header a { color: inherit; }
whml-visitor-header :is(a, summary) { min-block-size: 44px; }
whml-visitor-header[data-research-header] {
  --whml-header-gutter: initial;
  --whml-header-max-width: initial;
}
whml-visitor-header[data-research-header] [slot="search"][hidden] { display: none !important; }
.portal-action {
  display: inline-flex;
  align-items: center;
  padding-inline: .75rem;
  border: 1px solid #456478;
  border-radius: .2rem;
  text-decoration: none;
}
.portal-account { background: var(--portal-blue); border-color: transparent; }
.portal-action:hover { background: #294d83; }
.portal-navigation { border-block-start: 1px solid #385469; }
.portal-navigation > summary { display: none; }
.portal-navigation nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .125rem 1.4rem; }
.portal-navigation a {
  display: flex;
  align-items: center;
  text-decoration: none;
  border-block-end: 2px solid transparent;
}
.portal-navigation a[aria-current], .portal-navigation a:hover {
  border-block-end-color: #5cbbf7;
  color: #c2e7ff;
}
.portal-language { position: relative; }
.portal-language summary, .portal-navigation summary {
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  cursor: pointer;
  list-style: none;
}
.portal-language summary::-webkit-details-marker,
.portal-navigation summary::-webkit-details-marker { display: none; }
.portal-language summary::after, .portal-navigation summary::after {
  content: "";
  inline-size: .45rem;
  block-size: .45rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  rotate: 45deg;
}
.portal-language[open] summary::after, .portal-navigation[open] summary::after { rotate: 225deg; }
.portal-language summary {
  display: flex;
  padding-inline: .85rem;
  background: #294d83;
  border-block-end: 3px solid #eaa647;
}
.portal-language nav {
  position: absolute;
  z-index: 5;
  inset-block-start: 100%;
  inset-inline-end: 0;
  inline-size: max(100%, 10rem);
  max-block-size: min(55dvh, 31rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: .25rem;
  background: #10293d;
  border: 1px solid #41637c;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 16px 40px #02101e80;
}
.portal-language nav a {
  display: flex;
  align-items: center;
  padding-inline: .6rem;
  text-decoration: none;
}
.portal-language nav a:is(:hover, [aria-current]) { background: #294d83; }
.portal-language nav a:focus-visible { outline-offset: -3px; }

.portal-container { width: min(1420px, 100% - 2 * var(--portal-gutter)); margin-inline: auto; }
.portal-hero {
  padding-block: clamp(2.75rem, 6vw, 5.5rem);
  background: #0d2b40;
  color: white;
  border-block-start: 1px solid #385469;
}
.portal-hero h1 {
  margin: 0;
  max-inline-size: 24ch;
  font-size: clamp(40px, 5.4vw, 82px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.portal-hero p { max-inline-size: 57ch; margin: .85em 0 0; color: #d5e7f1; font-size: clamp(19px, 1.7vw, 23px); }
.portal-hero p a { color: inherit; }
.portal-hero .portal-language-status { font-size: 1rem; }
.portal-button {
  display: inline-flex;
  align-items: center;
  min-block-size: 48px;
  max-inline-size: 100%;
  padding: .55rem 1.1rem;
  border: 1px solid var(--portal-blue);
  background: var(--portal-blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}
.portal-hero .portal-button { margin-block-start: 1.5rem; background: #fff; color: var(--portal-blue); border-color: #fff; }
.portal-button:hover { background: #073e65; }
.portal-hero .portal-button:hover { background: #e1f1ff; }
.portal-body { padding-block: clamp(1.75rem, 4vw, 3.75rem); }
.portal-body h2 { font-size: clamp(28px, 3.4vw, 43px); margin-block: 0 .65rem; line-height: 1.1; }
.portal-body p { margin-block: 0 .75rem; color: var(--portal-muted); }
#search { max-inline-size: 36rem; margin-block-end: 2rem; scroll-margin: 1.5rem; }
#search label { display: block; font-weight: 600; margin-block-end: .35rem; }
#search div { display: flex; gap: .5rem; }
#search input {
  flex: 1 1 auto;
  inline-size: 100%;
  min-inline-size: 0;
  padding-inline: .75rem;
  font: inherit;
  border: 1px solid #8499a7;
  background: white;
  color: var(--portal-ink);
}
.portal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: .75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.portal-cards a {
  display: flex;
  align-items: center;
  min-block-size: 60px;
  block-size: 100%;
  border: 1px solid var(--portal-line);
  padding: .75rem 1rem;
  background: #fff;
  font-weight: 600;
  text-decoration: none;
}
.portal-cards a:hover { text-decoration: underline; background: #edf5fa; }

.research-landing .portal-hero {
  padding-block: clamp(2rem, 4.8vw, 4.5rem);
  background: linear-gradient(120deg, #0b2334, #143951);
}
.research-landing .portal-hero > .portal-container {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
}
.research-landing .portal-hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.75rem); }
.research-landing #search {
  margin: 0;
  padding: clamp(1rem, 2.25vw, 1.75rem);
  border: 1px solid #8ab4cc;
  border-radius: .6rem;
  background: #fff;
  color: var(--portal-ink);
}
.research-landing #search .portal-button {
  margin: 0;
  background: var(--portal-blue);
  border-color: var(--portal-blue);
  color: #fff;
}
.research-landing #search .portal-button:hover { background: #073e65; }
.research-landing .portal-cards a {
  justify-content: space-between;
  gap: .75rem;
  min-block-size: 70px;
  border-radius: .45rem;
  border-inline-start: 3px solid #a7cce2;
}
.research-landing .portal-cards a::after {
  content: "";
  flex: none;
  inline-size: .45rem;
  block-size: .45rem;
  border-block-start: 2px solid;
  border-inline-end: 2px solid;
  transform: rotate(45deg);
}
[dir="rtl"] .research-landing .portal-cards a::after { transform: rotate(-45deg); }
@media (min-width: 850px) {
  .research-all-sections { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .research-all-sections > li { grid-column: span 2; }
  .research-all-sections > li:nth-last-child(-n + 2) { grid-column: span 3; }
}
@media (max-width: 740px) {
  .research-landing .portal-hero > .portal-container { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 740px) {
  whml-visitor-header #CTA2 a { display: inline-flex; white-space: normal; }
  whml-visitor-header[portal="projects"] #CTA2 .desktop-search {
    display: inline-flex;
    min-inline-size: 44px;
    justify-content: center;
  }
  .portal-navigation > summary { display: flex; justify-content: flex-start; }
  .portal-navigation nav { display: grid; justify-content: stretch; gap: 0; }
  .portal-navigation a { border-block-start: 1px solid #385469; }
}
@media (max-width: 640px) {
  .portal-language { position: static; }
  .portal-language nav {
    inset-block-start: auto;
    inset-inline: var(--portal-gutter);
    inline-size: auto;
  }
}
[dir="rtl"] .portal-hero h1 { letter-spacing: normal; }
body:has([data-whml-assistant]) whml-legal-footer[website-layout] { --whml-footer-right-inset: 4rem; }
whml-visitor-header[portal="institutions"] #CTA2 .desktop-search {
  display: inline-flex;
  min-block-size: 44px;
}
@media (max-width: 740px) {
  whml-visitor-header[portal="institutions"] #CTA2 .desktop-search {
    min-inline-size: 44px;
    justify-content: center;
  }
}
.research-assistant-footer {
  --whml-footer-right-inset: max(3.5rem, env(safe-area-inset-right));
}

/* Match the corporate light search panel while the Research Assistant uses its dark palette. */
#site-search {
  --ink: #123449;
  --line: #cedee5;
  --blue: #0078cf;
  background: rgba(240, 247, 251, .93);
  backdrop-filter: blur(14px);
  color-scheme: light;
}
#site-search .search-field { border-color: var(--line); }
#site-search input::placeholder, #site-search .search-result small { color: #4d6575; opacity: 1; }
#site-search .search-result:hover { background: #dcecf6; }
#site-search :focus-visible { outline-color: #a95100; }

@media (max-width: 430px) {
  #site-search { max-width: calc(100% - 44px); }
  whml-visitor-header[portal="research"] #CTA2 .desktop-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
  whml-visitor-header[portal="research"] #CTA2 .desktop-search > span { display: none; }
}

