/* Source-led reading layouts for the Research Hub. */
.gd-srof-content-page--types .gd-srof-layout,
.gd-srof-content-page--applications .gd-srof-layout,
.gd-srof-content-page--references .gd-srof-layout {
  width: min(100%, 82ch);
  margin-inline: auto;
}

.gd-srof-content-page--types .gd-srof-layout {
  width: min(100%, 78rem);
}

.gd-types-introduction {
  max-width: 80ch;
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  padding: 0 0 clamp(1rem, 2vw, 1.35rem);
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.gd-types-introduction p {
  max-width: 80ch;
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
}

.gd-types-introduction p + p {
  margin-top: 0.65rem;
}

.gd-srof-content-page--types .gd-orthogonal-map {
  margin-top: 0;
}

.gd-srof-content-page--applications .gd-srof-article > h2,
.gd-hub-reading-page--structured .gd-srof-article > h2 {
  max-width: 80ch;
  margin: clamp(1.7rem, 3vw, 2.35rem) 0 0.8rem;
  color: var(--gd-ocean);
  font-size: clamp(1.12rem, 1.8vw, 1.35rem);
  line-height: 1.28;
}

.gd-srof-content-page--applications .gd-srof-article > h2:first-of-type,
.gd-hub-reading-page--structured .gd-srof-article > h2:first-of-type {
  margin-top: 1.4rem;
}

.gd-srof-content-page--references .gd-srof-article {
  max-width: none;
}

.gd-srof-content-page--references .gd-ref-alpha {
  margin: clamp(1.75rem, 3vw, 2.4rem) 0 0.45rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--gd-terracotta);
  color: var(--gd-ocean);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
}

.gd-srof-content-page--references .gd-ref-alpha:first-child {
  margin-top: 0;
}

.gd-srof-content-page--references .gd-reference-list {
  max-width: none;
}

.gd-srof-content-page--references .gd-reference-list > li {
  padding-left: 0;
}

.gd-srof-content-page--references .gd-reference-list > li::before {
  content: none;
}

@media (max-width: 720px) {
  .gd-srof-content-page--types .gd-srof-layout,
  .gd-srof-content-page--applications .gd-srof-layout,
  .gd-srof-content-page--references .gd-srof-layout {
    width: 100%;
  }

  .gd-types-introduction {
    margin-bottom: 1.35rem;
  }
}

/* Systemic vulnerability model: a restrained reading page, not an SROF card grid. */
.gd-svm-page .gd-page-shell {
  width: min(100%, 100ch);
}

.gd-svm-page__article {
  width: min(100%, 100ch);
  margin-inline: auto;
}

.gd-svm-page__article > p {
  max-width: 100ch;
  margin: 0 0 1rem;
  color: #242424;
  font-size: clamp(1rem, 1.2vw, 1.08rem);
  line-height: 1.78;
  text-align: justify;
  text-justify: inter-word;
}

.gd-svm-page__article > p + p {
  margin-bottom: clamp(1.7rem, 3vw, 2.35rem);
}

.gd-svm-page__definitions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-top: clamp(1.25rem, 2.2vw, 1.8rem);
  border-top: 1px solid rgba(0, 0, 0, 0.18);
}

.gd-svm-page__definition {
  min-width: 0;
  padding-top: 0.85rem;
  border-top: 3px solid #000;
}

.gd-svm-page__definition h2 {
  display: inline-block;
  margin: 0 0 0.8rem;
  color: #000;
  font-size: clamp(1.15rem, 1.7vw, 1.42rem);
  line-height: 1.28;
}

.gd-svm-page__definition p {
  margin: 0;
  color: #303030;
  font-size: 0.98rem;
  line-height: 1.72;
  text-align: left;
}

@media (max-width: 720px) {
  .gd-svm-page__article > p {
    text-align: left;
  }

  .gd-svm-page__definitions {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Shared reading frame: headings follow the homepage treatment while figures
   retain their wider scientific presentation. */
.gd-srof-content-page .gd-srof-layout,
.gd-hub-reading-page--structured .gd-srof-layout {
  width: min(100%, 100ch);
  margin-inline: auto;
}

.gd-srof-content-page--types .gd-srof-layout {
  width: min(100%, 1120px);
}

.gd-srof-content-page--types .gd-types-introduction {
  width: min(100%, 100ch);
  margin-inline: auto;
}

.gd-srof-content-page--types .gd-orthogonal-map,
.gd-srof-content-page--cube .gd-manuscript-figure,
.gd-srof-content-page--cube .gd-cube-grid {
  margin-inline: auto;
}

.gd-srof-content-page--cube .gd-lead,
.gd-srof-content-page--cube .gd-cube-grid,
.gd-hub-reading-page--structured .gd-srof-article {
  width: min(100%, 100ch);
}

.gd-srof-content-page .gd-srof-article > h2,
.gd-srof-content-page .gd-srof-article > h3,
.gd-hub-reading-page--structured .gd-srof-article > h2,
.gd-hub-reading-page--structured .gd-srof-article > h3 {
  display: inline-block;
  position: relative;
  margin: clamp(1.7rem, 3vw, 2.35rem) 0 0.85rem;
  padding-bottom: 0.5rem;
  color: var(--gd-ocean);
}

.gd-srof-content-page .gd-srof-article > h2::after,
.gd-srof-content-page .gd-srof-article > h3::after,
.gd-hub-reading-page--structured .gd-srof-article > h2::after,
.gd-hub-reading-page--structured .gd-srof-article > h3::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 2px;
  background: var(--gd-terracotta);
  content: '';
}

.gd-srof-content-page .gd-srof-article > p,
.gd-hub-reading-page--structured .gd-srof-article > p {
  max-width: 100ch;
  text-align: justify;
  text-justify: inter-word;
}

.gd-srof-hero--detail {
  padding-block: clamp(2.35rem, 5vw, 3.75rem);
}

.gd-srof-hero--detail .gd-container {
  text-align: center;
}

.gd-srof-hero--detail .gd-research-breadcrumbs {
  text-align: left;
}

/* The 27-type dialog is deliberately compact, keyboard accessible and
   visually subordinate to the research map. */
.gd-type-modal[hidden] { display: none; }

.gd-type-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.gd-type-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 18, 32, 0.7);
}

.gd-type-modal__panel {
  position: relative;
  width: min(100%, 46rem);
  max-height: min(44rem, calc(100vh - 2rem));
  overflow: auto;
  border: 1px solid rgba(0, 0, 0, 0.28);
  background: #fff;
  box-shadow: 0 1.25rem 3.25rem rgba(3, 18, 32, 0.3);
}

.gd-type-modal__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: start;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
}

.gd-type-modal__code,
.gd-type-modal__tier {
  margin: 0;
  color: var(--gd-terracotta);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gd-type-modal__header h2 {
  margin: 0.38rem 0 0;
  color: var(--gd-ocean);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.2;
}

.gd-type-modal__tier {
  align-self: center;
  padding: 0.35rem 0.45rem;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.gd-type-modal__close,
.gd-type-modal__footer button {
  min-height: 2.75rem;
  border: 1px solid var(--gd-ocean);
  border-radius: 0;
  background: #fff;
  color: var(--gd-ocean);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.gd-type-modal__close { padding: 0 0.85rem; }
.gd-type-modal__close:hover,
.gd-type-modal__footer button:hover { background: var(--gd-ocean); color: #fff; }

.gd-type-modal__body { padding: clamp(1.25rem, 3vw, 2rem); }
.gd-type-modal__section + .gd-type-modal__section { margin-top: 1.5rem; }
.gd-type-modal__section h3 { margin: 0 0 0.45rem; color: var(--gd-ocean); font-size: 1rem; }
.gd-type-modal__section p { max-width: 76ch; margin: 0; line-height: 1.7; text-align: left; }

.gd-type-modal__footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem clamp(1.25rem, 3vw, 2rem);
  border-top: 1px solid rgba(0, 0, 0, 0.16);
}

.gd-type-modal__footer button { padding: 0 0.9rem; }

.gd-project-item .gd-external-mark {
  display: inline-block;
  margin-left: 0.18em;
  color: var(--gd-terracotta);
  font-size: 0.82em;
  line-height: 1;
  vertical-align: 0.12em;
}

/* GeoPatterns preserves its own journal identity without inheriting the
   centre's page-hero pattern. */
.gd-geopatterns-page {
  padding: clamp(2rem, 5vw, 4rem) 1rem;
  background: #f7f4ef;
}

.gd-geopatterns-wrap {
  width: min(100%, 1120px);
  margin-inline: auto;
}

.gd-geopatterns-masthead {
  border-bottom: 0.45rem solid #d40000;
  background: #fff;
}

.gd-geopatterns-masthead a,
.gd-geopatterns-masthead img { display: block; width: 100%; height: auto; }

.gd-geopatterns-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 1rem 0;
}

.gd-geopatterns-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.55rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(0, 0, 0, 0.22);
  color: var(--gd-ocean);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.gd-geopatterns-nav a:hover,
.gd-geopatterns-nav a:focus-visible,
.gd-geopatterns-nav .is-active { border-color: #d40000; background: #d40000; color: #fff; }
.gd-geopatterns-nav__volumes span,
.gd-geopatterns-record a span { margin-left: 0.25em; }

.gd-geopatterns-article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.28fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: #fff;
}

.gd-geopatterns-article__heading { grid-column: 1 / -1; }
.gd-geopatterns-article__heading p { margin: 0 0 0.35rem; color: #d40000; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.gd-geopatterns-article__heading h2 { margin: 0; color: #d40000; font-size: clamp(1.85rem, 4vw, 3rem); }
.gd-geopatterns-article__copy { max-width: 78ch; }
.gd-geopatterns-article__copy p { margin: 0 0 1rem; line-height: 1.74; text-align: justify; }
.gd-geopatterns-record { display: grid; gap: 0.55rem; padding-top: 0.2rem; border-top: 3px solid #d40000; color: var(--gd-ocean); }
.gd-geopatterns-record span { color: #4a4a4a; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.gd-geopatterns-record strong { font-size: 1.1rem; }
.gd-geopatterns-record a { color: var(--gd-ocean); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

.gd-master-brochure__intro {
  max-width: 76ch;
  margin: 0 auto clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.gd-master-brochure__intro > p:first-child {
  margin: 0 0 0.4rem;
  color: var(--gd-terracotta);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gd-master-brochure__intro h2 {
  display: inline-block;
  position: relative;
  margin: 0 0 0.75rem;
  padding-bottom: 0.45rem;
  color: var(--gd-ocean);
}

.gd-master-brochure__intro h2::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 2px;
  background: var(--gd-terracotta);
  content: '';
}

.gd-master-brochure__intro > p:last-child { margin: 0; line-height: 1.65; }

@media (max-width: 720px) {
  .gd-geopatterns-page { padding-inline: 0.75rem; }
  .gd-geopatterns-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gd-geopatterns-nav a { font-size: 0.7rem; }
  .gd-geopatterns-article { grid-template-columns: 1fr; }
  .gd-geopatterns-article__copy p { text-align: left; }
}

@media (max-width: 640px) {
  .gd-type-modal__header { grid-template-columns: 1fr auto; }
  .gd-type-modal__tier { grid-column: 1; justify-self: start; }
  .gd-type-modal__close { grid-column: 2; grid-row: 1 / span 2; }
}
