/* Focused page polish for the Research Hub, members and course archive. */

/* The hub is an index. Its heading should orient readers without competing with its cards. */
.gd-research-main.gd-hub-directory .gd-hub-directory-hero {
  display: block;
  min-height: 0 !important;
  padding: clamp(1.8rem, 3.5vw, 2.8rem) 0 clamp(1.35rem, 2.7vw, 2rem) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
  background: #fbfaf8 !important;
  text-align: center;
}

.gd-research-main.gd-hub-directory .gd-hub-directory-hero h1 {
  max-width: 880px;
  margin-inline: auto;
  color: var(--gd-ocean) !important;
  font-size: clamp(1.8rem, 3.2vw, 2.65rem) !important;
  text-shadow: none;
}

.gd-research-main.gd-hub-directory .gd-hub-directory-hero p {
  max-width: 76ch;
  margin-inline: auto;
  color: var(--gd-ink) !important;
}

.gd-research-main.gd-hub-directory .gd-section--paper {
  padding-top: clamp(1.8rem, 3.5vw, 2.8rem) !important;
}

/* Breadcrumbs share the light research-header surface and must remain readable. */
.gd-hub-reading-page .gd-research-breadcrumbs,
.gd-srof-content-page .gd-research-breadcrumbs {
  color: rgba(0, 0, 0, 0.62) !important;
}

.gd-hub-reading-page .gd-research-breadcrumbs a,
.gd-srof-content-page .gd-research-breadcrumbs a {
  color: var(--gd-ocean) !important;
}

/* Vulnerability pages: articulate the existing three concepts as a reading sequence. */
.gd-hub-reading-page--structured .gd-page-shell,
.gd-srof-content-page--applications .gd-page-shell,
.gd-srof-content-page--references .gd-page-shell,
.gd-srof-content-page--cube .gd-page-shell,
.gd-srof-content-page--types .gd-page-shell {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.gd-hub-reading-page--structured .gd-srof-layout,
.gd-srof-content-page--applications .gd-srof-article,
.gd-srof-content-page--references .gd-srof-article {
  max-width: 80ch;
}

.gd-hub-reading-page--structured .gd-srof-article > p,
.gd-srof-content-page--applications .gd-srof-article > p {
  max-width: 80ch;
  font-size: 1.02rem;
  line-height: 1.76;
}

.gd-hub-reading-page--structured .gd-application-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: clamp(1.75rem, 3vw, 2.5rem) 0 !important;
}

.gd-srof-content-page--applications .gd-application-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.8rem);
  margin: clamp(1.75rem, 3vw, 2.5rem) 0 !important;
}

.gd-hub-reading-page--structured .gd-application-list article {
  display: grid;
  grid-template-columns: minmax(12rem, 0.38fr) minmax(0, 1fr);
  column-gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  min-width: 0;
  padding: 1.15rem 0;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.gd-srof-content-page--applications .gd-application-list article {
  min-width: 0;
  padding: 1rem 0 0;
  border-top: 3px solid var(--gd-ocean);
  background: transparent;
}

.gd-hub-reading-page--structured .gd-application-list h3 {
  margin: 0;
  color: var(--gd-ocean);
  font-size: 1.04rem;
  line-height: 1.32;
}

.gd-srof-content-page--applications .gd-application-list h3 {
  margin: 0 0 0.65rem;
  color: var(--gd-ocean);
  font-size: 1.02rem;
  line-height: 1.28;
}

.gd-hub-reading-page--structured .gd-application-list p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.68;
}

.gd-srof-content-page--applications .gd-application-list p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.63;
}

.gd-hub-reading-page--structured .gd-citation {
  margin: clamp(1.75rem, 3vw, 2.5rem) 0 0 !important;
  padding: 1.25rem 0 0 !important;
  border-top: 1px solid rgba(0, 0, 0, 0.18);
  border-left: 0 !important;
  background: transparent !important;
}

.gd-hub-reading-page--structured .gd-citation > p:first-child {
  color: var(--gd-ocean);
}

/* Figures retain their scientific prominence without framing the entire page as a card. */
.gd-srof-content-page--cube .gd-srof-article {
  max-width: 100%;
}

.gd-srof-content-page--cube .gd-lead {
  max-width: 80ch;
  margin-bottom: 1.5rem;
  color: var(--gd-ocean);
  font-size: clamp(1.08rem, 1.7vw, 1.25rem);
  line-height: 1.58;
}

.gd-srof-content-page--cube .gd-manuscript-figure {
  width: min(100%, 1040px);
  margin: 0 0 clamp(1.5rem, 3vw, 2.3rem);
}

.gd-srof-content-page--cube .gd-cube-grid {
  width: min(100%, 1040px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.8vw, 1.25rem);
}

.gd-srof-content-page--cube .gd-cube-grid > div {
  padding: 1rem 0 0;
  border-top: 3px solid var(--gd-ocean);
  background: transparent;
}

.gd-srof-content-page--cube .gd-cube-grid strong,
.gd-srof-content-page--cube .gd-cube-grid span {
  display: block;
}

.gd-srof-content-page--cube .gd-cube-grid span {
  margin-top: 0.45rem;
  line-height: 1.58;
}

/* Leave the 27-type matrix intact; only clarify the notes and its surrounding reading frame. */
.gd-srof-content-page--types .gd-editorial-note {
  max-width: 82ch;
  margin-bottom: clamp(1.4rem, 3vw, 2.1rem);
  padding: 0 0 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.17);
  background: transparent;
}

.gd-srof-content-page--types .gd-editorial-note p {
  max-width: 80ch;
}

/* References become a scannable bibliography rather than a dense, boxed list. */
.gd-srof-content-page--references .gd-reference-list {
  max-width: 88ch;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: reference;
}

.gd-srof-content-page--references .gd-reference-list > li {
  position: relative;
  margin: 0;
  padding: 0.9rem 0 0.9rem 2.7rem;
  border-top: 1px solid rgba(0, 0, 0, 0.14);
  line-height: 1.63;
  counter-increment: reference;
}

.gd-srof-content-page--references .gd-reference-list > li::before {
  position: absolute;
  left: 0;
  top: 0.9rem;
  color: var(--gd-terracotta-dk);
  content: counter(reference, decimal-leading-zero);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* A consistent archive rhythm keeps course covers subordinate to the teaching content. */
.gd-courses-page .gd-subpage-hero {
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
}

.gd-courses-page .gd-project-list {
  width: min(100%, 1020px);
}

.gd-courses-page .gd-project-item {
  gap: clamp(1.25rem, 3vw, 2rem);
  padding-block: clamp(1.75rem, 3.2vw, 2.65rem) !important;
  background: transparent;
}

.gd-courses-page .gd-project-item__img--cover {
  min-height: 0;
  aspect-ratio: 2 / 3;
  padding: 0.55rem;
  box-shadow: none;
}

.gd-courses-page .gd-project-item__img--cover img {
  max-height: none;
  object-fit: contain;
}

.gd-courses-page .gd-project-item .gd-role {
  display: block;
  margin: 0 0 0.65rem;
  margin-bottom: 0.55rem;
  padding: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.72);
  font-size: 0.78rem !important;
}

.gd-courses-page .gd-project-item__body p:not(.gd-role) {
  max-width: 76ch;
  line-height: 1.7;
}

/* A single member group needs one clear transition after the leadership cards. */
.gd-members-page .gd-member-group-label + .gd-member-grid {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.gd-members-page .gd-member-group-label + .gd-member-grid:last-child {
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .gd-hub-reading-page--structured .gd-application-list,
  .gd-srof-content-page--applications .gd-application-list,
  .gd-srof-content-page--cube .gd-cube-grid {
    grid-template-columns: 1fr;
  }

  .gd-hub-reading-page--structured .gd-application-list article {
    grid-template-columns: 1fr;
    row-gap: 0.55rem;
  }
}

@media (max-width: 720px) {
  .gd-banner__main,
  .gd-banner__logo,
  .gd-banner__institution {
    min-width: 0;
  }

  .gd-banner__institution,
  .gd-banner__ub-logo {
    overflow: hidden;
  }

  .gd-banner__ub-logo img {
    width: 100% !important;
    max-width: 100% !important;
    object-fit: contain;
  }

  .gd-hub-directory-hero .gd-container,
  .gd-hub-reading-page .gd-research-hero .gd-container,
  .gd-srof-content-page .gd-srof-hero .gd-container {
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
  }

  .gd-hub-directory-hero h1,
  .gd-hub-directory-hero p,
  .gd-hub-reading-page .gd-research-hero h1,
  .gd-hub-reading-page .gd-research-hero p,
  .gd-srof-content-page .gd-srof-hero h1,
  .gd-srof-content-page .gd-srof-hero p,
  .gd-research-main.gd-hub-directory .gd-hub-card--visual h2 {
    max-width: 100% !important;
    overflow-wrap: anywhere;
  }
}
