/* Responsive long-form layout for non-film detail pages only.
   This file is linked only by article/detail templates. */

body > main.reader,
body > main:not([class]) {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 78rem !important;
  margin-inline: auto;
  padding:clamp(1.5rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(4rem, 8vw, 7rem)!important;
}

body > main.reader > :where(.back-link, .eyebrow, h1, .lead, .reader-credit, .source-links, .archive-functions, .reader-body, article, section, details, p),
body > main:not([class]) > :where(.back, article) {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 44rem !important;
  margin-inline: auto;
}

body > main.reader > .back-link,
body > main:not([class]) > .back {
  margin-top: 0;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

body > main.reader > h1,
body > main:not([class]) > article > h1 {
  max-width: 44rem;
  margin-top: 0;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  font-size: clamp(2rem, 5vw, 3.75rem);
  line-height: 1.1;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  text-wrap: pretty;
}

body > main.reader > :where(.eyebrow, .reader-credit, .source-links, .archive-functions) {
  margin-top: 0;
}

body > main.reader > :where(.reader-body, article, section),
body > main:not([class]) > article {
  min-width: 0;
}

body > main.reader :where(p, li, blockquote, dd, figcaption),
body > main:not([class]) article :where(p, li, blockquote, figcaption) {
  max-width: 100%;
  overflow-wrap: anywhere;
}

body > main.reader :where(.reader-body, article) > p,
body > main:not([class]) > article > p {
  font-size: clamp(1rem, 1.2vw, 1.075rem);
  line-height:1.8;
}

body > main.reader :where(.reader-body, article) > :where(h2, h3, h4, h5, h6),
body > main:not([class]) > article > :where(h2, h3, h4, h5, h6) {
  max-width: 100%;
  margin-top: clamp(2.25rem, 5vw, 3.75rem);
  padding-top: 0 !important;
  border: 0 !important;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  text-wrap: pretty;
}

body > main.reader :where(.reader-source-toc, hr),
body > main:not([class]) :where(hr) {
  border: 0 !important;
  box-shadow: none !important;
}

body > main.reader hr,
body > main:not([class]) hr {
  height: 0;
  margin-block: clamp(2rem, 5vw, 3.5rem);
}

body > main.reader :where(img, video, iframe, audio),
body > main:not([class]) :where(img, video, iframe, audio) {
  max-width: 100%;
}

body > main.reader :where(img, video),
body > main:not([class]) :where(img, video) {
  height: auto;
}

body > main.reader figure,
body > main:not([class]) figure {
  max-width: 100%;
  margin: clamp(2rem, 5vw, 3.25rem) 0;
}

body > main:not([class]) > article {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

body > main:not([class]) > article > h1 {
  display: block;
}

body > main:not([class]) .ocr-extract {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  body > main.reader,
  body > main:not([class]) {
    padding-inline: 1.25rem;
  }

  body > main.reader > h1,
  body > main:not([class]) > article > h1 {
    font-size: clamp(2rem, 10vw, 2.75rem);
  }

  body > main.reader figure,
  body > main:not([class]) figure {
    margin-inline: 0;
  }
}
