/* Editorial treatment for the app redesign case study. */

.app-redesign-editorial {
  --article-accent: #e8615e;
  --article-canvas: #f2f2ef;
  --article-ink: #181817;
  --article-measure: 42rem;
  --article-muted: #686864;
  --article-wide: 68rem;
  color: var(--article-ink);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

.app-redesign-editorial .cs-head {
  margin-inline: auto;
  max-width: 60rem;
  padding: clamp(5rem, 12vw, 10rem) 1.25rem clamp(4rem, 8vw, 7rem);
  text-align: center;
}

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

.app-redesign-editorial .dek {
  color: var(--article-muted);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: -0.02em;
  line-height: 1.45;
  margin: 2.25rem auto 0;
  max-width: 40rem;
}

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

.app-redesign-editorial .gate-wall {
  margin-inline: auto;
  max-width: var(--article-measure);
}

.app-redesign-editorial .gist {
  font-size: clamp(1.3rem, 2.3vw, 1.7rem);
  letter-spacing: -0.025em;
  line-height: 1.48;
  margin-inline: auto;
  max-width: var(--article-measure);
  padding: 0 0 clamp(4rem, 9vw, 7rem);
}

.app-redesign-editorial .gist p + p {
  margin-block-start: 1.4rem;
}

.app-redesign-editorial .hero {
  margin-inline: auto;
  max-width: var(--article-wide);
  padding-block-end: clamp(4rem, 8vw, 6rem);
}

.app-redesign-editorial .hero .frame {
  background: var(--article-canvas);
}

.app-redesign-editorial figcaption {
  color: var(--article-muted);
  font-size: 0.77rem;
  line-height: 1.5;
  margin: 0.8rem auto 0;
  max-width: var(--article-measure);
}

.app-redesign-editorial .statbar {
  border-block: 1px solid var(--rule);
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto clamp(3rem, 7vw, 5rem);
  max-width: var(--article-wide);
  padding: 0;
}

.app-redesign-editorial .statbar div {
  align-content: space-between;
  border-inline-end: 1px solid var(--rule);
  min-height: 8rem;
  padding: 1.15rem;
}

.app-redesign-editorial .statbar div:last-child {
  border-inline-end: 0;
}

.app-redesign-editorial .statbar .dim {
  font-size: 0.72rem;
  line-height: 1.35;
}

.app-redesign-editorial .statbar .stat {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 1;
}

.app-redesign-editorial .block {
  border: 0;
  display: block;
  margin-inline: auto;
  max-width: var(--article-measure);
  padding: clamp(4rem, 10vw, 7rem) 0 0;
}

.app-redesign-editorial .block h2 {
  font-size: var(--type-section);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
  margin-block-end: 0.4em;
}

.app-redesign-editorial .tight {
  max-width: none;
}

.app-redesign-editorial .tight p,
.app-redesign-editorial .tight li {
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
  letter-spacing: -0.012em;
  line-height: 1.68;
}

.app-redesign-editorial .tight > * + * {
  margin-block-start: 1.15em;
}

.app-redesign-editorial .tight li + li {
  margin-block-start: 0.5rem;
}

.app-redesign-editorial .role-note {
  background: var(--article-canvas);
  margin-block-start: clamp(5rem, 10vw, 8rem);
  margin-inline: calc(50% - 50vw);
  max-width: none;
  padding: clamp(4rem, 9vw, 7rem)
    max(var(--gutter), calc((100vw - var(--article-measure)) / 2));
  width: 100vw;
}

.app-redesign-editorial .diagram {
  background: var(--article-canvas);
  border: 0;
  margin-block: clamp(4rem, 9vw, 7rem);
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

.app-redesign-editorial .diagram > svg,
.app-redesign-editorial .diagram > div > svg {
  margin-inline: auto;
}

.app-redesign-editorial .diagram > figcaption {
  margin-block-start: 1rem;
}

.app-redesign-editorial .diagram--ladder {
  background: #fff;
}

.app-redesign-editorial .measurement-block {
  background: var(--article-accent);
  color: #2c1211;
  margin-block-start: clamp(5rem, 11vw, 9rem);
  margin-inline: calc(50% - 50vw);
  max-width: none;
  padding: clamp(5rem, 13vw, 10rem)
    max(var(--gutter), calc((100vw - var(--article-measure)) / 2));
  width: 100vw;
}

.app-redesign-editorial .measurement-block h2 {
  font-size: var(--type-feature);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.9;
  margin-block-end: clamp(2rem, 5vw, 4rem);
}

.app-redesign-editorial .measurement-block .tight {
  max-width: var(--article-measure);
}

.app-redesign-editorial .results {
  border-block: 1px solid var(--rule);
  gap: 0;
}

.app-redesign-editorial .results div {
  align-items: baseline;
  border-block-end: 1px solid var(--rule);
  min-height: 4rem;
  padding-block: 1rem;
}

.app-redesign-editorial .results div:last-child {
  border-block-end: 0;
}

.app-redesign-editorial .results .num {
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.app-redesign-editorial .next {
  border-block-start: 1px solid var(--rule);
  margin-block-start: clamp(5rem, 10vw, 8rem);
}

@media (max-width: 45rem) {
  .app-redesign-editorial .cs-head {
    text-align: start;
  }

  .app-redesign-editorial .dek {
    margin-inline: 0;
    text-wrap: pretty;
  }

  .app-redesign-editorial .cs-head .byline {
    justify-content: flex-start;
  }

  .app-redesign-editorial .statbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-redesign-editorial .statbar div:nth-child(2) {
    border-inline-end: 0;
  }

  .app-redesign-editorial .statbar div:nth-child(-n + 2) {
    border-block-end: 1px solid var(--rule);
  }
}

@media (max-width: 28rem) {
  .app-redesign-editorial .statbar {
    grid-template-columns: 1fr;
  }

  .app-redesign-editorial .statbar div {
    border-block-end: 1px solid var(--rule);
    border-inline-end: 0;
  }

  .app-redesign-editorial .statbar div:last-child {
    border-block-end: 0;
  }
}
