/* Inner pages: one title scale, a readable rhythm and line length, visible links, and a quiet ground behind text. */

/* Page titles share the homepage's regular weight. */
body.inner:not(.watch-page):not(.studio-page) main .wrap > h1,
body.inner.blog-page main .blog-intro > h1,
body.inner.landing-series main .series-entry-title,
body.inner.blog-article-page .blog-article-head h1 {
  font-size: clamp(32px, calc(14px + 2.4vw), 48px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.025em;
}

/* Long-form reading: About, FAQ, Terms, Privacy, Refund. */
body.inner.reading-page:not(.blog-page):not(.landing-series) main .wrap :is(p, li):not(.meta):not(.kicker) {
  font-size: clamp(16px, calc(10px + .5vw), 17px);
  line-height: 1.7;
}
body.inner.reading-page:not(.blog-page):not(.landing-series) main .wrap > :is(p, ul, ol):not(.meta):not(.kicker) {
  max-width: 37em;
  margin-block: 0 1.1em;
}
body.inner.reading-page:not(.blog-page):not(.landing-series) main .wrap > :is(ul, ol) {
  padding-left: 1.3em;
}
body.inner.reading-page:not(.blog-page):not(.landing-series) main .wrap > :is(ul, ol) > li + li {
  margin-top: .45em;
}
body.inner.reading-page:not(.blog-page):not(.landing-series) main .wrap > h2 {
  margin: clamp(48px, 4vw, 64px) 0 14px;
  font-size: clamp(24px, calc(13px + 1.2vw), 30px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -.015em;
}
body.inner.reading-page:not(.blog-page):not(.landing-series) main .wrap > h3 {
  margin: 32px 0 10px;
  color: #eef4f7;
  font-size: clamp(18px, calc(15px + .3vw), 20px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}
body.inner.reading-page:not(.blog-page):not(.landing-series) main .wrap > h2 + h3 {
  margin-top: 18px;
}

/* Links inside sentences look like links. Series landing lists keep their own link style. */
body.inner.reading-page:not(.landing-series) main :is(p, li, dd) a:not(.btn):not(.button):not(.text-link) {
  color: #e6f0f5;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(179, 217, 235, .55);
  text-underline-offset: .22em;
}
body.inner.reading-page:not(.landing-series) main :is(p, li, dd) a:not(.btn):not(.button):not(.text-link):hover {
  color: #fff;
  text-decoration-color: #b3d9eb;
}

/* FAQ answers share the reading rhythm and breathe before the next question. */
body.inner.faq-page main .faq details > p {
  max-width: 37em;
  margin: 6px 0 0;
  color: #c8d7df;
}
body.inner.faq-page main .faq details > p + p {
  margin-top: 1.1em;
}
body.inner.faq-page main .faq details[open] {
  padding-bottom: 22px;
}

/* "On this page" becomes a scannable list with comfortable targets. */
body.inner.reading-page main .page-contents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  margin: 32px 0 8px;
  padding: 18px 0 20px;
  font-size: 15px;
  line-height: 1.45;
}
body.inner.reading-page main .page-contents strong {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  color: #9fb4c1;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
}
body.inner.reading-page main .page-contents a {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: #c8d7df;
  text-decoration: none;
}
body.inner.reading-page main .page-contents a:hover {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #b3d9eb;
  text-underline-offset: .22em;
}
@media (max-width: 639px) {
  body.inner.reading-page main .page-contents {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* About's contact rows follow the reading column. */
body.inner.about-page main .contact-links {
  max-width: none;
}

/* Wide pages keep introductions to a comfortable line. */
body.inner main .wrap.wrap--wide > p.sub,
body.inner.landing-series main .landing .series-entry-title + .landing-capsule,
body.inner.landing-series main .landing > .landing-capsule {
  max-width: 40em;
}

/* Articles: one centered reading column; images and tables may extend beyond it. */
@media (min-width: 800px) {
  body.inner.blog-article-page main .wrap.blog-index {
    width: min(680px, calc(100% - 48px));
  }
  body.inner.blog-article-page .blog-body {
    font-size: 18px;
    line-height: 1.7;
  }
  body.inner.blog-article-page .blog-body > figure {
    margin-inline: min(0px, calc((min(680px, 100vw - 48px) - min(880px, 100vw - 48px)) / 2));
  }
}
body.inner.blog-article-page .blog-body {
  line-height: 1.7;
}

/* A quiet ground behind the text column; the galaxy stays visible beside it. */
@media (min-width: 800px) {
  body.inner.reading-page main {
    --reading-ground: 960px;
  }
  body.inner.blog-article-page main {
    --reading-ground: 940px;
  }
  body.inner.blog-page:not(.blog-article-page) main,
  body.inner.landing-series main {
    --reading-ground: 1360px;
  }
  body.inner.reading-page main::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: min(100%, var(--reading-ground));
    transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(5, 7, 11, 0), rgba(5, 7, 11, .64) 120px, rgba(5, 7, 11, .64) calc(100% - 120px), rgba(5, 7, 11, 0));
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 140px, #000 calc(100% - 140px), transparent);
    mask-image: linear-gradient(180deg, transparent, #000 140px, #000 calc(100% - 140px), transparent);
    pointer-events: none;
  }
}
