/*
   StrickStuff — APA 7 student paper layout
   For school papers posted to the blog. Wrap the paper in
   <div class="apa-paper"> with one <section class="apa-page"> per sheet
   (title page, body, references). Times New Roman 12pt equivalent,
   double-spaced, 0.5in first-line indents, APA heading levels, and
   hanging-indent references.
*/

.apa-paper {
  --apa-ink: #111;
  --apa-sheet: #fffdf8;
  margin: 8px 0 0;
}

.apa-paper .apa-page {
  position: relative;
  max-width: 8.5in;
  margin: 0 auto 28px;
  padding: 1in;
  box-sizing: border-box;
  min-height: 11in;
  background: var(--apa-sheet);
  color: var(--apa-ink);
  border: 1px solid var(--line);
  box-shadow: 5px 5px 0 var(--paper-deep);
  font-family: "Times New Roman", Times, serif;
  font-size: 1.15rem;
  line-height: 2;
  letter-spacing: 0;
}

/* Page number, top right (APA student papers number every page). */
.apa-paper .apa-page::before {
  content: attr(data-page);
  position: absolute;
  top: 0.5in;
  right: 1in;
  font: inherit;
  line-height: 1;
}

.apa-paper p,
.apa-paper li {
  font-family: inherit;
  font-size: inherit;
  line-height: 2;
  color: var(--apa-ink);
}

.apa-paper p {
  margin: 0;
  text-indent: 0.5in;
}

.apa-paper ul {
  margin: 0;
  padding-left: 0.75in;
}

.apa-paper li { margin: 0; }

/* Title page */
.apa-paper .apa-title-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 2.5in;
}

.apa-paper .apa-title-page p { text-indent: 0; }

.apa-paper .apa-title-page .apa-title {
  margin: 0 0 2em;
}

/* Paper title repeated on the first body page, and Level 1 headings */
.apa-paper h2,
.apa-paper h3,
.apa-paper .apa-title {
  font-family: inherit;
  font-size: inherit;
  line-height: 2;
  letter-spacing: 0;
  color: var(--apa-ink);
  font-weight: 700;
  margin: 0;
}

.apa-paper .apa-title,
.apa-paper h2 { text-align: center; }

/* Level 2: flush left, bold */
.apa-paper h3 { text-align: left; }

/* References: centered bold heading, hanging indent */
.apa-paper .apa-references p {
  padding-left: 0.5in;
  text-indent: -0.5in;
  overflow-wrap: anywhere;
}

.apa-paper a { color: inherit; }

@media (max-width: 720px) {
  .apa-paper .apa-page {
    min-height: 0;
    padding: 48px 20px 32px;
    font-size: 1.05rem;
  }
  .apa-paper .apa-page::before { top: 18px; right: 20px; }
  .apa-paper .apa-title-page { padding-top: 64px; padding-bottom: 32px; }
  .apa-paper p { text-indent: 0.35in; }
  .apa-paper ul { padding-left: 0.5in; }
  .apa-paper .apa-references p { padding-left: 0.35in; text-indent: -0.35in; }
}

@media print {
  .apa-paper .apa-page {
    border: 0;
    box-shadow: none;
    margin: 0;
    min-height: 0;
    break-after: page;
  }
}
