:root {
  color-scheme: light;
  --ink: #1a1a1a;
  --paper: #fff;
  --rule: #d8d8d8;
  --heading-face: "Source Sans 3", "Segoe UI", sans-serif;
  --body-face: "Be Vietnam Pro", Arial, sans-serif;
  --edge: clamp(1rem, 2.1vw, 2.5rem);
  --home-mast: 9.4rem;
  --prose-width: 47rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.72 var(--body-face);
  font-synthesis: none;
}

a {
  color: inherit;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

img {
  display: block;
  width: 100%;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--heading-face);
  font-weight: 400;
  text-wrap: balance;
}

.retatrutide-skip {
  position: absolute;
  inset: 0 auto auto var(--edge);
  padding: 0.625rem 1rem;
  background: var(--paper);
  z-index: 5;
  transform: translateY(-130%);
}

.retatrutide-skip:focus {
  transform: translateY(0);
}

.masthead {
  position: relative;
  z-index: 2;
  background: var(--paper);
}

.mast-top {
  display: grid;
  grid-template: auto / minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 0 1rem;
  padding: 1rem var(--edge) 0.85rem;
}

.home-page .mast-top {
  min-height: var(--home-mast);
  padding-top: 0.9rem;
}

.mast-identity {
  grid-column: 2;
  text-align: center;
  align-self: center;
}

.mast-name,
.footer-name {
  display: inline-block;
  font-family: var(--heading-face);
  line-height: 0.96;
  text-decoration: none;
}

.mast-name {
  display: block;
  font-size: 2.45rem;
}

.home-page .mast-name {
  font-size: clamp(3.8rem, 6.25vw, 5.8rem);
}

.mast-line {
  margin-top: 0.48rem;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.9375rem;
  line-height: 1.45;
  white-space: nowrap;
}

.mast-edge {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.mast-edge a,
.menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
}

.menu {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.menu summary {
  gap: 0.58rem;
  list-style: none;
  cursor: pointer;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu-icon {
  width: 1.1rem;
  height: 0.48rem;
  border-block: 1px solid currentColor;
}

.menu-links {
  position: absolute;
  top: 100%;
  left: 0;
  display: grid;
  width: min(18rem, calc(100vw - 2 * var(--edge)));
  max-height: min(70vh, 34rem);
  overflow: auto;
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  z-index: 1;
}

.menu-links a {
  padding-block: 0.45rem;
}

.chapter-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: clamp(1rem, 2vw, 2rem);
  padding: 0.05rem var(--edge) 0.65rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.chapter-band a {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  text-decoration: none;
}

.chapter-band a:hover,
.chapter-band a[aria-current="page"] {
  text-decoration: underline;
}

.home-cover {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: end;
  min-height: max(29rem, calc(100vh - var(--home-mast)));
  min-height: max(29rem, calc(100svh - var(--home-mast)));
  padding: var(--edge);
}

.home-cover > img,
.chapter-picture > img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.home-cover > img {
  object-position: 50% 51%;
}

.cover-caption {
  position: relative;
  width: min(100%, 25.5rem);
  padding: 1.35rem 1.55rem;
  background: rgba(250, 247, 242, 0.9);
}

.cover-caption h1 {
  font-size: clamp(2rem, 3.1vw, 2.65rem);
  line-height: 1.04;
}

.cover-caption a {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.9375rem;
}

.chapter-index {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 5rem);
  width: min(75rem, 100% - 2 * var(--edge));
  margin: clamp(3.25rem, 7.5vw, 7.75rem) auto 0;
  scroll-margin-top: 2rem;
}

.chapter-index h2 {
  font-size: clamp(2.45rem, 4.35vw, 4.25rem);
  line-height: 1.05;
  text-wrap: initial;
}

.chapter-index dl,
.chapter-index dd {
  margin: 0;
}

.chapter-row {
  display: grid;
  grid-template-columns: minmax(9rem, 0.65fr) minmax(0, 1.35fr);
  align-items: baseline;
  gap: 0.25rem 1.35rem;
  padding: 1.08rem 0;
  border-top: 1px solid var(--rule);
}

.chapter-row:last-child {
  border-bottom: 1px solid var(--rule);
}

.chapter-row dt {
  font-weight: 500;
}

.chapter-row dd {
  line-height: 1.55;
}

.chapter-opening {
  min-width: 0;
  min-height: min(30vw, 26rem);
  display: grid;
  align-items: stretch;
  border-bottom: 1px solid var(--rule);
}

.split-opening {
  grid-template-columns: 1fr 1fr;
  min-height: min(50vw, 48rem);
}

.chapter-intro {
  align-self: center;
  padding: clamp(3.1rem, 6vw, 5rem) var(--edge);
}

.chapter-intro h1 {
  max-width: 15ch;
  font-size: clamp(2.75rem, 4.7vw, 5rem);
  line-height: 1.02;
  letter-spacing: 0.008em;
}

.split-opening .chapter-intro h1 {
  max-width: none;
}

.chapter-intro p {
  max-width: 43ch;
  margin-top: 1.35rem;
  font-size: clamp(1rem, 1.3vw, 1.1875rem);
  line-height: 1.6;
}

.chapter-intro > a {
  display: inline-block;
  margin-top: 1rem;
}

.chapter-picture {
  position: relative;
  min-width: 0;
}

.text-opening .chapter-intro {
  width: min(75rem, 100% - 2 * var(--edge));
  margin-inline: auto;
  padding-inline: 0;
}

.chapter-prose {
  width: min(var(--prose-width), 100% - 2 * var(--edge));
  margin: clamp(3rem, 7vw, 6rem) auto;
  overflow-wrap: anywhere;
}

.chapter-prose h2 {
  margin-bottom: 1em;
  font-size: clamp(1.75rem, 2.5vw, 2.3rem);
  line-height: 1.16;
}

.chapter-prose h2,
.chapter-prose p {
  text-wrap: pretty;
}

.chapter-prose p + p {
  margin-top: 1em;
}

.chapter-prose > section + section,
.chapter-prose > p + section {
  margin-top: clamp(2.6rem, 4.3vw, 3.8rem);
}

.home-prose {
  margin-top: clamp(3.75rem, 7vw, 7rem);
}

.clinical-note {
  margin-top: 2.5rem;
  padding: 1.3rem 0 0;
  border-top: 1px solid var(--rule);
}

.site-footer {
  padding: clamp(2.6rem, 5vw, 5rem) var(--edge);
  border-top: 1px solid var(--rule);
}

.footer-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(1.25rem, 4vw, 4rem);
  align-items: start;
}

.footer-name {
  font-size: clamp(3.45rem, 8vw, 8rem);
}

.site-footer p {
  max-width: 39ch;
  margin-top: 1.2rem;
  font-size: 0.9375rem;
}

.footer-links {
  display: grid;
  justify-items: start;
  gap: 0.45rem;
  padding-top: 0.4rem;
  font-size: 0.9375rem;
}

@media (max-width: 50rem) {
  .chapter-index,
  .chapter-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 45rem) {
  :root {
    --home-mast: 9rem;
  }

  .mast-top {
    grid-template: auto auto / 1fr 1fr;
    gap: 0;
    padding-top: 0.4rem;
  }

  .home-page .mast-top {
    padding-top: 0.4rem;
  }

  .mast-identity {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .mast-edge {
    grid-column: 2;
  }

  .home-page .mast-name {
    font-size: clamp(3.15rem, 14vw, 4.5rem);
  }

  .mast-line {
    margin-top: 0.35rem;
  }

  .chapter-band {
    padding-bottom: 0.45rem;
  }

  .cover-caption {
    width: 100%;
    padding: 1.15rem 1.2rem;
  }

  .cover-caption h1 {
    max-width: 21ch;
  }

  .split-opening {
    grid-template-columns: minmax(0, 1fr);
  }

  .chapter-intro {
    padding-block: 2.55rem 2.65rem;
  }

  .chapter-intro p {
    margin-top: 0.9rem;
  }

  .results-lead {
    text-wrap: balance;
  }

  .chapter-picture {
    aspect-ratio: 5 / 4;
  }

  .footer-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-layout > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 36rem) {
  .chapter-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.15rem 0.8rem;
  }
}
