@font-face {
  font-family: Lora;
  src: url("lora.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fff;
  --notice: #d6ccc4;
  --ink: #1e1c1b;
  --teal: #1e3f45;
  --rule: #dfd9d4;
  --display: Lora, Georgia, serif;
  --body: "Source Sans 3", system-ui, sans-serif;
  --margin: clamp(1rem, 3.6vw, 4rem);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.58;
}

h1, h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.16;
  text-wrap: balance;
}

h1 { font-size: clamp(2.15rem, 4.7vw, 4.5rem); }
h2 { font-size: clamp(1.55rem, 2.5vw, 2.15rem); }

p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding-inline-start: 1.25em; }
a { color: var(--teal); text-underline-offset: .21em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, input:focus-visible, button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

img { display: block; max-inline-size: 100%; }
[hidden] { display: none !important; }
.photo-unavailable > img { display: none; }

.publication-width {
  width: min(100%, 100rem);
  margin-inline: auto;
  padding-inline: var(--margin);
}

.jump-to-text {
  position: absolute;
  z-index: 2;
  inset: .5rem auto auto .5rem;
  padding: .4rem .75rem;
  background: var(--paper);
  transform: translateY(-150%);
}

.jump-to-text:focus { transform: none; }

.label-notice {
  padding: .34rem 1rem;
  background: var(--notice);
  text-align: center;
  font-size: 1rem;
}

.name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 5.5rem;
}

.utility-link {
  justify-self: start;
  font-size: 1rem;
}

.utility-link:last-child { justify-self: end; }

.publication-name {
  display: grid;
  justify-items: center;
  padding-block: .65rem .75rem;
  text-align: center;
}

.publication-name a {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.875rem;
  line-height: 1.2;
  text-decoration: none;
}

.publication-name p {
  margin-top: .25rem;
  font-size: 1rem;
  white-space: nowrap;
}

.topic-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 clamp(.75rem, 3.3vw, 2.4rem);
  padding-inline: .75rem;
  border-block: 1px solid var(--rule);
  font-size: 1rem;
}

.topic-nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
}

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

.trial-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  background: var(--paper);
}

.trial-hero > img, .trial-hero-copy { grid-area: 1 / 1; }

.trial-hero > img {
  width: 100%;
  height: clamp(31rem, 47vw, 49rem);
  object-fit: cover;
  object-position: center;
}

.trial-hero-copy {
  z-index: 1;
  width: min(41rem, 58%);
  margin-inline: max(var(--margin), calc((100% - 43rem) / 4)) auto;
  padding: clamp(1.5rem, 2.2vw, 2.5rem) clamp(1rem, 1.9vw, 2rem);
  background: var(--paper);
  text-align: center;
}

.trial-hero-copy p {
  max-width: 35rem;
  margin: 1rem auto;
  font-size: clamp(1.125rem, 1.55vw, 1.375rem);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.5rem;
  font-size: 1.0625rem;
}

.forward-link {
  display: inline-flex;
  align-items: baseline;
  gap: .45em;
  font-weight: 500;
}

.forward-link::after { content: "→" / ""; }

.trial-statement {
  padding-block: clamp(1.25rem, 3vw, 2.5rem);
  font-size: clamp(1.25rem, 2.05vw, 1.625rem);
  line-height: 1.4;
}

.trial-statement p { max-width: 66rem; }

.study-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.study-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  background: var(--paper);
}

.study-panel > img, .panel-copy { grid-area: 1 / 1; }

.study-panel > img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.panel-copy {
  z-index: 1;
  width: min(25rem, calc(100% - var(--margin)));
  margin: 0 0 var(--margin) var(--margin);
  padding: 1rem 1.35rem 1.2rem;
  background: var(--paper);
}

.panel-copy p { margin-block: .6rem .55rem; }
.panel-copy h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.study-panel.photo-unavailable { border-top: 1px solid var(--rule); }
.study-panel.photo-unavailable .panel-copy {
  width: min(30rem, 100%);
  margin: 0;
  padding: var(--margin);
}

.effects-line {
  background: var(--teal);
  color: var(--paper);
}

.effects-line > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .4rem 2rem;
  padding-block: 1.1rem;
}

.effects-line p { font-size: 1.2rem; }
.effects-line a { color: var(--paper); }
.effects-line a:focus-visible { outline-color: var(--paper); }

.source-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  align-items: start;
  gap: clamp(1.75rem, 7vw, 7.5rem);
  padding-block: clamp(2.5rem, 6.1vw, 6rem);
}

.source-spread p, .source-spread ul { margin-top: .85rem; }
.source-spread li + li { margin-top: .75rem; }

.page-finder {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2rem, 4vw, 3.75rem);
}

.page-finder form, .page-finder nav { margin-top: 1rem; }
.page-finder label { display: block; margin-bottom: .25rem; }

.finder-input {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  max-width: 32rem;
}

.finder-input input, .finder-input button {
  min-height: 2.75rem;
  min-width: 0;
  padding: .45rem .65rem;
  border: 1px solid currentColor;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.finder-input input { flex: 1 1 10rem; }
.finder-input button { color: var(--teal); cursor: pointer; }
.finder-input button:hover { text-decoration: underline; }

.finder-status:not(:empty) { margin-top: .7rem; }

.page-finder ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem 1.5rem;
  padding: 0;
  list-style: none;
}

.crumb-trail {
  display: flex;
  gap: .55rem;
  align-items: baseline;
  padding-block: 1.15rem;
  font-size: 1rem;
}

.crumb-trail span[aria-hidden] { color: var(--ink); }

.article-title {
  padding-block: clamp(1rem, 4vw, 3.25rem) clamp(1.75rem, 3.5vw, 3rem);
}

.article-title h1 {
  max-width: 58rem;
  font-size: clamp(2.125rem, 3.7vw, 3.625rem);
  text-wrap: pretty;
}

.article-title p {
  max-width: 43rem;
  margin-top: .75rem;
  font-size: clamp(1.125rem, 1.65vw, 1.375rem);
}

.study-topics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: .35rem;
  width: min(100%, 54rem);
  margin-bottom: clamp(2rem, 4.5vw, 4rem);
}

.study-topics img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.study-topics figcaption {
  padding: .38rem .35rem .8rem 0;
  font-size: 1rem;
  line-height: 1.4;
}

.article-copy {
  max-width: 40rem;
  padding-block: .9rem clamp(2.5rem, 7vw, 6rem);
  overflow-wrap: anywhere;
}

.article-copy section + section {
  margin-top: clamp(2rem, 4.5vw, 3.5rem);
}

.article-copy h2 + *, .article-copy p + p,
.article-copy figure + p, .article-copy ul + p {
  margin-top: .8rem;
}

.article-copy li + li { margin-top: .8rem; }

.section-image img { width: 100%; height: auto; }
.section-image.photo-unavailable { display: none; }

.family-history-photo {
  position: relative;
  max-width: 35rem;
  aspect-ratio: 590 / 515;
  overflow: hidden;
}

.family-history-photo img {
  /* The 590 by 515 crop starts at (648, 225), beyond the face-up print. */
  position: absolute;
  top: 0;
  left: 0;
  width: calc(1240 / 590 * 100%);
  max-inline-size: none;
  transform: translate(calc(-648 / 1240 * 100%), calc(-225 / 780 * 100%));
}

.nausea-figure {
  margin: 1.2rem 0;
  border-block: 1px solid var(--rule);
}

.nausea-figure dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.nausea-figure dl div { padding: 1rem; }

.nausea-figure dl div + div { border-left: 1px solid var(--rule); }

.nausea-figure dt { font-weight: 500; }

.nausea-figure dd { margin: .28rem 0 0; }

.nausea-figure figcaption {
  border-top: 1px solid var(--rule);
  padding: 1.1rem 1rem 1.25rem;
  font-size: 1.0625rem;
}

.end-matter { border-top: 1px solid var(--rule); }
.end-matter > div { padding-block: clamp(2rem, 4vw, 4rem); }

.end-matter nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem 1.6rem;
}

.end-matter ul { list-style: none; padding: 0; }
.end-matter li + li { margin-top: .3rem; }
.end-matter p { max-width: 42rem; margin-top: 1.8rem; font-size: 1rem; }

@media (max-width: 47rem) {
  .name-row { display: flex; justify-content: center; min-height: 4.6rem; }
  .name-row .utility-link { display: none; }
  .publication-name a { font-size: 1.7rem; }
  .topic-nav { gap: 0 clamp(.7rem, 3.8vw, 1.4rem); }
  .topic-nav a { font-size: .975rem; }

  .trial-hero { display: flex; flex-direction: column; }
  .trial-hero-copy {
    width: 100%;
    margin-inline: auto;
    padding: 2.2rem var(--margin) 2rem;
  }
  .trial-hero-copy p { max-width: 20rem; text-wrap: balance; }
  .trial-hero > img:not([hidden]) {
    height: clamp(17rem, 104vw, 36rem);
    object-position: 72% center;
  }

  .study-pair, .source-spread { grid-template-columns: minmax(0, 1fr); }
  .study-panel > img { max-height: 38rem; }
  .panel-copy { width: min(22rem, calc(100% - 2 * var(--margin))); }
  .effects-line > div { display: block; }
  .effects-line p { margin-bottom: .25rem; }
  .page-finder ul, .end-matter nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 24rem) {
  .nausea-figure dl { grid-template-columns: minmax(0, 1fr); }
  .nausea-figure dl div + div {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
}
