/* ═══════════════════════════════════════════════
   HOMEPAGE — INSTITUTIONAL SYSTEM
   Evidence-led landing page patterns for SimPaths.
═══════════════════════════════════════════════ */

html.sp-page-home .md-main__inner {
  margin-top: 0;
}

html.sp-page-home .md-content .md-content__inner {
  padding-top: 0;
  margin-bottom: 0;
}

html:not(.sp-page-home) .md-content .md-content__inner {
  padding-top: 1.1rem;
}

html.sp-page-home .md-content .md-content__inner::before,
html.sp-page-home .md-main .md-top {
  display: none !important;
}

.simpaths-home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100vw;
  margin: 0 calc(50% - 50vw);
  padding: 2.65rem 1.2rem 2.72rem;
  background: var(--sp-home-hero-bg);
  border-top: none;
  border-bottom: none;
  box-shadow: none;
}

.simpaths-home-hero::before {
  display: none;
}

.simpaths-home-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 43rem;
  margin: 0 auto;
  padding: 0.25rem 0;
  text-align: center;
}

.simpaths-home-hero__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 0.6rem;
}

.simpaths-home-hero__logo {
  display: block;
  width: clamp(5.25rem, 9.1vw, 6.12rem); aspect-ratio: 514 / 256;
  height: auto;
  margin: 0 auto 0.62rem;
  filter: saturate(1.16) brightness(1.08) contrast(1.06) drop-shadow(0 16px 26px rgba(14,22,34,0.24));
}

.md-typeset .simpaths-home-hero h1.simpaths-home-hero__title {
  position: relative;
  margin: 0 !important;
  padding-bottom: 0 !important;
  color: rgba(255,255,255,0.92);
  border-bottom: none !important;
  font-family: var(--sp-hero-title-font) !important;
  font-size: clamp(1.78rem, 3.2vw, 2.24rem) !important;
  font-weight: 610;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-shadow: 0 3px 9px rgba(0,0,0,0.1);
}

.md-typeset .simpaths-home-hero h1.simpaths-home-hero__title::after {
  display: none !important;
  content: none;
}

.md-typeset .simpaths-home-hero p.simpaths-home-hero__strap {
  margin: 0.42rem 0 0 !important;
  padding-bottom: 0 !important;
  color: rgba(255,255,255,0.9);
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.195em;
  text-align: center !important;
  text-shadow:
    0 0 16px rgba(151,190,255,0.22),
    0 1px 10px rgba(0,0,0,0.32);
  text-transform: uppercase;
}

.simpaths-home-intro-band {
  width: 100vw;
  margin: 0 calc(50% - 50vw);
  padding: 4.75rem 1.2rem 3.45rem;
  background: #fffefa;
}

.simpaths-home-intro-band__inner {
  max-width: var(--sp-home-max);
  margin: 0 auto;
}

.md-typeset .simpaths-home-intro-band__lede,
.md-typeset .simpaths-home-intro-band__body {
  margin: 0;
  max-width: 64rem;
  color: #242a31;
  font-size: var(--sp-reading-copy-size);
  font-weight: 520;
  line-height: var(--sp-reading-line-height);
  text-align: left;
  hyphens: none;
  -webkit-hyphens: none;
}

.md-typeset .simpaths-home-intro-band__body {
  margin-top: 1.18rem;
  max-width: 60rem;
}

.md-typeset .simpaths-home-intro-band__lede,
.md-typeset .simpaths-home-intro-band__body:not(.simpaths-home-intro-band__body--bridge) {
  hyphens: none;
}

.md-typeset .simpaths-capability-combination {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.9rem minmax(12rem, 0.28fr);
  gap: 1.15rem;
  align-items: stretch;
  max-width: var(--sp-home-max);
  margin-top: 1.28rem;
}

.md-typeset .simpaths-capability-combination__features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "capability-one capability-two"
    "capability-three capability-four"
    "capability-five capability-five";
  gap: 0.92rem 1.5rem;
}

.md-typeset .simpaths-capability-combination__features article {
  position: relative;
  display: grid;
  grid-template-columns: 1.36rem minmax(0, 1fr);
  gap: 0 0.7rem;
  min-width: 0;
  padding: 0.1rem 0 0;
}

.md-typeset .simpaths-capability-combination__features article:nth-child(1) {
  grid-area: capability-one;
}

.md-typeset .simpaths-capability-combination__features article:nth-child(2) {
  grid-area: capability-two;
}

.md-typeset .simpaths-capability-combination__features article:nth-child(3) {
  grid-area: capability-three;
}

.md-typeset .simpaths-capability-combination__features article:nth-child(4) {
  grid-area: capability-four;
}

.md-typeset .simpaths-capability-combination__features article:nth-child(5) {
  grid-area: capability-five;
}

.md-typeset .simpaths-capability-combination__features article:nth-child(5) p {
  max-width: 36rem;
}

.md-typeset .simpaths-capability-combination__features span {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 1.18rem;
  height: 1.18rem;
  color: rgba(61,93,130,0.9);
  font-size: 0.48rem;
  font-weight: 780;
  line-height: 1;
  background: #fffefa;
  border: 1px solid rgba(61,93,130,0.32);
  border-radius: 999px;
}

.md-typeset .simpaths-capability-combination__features h3 {
  grid-column: 2;
  margin: 0 0 0.34rem !important;
  color: rgba(22,33,49,0.96) !important;
  font-family: var(--md-text-font), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: var(--sp-reading-copy-size);
  font-weight: var(--sp-subheading-weight);
  line-height: 1.18;
  letter-spacing: 0.01em;
}

.md-typeset .simpaths-capability-combination__features p {
  grid-column: 2;
  margin: 0;
  color: #242a31;
  font-size: var(--sp-reading-copy-size);
  line-height: var(--sp-reading-line-height);
  text-align: left;
  hyphens: none;
  -webkit-hyphens: none;
}

.md-typeset .simpaths-capability-combination__brace {
  align-self: stretch;
  position: relative;
  width: 1.65rem;
}

.md-typeset .simpaths-capability-combination__brace::before {
  position: absolute;
  top: 0.48rem;
  right: 0;
  bottom: 0.48rem;
  width: 1.55rem;
  content: "";
  border-top: 1.5px solid rgba(61,93,130,0.3);
  border-right: 1.5px solid rgba(61,93,130,0.3);
  border-bottom: 1.5px solid rgba(61,93,130,0.3);
  border-radius: 0 1.7rem 1.7rem 0;
}

.md-typeset .simpaths-capability-combination__result {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 9rem;
  padding-left: 0.15rem;
  border-left: 0;
}

.md-typeset .simpaths-capability-combination__result span {
  color: rgba(61,93,130,0.86);
  font-size: 0.56rem;
  font-weight: 760;
  line-height: 1.22;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.md-typeset .simpaths-capability-combination__result strong {
  margin-top: 0.42rem;
  color: rgba(22,33,49,0.96);
  font-family: var(--sp-heading-font);
  font-size: clamp(1.38rem, 2.7vw, 1.86rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.simpaths-home-intro-band__access-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem 1.15rem;
  margin-top: 1.35rem;
}

.md-typeset .simpaths-home-intro-band__access {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--sp-accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.md-typeset .simpaths-home-intro-band__access::after {
  content: "\2192";
  transition: transform 0.2s ease;
}

.md-typeset .simpaths-home-intro-band__access:hover {
  color: var(--sp-crimson);
  border-bottom-color: currentColor;
}

.md-typeset .simpaths-home-intro-band__access:hover::after {
  transform: translateX(4px);
}

.simpaths-home-paths {
  width: 100vw;
  margin: 0 calc(50% - 50vw);
  padding: 3.75rem 1.2rem 4.15rem;
  background: #193449;
}
.simpaths-home-paths__inner {
  max-width: var(--sp-home-max);
  margin: 0 auto;
}
.md-typeset .simpaths-home-paths__header {
  margin: 0;
}
.md-typeset .simpaths-home-paths__header h2 {
  margin: 0 !important;
  color: #fff;
  font-family: var(--sp-heading-font) !important;
  font-size: clamp(1.55rem, 3vw, 2.05rem) !important;
  font-weight: var(--sp-section-weight);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.md-typeset .simpaths-home-paths__routes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 2.1rem;
  padding: 0.55rem;
  background: #dedad0;
  border-radius: 0.38rem;
  box-shadow: 0 14px 36px rgba(31,42,56,0.08);
}
.md-typeset .simpaths-home-paths__route {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 9.2rem;
  margin: 0;
  padding: 1.4rem 1.25rem 1.3rem;
  background: #fffefa;
  border-radius: 0.2rem;
}
.md-typeset .simpaths-home-paths__route h3 {
  margin: 0 !important;
  font-family: var(--sp-heading-font) !important;
  font-size: var(--sp-subheading-size);
  font-weight: var(--sp-subheading-weight);
  line-height: 1.3;
  letter-spacing: -0.018em;
}
.md-typeset .simpaths-home-paths__route h3 a {
  color: var(--sp-midnight) !important;
  text-decoration: none;
}

.md-typeset .simpaths-home-paths__route h3 a:hover {
  color: var(--sp-accent) !important;
}

.md-typeset .simpaths-home-paths__links {
  display: grid;
  gap: 0.62rem;
  margin-top: auto;
  padding-top: 1.2rem;
}

.md-typeset .simpaths-home-paths__links a {
  color: #345c78;
  font-size: var(--sp-label-size);
  font-weight: var(--sp-label-weight);
  line-height: 1.4;
  text-decoration: none;
}

.md-typeset .simpaths-home-paths__links a:hover {
  color: var(--sp-crimson);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

@media (max-width: 900px) {
  .md-typeset .simpaths-capability-combination {
    grid-template-columns: 1fr;
    gap: 0.82rem;
  }

  .md-typeset .simpaths-capability-combination__features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md-typeset .simpaths-capability-combination__features article:nth-child(5) {
    max-width: 100%;
  }

  .md-typeset .simpaths-capability-combination__brace {
    display: none;
  }

  .md-typeset .simpaths-capability-combination__result {
    min-height: auto;
    padding: 0.88rem 0 0;
    border-left: 0;
    border-top: 1px solid rgba(61,93,130,0.18);
  }

  .md-typeset .simpaths-home-paths__routes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  .simpaths-home-hero {
    padding: 1.85rem 1rem 2rem;
  }

  .simpaths-home-hero__logo {
    width: 4.2rem;
  }

  .md-typeset .simpaths-home-hero h1.simpaths-home-hero__title {
    font-size: clamp(1.86rem, 6.1vw, 2.2rem) !important;
  }

  .md-typeset .simpaths-home-hero p.simpaths-home-hero__strap {
    font-size: 0.55rem;
    letter-spacing: 0.11em;
  }

  .simpaths-home-intro-band {
    padding: 2.9rem 1rem 2.15rem;
  }

  .md-typeset .simpaths-capability-combination {
    margin-top: 1.08rem;
  }

  .md-typeset .simpaths-capability-combination__features {
    grid-template-columns: 1fr;
    grid-template-areas:
      "capability-one"
      "capability-two"
      "capability-three"
      "capability-four"
      "capability-five";
    gap: 0.82rem;
  }

  .md-typeset .simpaths-capability-combination__features article {
    padding-top: 0;
    padding-left: 0;
  }

  .simpaths-home-paths {
    padding: 3.25rem 1rem 3.55rem;
  }

  .md-typeset .simpaths-home-paths__routes {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    margin-top: 2rem;
    padding: 0.45rem;
  }

  .md-typeset .simpaths-home-paths__route {
    min-height: auto;
    padding: 1.2rem;
  }

  .md-typeset .simpaths-home-paths__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.9rem;
    margin-top: 0;
    padding-top: 1.1rem;
  }

}

/* Homepage research heading; scoped here because no other page uses it. */
.md-typeset .section-heading {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
  color: var(--sp-midnight);
  font-family: var(--sp-heading-font) !important;
  font-size: var(--sp-section-size);
  font-weight: var(--sp-section-weight);
}

.md-typeset .section-heading::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(61,93,130,0.14) 0%, rgba(195,198,213,0.54) 38%, transparent 100%);
}

[data-md-color-scheme="slate"] .md-typeset .section-heading {
  color: #c8d8e8;
}

[data-md-color-scheme="slate"] .md-typeset .section-heading::after {
  background: linear-gradient(90deg, rgba(92,184,240,0.2) 0%, rgba(195,198,213,0.32) 35%, transparent 100%);
}

/* Homepage closing sequence: primary routes and compact research evidence. */
.simpaths-home-intro-band__access-row {
  max-width: 49rem;
  gap: 0.62rem 1.35rem;
}

.simpaths-home-research-band {
  width: 100vw;
  margin: 0 calc(50% - 50vw);
  padding: 5rem 1.2rem 5.25rem;
  background: #f2f0e9;
}
.md-typeset .simpaths-home-research-band .research-section {
  display: grid;
  grid-template-columns: minmax(8.5rem, 11rem) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: stretch;
  max-width: 61rem;
  margin: 0 auto;
}
.md-typeset .simpaths-home-research-band .research-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin: 0;
  padding: 0.15rem 0 0.1rem;
}
.md-typeset .simpaths-home-research-band .research-header .section-heading {
  max-width: 7rem;
  margin-bottom: 0;
  color: #242a31;
  font-size: 1.55rem;
  font-weight: var(--sp-section-weight);
  line-height: 1.08;
}
.md-typeset .simpaths-home-research-band .research-header .section-heading::after {
  display: none !important;
}
.md-typeset .simpaths-home-research-band .archive-link {
  display: inline-flex;
  align-items: center;
  margin: auto 0 0;
  padding: 0;
  color: #242a31 !important;
  font-family: var(--md-text-font), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: var(--sp-label-size);
  font-weight: var(--sp-label-weight);
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none !important;
  background: transparent;
  border: none !important;
  box-shadow: none;
  opacity: 1;
}
.md-typeset .simpaths-home-research-band .archive-link:hover {
  color: var(--sp-crimson) !important;
}
.md-typeset .simpaths-home-research-band .archive-link::after {
  content: none;
}
.md-typeset .simpaths-home-research-band .research-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.05rem;
  margin: 0;
}
.md-typeset .simpaths-home-research-band a.research-entry,
.md-typeset .simpaths-home-research-band a.research-entry:first-child {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 15rem;
  margin: 0;
  padding: 1.35rem 1.3rem 2.7rem;
  background: #fff;
  border: none !important;
  border-radius: 0.16rem;
  box-shadow: 0 12px 30px rgba(17,25,36,0.1);
  cursor: pointer;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}
.md-typeset .simpaths-home-research-band a.research-entry::after {
  position: absolute; right: 0; bottom: 0;
  display: grid; width: 2.05rem; height: 2.05rem;
  color: #fff; font-size: 0.72rem;
  content: "\2197";
  background: var(--research-accent, #b9318a); place-items: center;
  transition: color 0.18s ease, background-color 0.18s ease;
}
.md-typeset .simpaths-home-research-band a.research-entry:hover,
.md-typeset .simpaths-home-research-band a.research-entry:focus-visible {
  background: color-mix(in srgb, var(--research-accent) 6%, #fff); border: none !important;
  box-shadow: 0 15px 34px rgba(17,25,36,0.14); padding-left: 1.3rem;
}
.md-typeset .simpaths-home-research-band a.research-entry:focus-visible {
  outline: 2px solid var(--research-accent, #b9318a); outline-offset: 4px;
}
.md-typeset .simpaths-home-research-band a.research-entry:hover::after,
.md-typeset .simpaths-home-research-band a.research-entry:focus-visible::after {
  color: var(--research-accent, #b9318a); background: #fff;
}
.md-typeset .simpaths-home-research-band .research-entry--mental-health { --research-accent: #c62e67; }
.md-typeset .simpaths-home-research-band .research-entry--life-course { --research-accent: #7040a3; }
.md-typeset .simpaths-home-research-band .research-entry--health-policy { --research-accent: #1f70aa; }
.md-typeset .simpaths-home-research-band .research-entry__meta {
  display: block;
  margin: 0 0 1rem;
}
.md-typeset .simpaths-home-research-band .research-label {
  display: block;
  color: var(--research-accent, #b9318a);
  font-size: var(--sp-meta-size);
  font-weight: var(--sp-label-weight);
  letter-spacing: 0.1em;
}

.md-typeset .simpaths-home-research-band .research-journal {
  display: block;
  margin-top: 0.38rem;
  color: #526171;
  font-size: var(--sp-meta-size);
  line-height: 1.42;
}

.md-typeset .simpaths-home-research-band .research-title,
.md-typeset .simpaths-home-research-band .research-authors {
  display: block;
  max-width: none;
}

.md-typeset .simpaths-home-research-band .research-title {
  margin: 0 !important;
  color: var(--sp-midnight);
  font-family: var(--md-text-font), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 0.9rem;
  font-weight: 480;
  line-height: 1.38;
  text-align: left;
  hyphens: none;
  -webkit-hyphens: none;
  text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 1px; text-underline-offset: 0.18em;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}
.md-typeset .simpaths-home-research-band a.research-entry:hover .research-title,
.md-typeset .simpaths-home-research-band a.research-entry:focus-visible .research-title {
  color: var(--research-accent, #284867);
  text-decoration-color: currentColor;
}

.md-typeset .simpaths-home-research-band .research-authors {
  margin: auto 0 0 !important;
  padding-top: 0.9rem;
  color: #66717d;
  font-size: var(--sp-meta-size);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .simpaths-home-research-band {
    padding: 4rem 1.2rem 4.25rem;
  }

  .md-typeset .simpaths-home-research-band .research-section {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .md-typeset .simpaths-home-research-band .research-header {
    flex-direction: row;
    align-items: baseline;
  }

  .md-typeset .simpaths-home-research-band .research-header .section-heading {
    max-width: none;
    font-size: 1.35rem;
  }

  .md-typeset .simpaths-home-research-band a.research-entry,
  .md-typeset .simpaths-home-research-band a.research-entry:first-child {
    min-height: 14rem;
  }
}

@media (max-width: 800px) {
  .md-typeset .simpaths-home-research-band .research-list {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 34rem;
    margin: 0 auto;
  }

  .md-typeset .simpaths-home-research-band a.research-entry,
  .md-typeset .simpaths-home-research-band a.research-entry:first-child {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .simpaths-home-research-band {
    padding: 3.25rem 1rem 3.5rem;
  }

  .md-typeset .simpaths-home-research-band .archive-link {
    margin-top: 0;
  }

  .md-typeset .simpaths-home-research-band a.research-entry,
  .md-typeset .simpaths-home-research-band a.research-entry:first-child {
    min-height: 0;
    padding: 1.25rem 1.15rem;
  }
}
