:root {
  color-scheme: light;
  font-family: var(--font-sans, system-ui, sans-serif);
  color: #1d1d1f;
  background: #fff;
}

body { margin: 0; }

body:not(.branded-page) > :is(header, footer) {
  padding: 1rem clamp(1.25rem, 5vw, 2rem);
  border-block-end: 1px solid #e5e5e5;
}

body:not(.branded-page) > footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }

.site-content, body:not(.branded-page) > main {
  max-width: 53rem;
  margin-inline: auto;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 4vw, 2rem);
  line-height: 1.7;
}

.site-content :is(h1, h2, h3, h4), body:not(.branded-page) > main :is(h1, h2) {
  font-family: var(--font-display, system-ui, sans-serif);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.site-content h1, body:not(.branded-page) > main h1 {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  margin: 0 0 .85rem;
  text-wrap: balance;
}

.site-content h2, body:not(.branded-page) > main h2 {
  font-size: clamp(1.25rem, 2.25vw, 1.55rem);
  margin-block: 1.75em .55em;
}

.site-content h3 {
  font-size: 1.15rem;
  margin-block: 1.5em .5em;
}

.site-content :is(p, ul, ol, blockquote), body:not(.branded-page) > main p { margin-block: .85rem; }
.site-content ul { padding-inline-start: 1.25rem; list-style: disc; }
.site-content ol { padding-inline-start: 1.25rem; list-style: decimal; }
.site-content li + li { margin-block-start: .45rem; }
.site-content a, body:not(.branded-page) a { color: #a6040d; text-decoration: underline; text-underline-offset: .18em; }
.site-content a:hover { color: #c80a19; }
.site-content a:focus-visible { outline: 2px solid #a6040d; outline-offset: 3px; }

.site-content .page-intro {
  max-width: 62ch;
  margin-block: .5rem 1.5rem;
  font-size: clamp(1rem, 2vw, 1.175rem);
  color: #6e6e73;
}

.journal-index { max-width: 72rem; }
.branded-page:has(.journal-index) { background: #fafafa; }

.site-content .journal-list {
  display: grid;
  gap: 1.5rem;
  padding: 0;
  margin-block: 2rem 0;
  list-style: none;
}

.journal-list .journal-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid #e5e5e5;
  border-radius: 1rem;
  background: #fff;
}

.journal-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #f5f5f7;
}

.journal-card-copy { padding: clamp(1.2rem, 3vw, 2rem); }
.journal-card-copy h2 { margin-block: .5rem; }
.journal-card-copy p:last-child { margin-block-end: 0; color: #6e6e73; }
.journal-card-copy h2 a { color: #1d1d1f; text-decoration: none; }
.journal-card-copy h2 a:hover { color: #a6040d; text-decoration: underline; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .8rem;
  margin-block-end: 1.5rem;
  font-size: .875rem;
  color: #6e6e73;
}

.breadcrumbs > :not(:first-child)::before {
  content: '/';
  display: inline-block;
  margin-inline-end: .75rem;
  color: #c0c0c3;
}

.site-content .article-meta {
  margin-block: .3rem 0;
  font-size: .875rem;
  color: #6e6e73;
}

.article-meta span { color: #a6040d; font-weight: 600; }
.article-meta a { color: inherit; }

.article-cover {
  display: block;
  width: 100%;
  height: auto;
  margin-block: 1.75rem 2rem;
  border-radius: 1rem;
}

.article-text { margin-block-start: 2rem; }
.article-text img { max-width: 100%; height: auto; border-radius: .75rem; }
.article-text a { overflow-wrap: anywhere; }
.article-text blockquote { border-inline-start: 3px solid #c80a19; padding-inline-start: 1rem; color: #6e6e73; }
.article-text code { border-radius: .3rem; background: #f5f5f7; padding: .1em .25em; font-size: .92em; }
.article-text pre { overflow: auto; margin-block: 1rem; padding: 1rem; border-radius: .75rem; background: #f5f5f7; }
.article-text pre code { padding: 0; }

.related-articles {
  margin-block-start: 2.5rem;
  border: 1px solid #e5e5e5;
  border-radius: 1rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: #fafafa;
}

.related-articles h2 { margin-block-start: 0; }
.related-articles p:last-child { margin-block-end: 0; }

@media (min-width: 42rem) {
  .site-content .journal-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journal-card:first-child { grid-column: 1 / -1; }
  .journal-card:first-child.has-cover { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journal-card:first-child img { height: 100%; min-height: 15rem; aspect-ratio: auto; }
  .journal-card:first-child .journal-card-copy { align-self: center; }
}
