/* Editorial treatment for the Rheaply research case study. */

.rheaply-editorial {
  --rheaply-accent: #2f765f;
  --rheaply-accent-dark: #1f5141;
  --rheaply-canvas: #fff;
  --rheaply-figure: #f2f2ef;
  --rheaply-ink: #181817;
  --rheaply-line: #deded9;
  --rheaply-muted: #6c6c67;
  --rheaply-reading: 42rem;
  --rheaply-wide: 68rem;
  background: var(--rheaply-canvas);
  color: var(--rheaply-ink);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

.rheaply-editorial a {
  border-bottom: 0;
  text-decoration-color: #a3a39d;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.rheaply-editorial a:hover {
  text-decoration-color: currentcolor;
}

.rheaply-editorial .skip {
  background: var(--rheaply-ink);
  color: #fff;
  left: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 20;
}

.rheaply-editorial .skip:focus {
  left: 1rem;
  top: 1rem;
}

.rheaply-editorial .site-header {
  align-items: center;
  border-bottom: 1px solid var(--rheaply-line);
  display: flex;
  font-size: 0.82rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 90rem;
  padding: 1.15rem clamp(1.25rem, 4vw, 3rem);
}

.rheaply-editorial .site-header a {
  text-decoration: none;
}

.rheaply-editorial .site-header strong {
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

.rheaply-editorial .site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: flex-end;
}

.rheaply-editorial .article-head {
  margin: 0 auto;
  max-width: 66rem;
  padding: clamp(5rem, 12vw, 10rem) 1.25rem clamp(4rem, 9vw, 7rem);
  text-align: center;
}

.rheaply-editorial .article-head h1 {
  font-size: var(--type-display);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.rheaply-editorial .dek {
  color: #4c4c48;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: -0.02em;
  line-height: 1.45;
  margin: 2.25rem auto 0;
  max-width: 42rem;
  text-wrap: balance;
}

.rheaply-editorial .byline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.84rem;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 2rem;
}

.rheaply-editorial .byline-org::before {
  content: "\2022";
  margin-inline-end: 0.65rem;
}

.rheaply-editorial .gate-wall {
  margin: 0 auto;
  max-width: var(--rheaply-reading);
  padding: 0 1.25rem 6rem;
}

.rheaply-editorial .hero-figure,
.rheaply-editorial .story-figure {
  margin: 0 auto;
  max-width: var(--rheaply-wide);
  padding-inline: 1.25rem;
}

.rheaply-editorial .hero-stage,
.rheaply-editorial .figure-stage {
  background: var(--rheaply-figure);
  overflow: hidden;
  padding: clamp(1.5rem, 6vw, 5rem);
  position: relative;
}

.rheaply-editorial .hero-stage {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: clamp(26rem, 64vw, 43rem);
}

.rheaply-editorial .hero-stage::before {
  background:
    linear-gradient(#ffffffb8, #ffffffb8),
    repeating-linear-gradient(
      90deg,
      transparent 0 4.8rem,
      #d7d7d1 4.8rem calc(4.8rem + 1px)
    );
  content: "";
  inset: 0;
  opacity: 0.55;
  position: absolute;
}

.rheaply-editorial .hero-stage img {
  box-shadow: 0 1.5rem 4rem #2424201c;
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 56rem;
  outline: 1px solid oklch(0 0 0 / 0.1);
  position: relative;
  width: 100%;
  z-index: 1;
}

.rheaply-editorial .hero-figure figcaption,
.rheaply-editorial .story-figure figcaption {
  color: var(--rheaply-muted);
  font-size: 0.77rem;
  line-height: 1.45;
  margin: 0.8rem auto 0;
  max-width: var(--rheaply-reading);
}

.rheaply-editorial .article {
  margin: 0 auto;
  max-width: var(--rheaply-reading);
  padding: clamp(5rem, 10vw, 8rem) 1.25rem 8rem;
}

.rheaply-editorial .article > p {
  font-size: clamp(1.08rem, 1.6vw, 1.2rem);
  letter-spacing: -0.012em;
  line-height: 1.66;
  margin: 0 0 1.15em;
}

.rheaply-editorial .article .lead {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.025em;
  line-height: 1.45;
}

.rheaply-editorial .article h2 {
  font-size: var(--type-section);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
  margin: 3em 0 0.4em;
  text-wrap: balance;
}

.rheaply-editorial .facts {
  border-bottom: 1px solid var(--rheaply-line);
  border-top: 1px solid var(--rheaply-line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 4rem 0 5rem;
}

.rheaply-editorial .fact {
  padding: 1.3rem 0;
}

.rheaply-editorial .fact:nth-child(odd) {
  border-right: 1px solid var(--rheaply-line);
  padding-inline-end: 1.3rem;
}

.rheaply-editorial .fact:nth-child(even) {
  padding-inline-start: 1.3rem;
}

.rheaply-editorial .fact:nth-child(-n + 2) {
  border-bottom: 1px solid var(--rheaply-line);
}

.rheaply-editorial .fact strong {
  display: block;
  font-size: 2.2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.06em;
}

.rheaply-editorial .fact span {
  color: var(--rheaply-muted);
  font-size: 0.75rem;
}

.rheaply-editorial .article blockquote {
  border-left: 0.28rem solid var(--rheaply-ink);
  color: inherit;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin: 2.25em 0;
  padding-inline-start: 1.25rem;
}

.rheaply-editorial .article blockquote p {
  font-size: inherit;
  line-height: inherit;
  margin: 0;
}

.rheaply-editorial .article blockquote cite {
  color: var(--rheaply-muted);
  display: block;
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 0;
  margin-top: 1rem;
}

.rheaply-editorial .wide-break {
  margin-block: clamp(3rem, 8vw, 6rem);
  margin-inline: calc((min(var(--rheaply-wide), 100vw - 2.5rem) - 100%) / -2);
}

.rheaply-editorial .figure-title {
  color: var(--rheaply-muted);
  font-size: 0.75rem;
  margin-bottom: 1.5rem;
}

.rheaply-editorial .figure-stage .dg-band {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.rheaply-editorial .model {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rheaply-editorial .model-part {
  min-width: 0;
}

.rheaply-editorial .model-label {
  color: var(--rheaply-muted);
  display: block;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.rheaply-editorial .nest {
  min-height: 15rem;
  position: relative;
}

.rheaply-editorial .nest-card {
  --level: 0;
  background: #fff;
  border: 1px solid var(--rheaply-line);
  inset: calc(var(--level) * 1.7rem);
  padding: 1rem;
  position: absolute;
}

.rheaply-editorial .nest-card span {
  color: var(--rheaply-muted);
  display: block;
  font-size: 0.72rem;
  margin-top: 0.35rem;
}

.rheaply-editorial .nest-card--middle {
  --level: 1;
}

.rheaply-editorial .nest-card--inner {
  --level: 2;
}

.rheaply-editorial .set-card {
  background: #fff;
  border: 1px solid var(--rheaply-line);
  padding: 1.25rem;
}

.rheaply-editorial .set-card > span {
  color: var(--rheaply-muted);
  display: block;
  font-size: 0.72rem;
  margin-top: 0.35rem;
}

.rheaply-editorial .set-items {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.rheaply-editorial .set-item {
  align-items: center;
  border-top: 1px solid var(--rheaply-line);
  display: flex;
  font-size: 0.78rem;
  justify-content: space-between;
  padding-top: 0.5rem;
}

.rheaply-editorial .set-item em {
  color: var(--rheaply-accent-dark);
  font-style: normal;
}

.rheaply-editorial .lesson-interlude {
  background: var(--rheaply-accent);
  color: #fff;
  margin: 7rem calc(50% - 50vw);
  padding: clamp(5rem, 16vw, 11rem) 1.25rem;
  text-align: center;
  width: 100vw;
}

.rheaply-editorial .lesson-interlude p {
  font-size: var(--type-feature);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.92;
  margin: 0 auto;
  max-width: 70rem;
  text-wrap: balance;
}

.rheaply-editorial .lesson-interlude small {
  display: block;
  font-size: 0.78rem;
  margin-top: 2.5rem;
}

.rheaply-editorial .research-list,
.rheaply-editorial .results {
  list-style: none;
  margin: 2.5rem 0;
  padding: 0;
}

.rheaply-editorial .research-list li,
.rheaply-editorial .results li {
  align-items: baseline;
  border-top: 1px solid var(--rheaply-line);
  display: grid;
  gap: 1rem;
  grid-template-columns: 3rem 1fr;
  padding: 1rem 0;
}

.rheaply-editorial .research-list li:last-child,
.rheaply-editorial .results li:last-child {
  border-bottom: 1px solid var(--rheaply-line);
}

.rheaply-editorial .research-list strong,
.rheaply-editorial .results strong {
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.rheaply-editorial .research-list span,
.rheaply-editorial .results span {
  color: var(--rheaply-muted);
  font-size: 0.82rem;
}

.rheaply-editorial .results li {
  grid-template-columns: 1fr auto;
}

.rheaply-editorial .results strong {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.05em;
}

.rheaply-editorial .closing {
  border-top: 1px solid var(--rheaply-line);
  margin-top: 7rem;
  padding-top: 2rem;
}

.rheaply-editorial .closing p {
  color: var(--rheaply-muted);
  font-size: 0.84rem;
}

.rheaply-editorial .next {
  border-top: 1px solid var(--rheaply-line);
  display: flex;
  font-size: 0.82rem;
  gap: 1.5rem;
  justify-content: space-between;
  margin-top: 5rem;
  padding: 1.5rem 0 0;
}

.rheaply-editorial .page-footer {
  align-items: baseline;
  border-top: 1px solid var(--rheaply-line);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8rem;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 90rem;
  padding: 2rem clamp(1.25rem, 4vw, 3rem);
}

.rheaply-editorial .page-footer a {
  text-decoration: none;
}

.rheaply-editorial .page-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

@media (max-width: 45rem) {
  .rheaply-editorial .article-head {
    text-align: left;
  }

  .rheaply-editorial .dek {
    margin-left: 0;
    text-wrap: pretty;
  }

  .rheaply-editorial .byline {
    justify-content: flex-start;
  }

  .rheaply-editorial .hero-stage {
    min-height: 0;
  }

  .rheaply-editorial .model {
    grid-template-columns: 1fr;
  }

  .rheaply-editorial .next {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
