/* Use one reading size throughout imported lessons, including examples and tables. */
body.aoi-unified main {
  --reading-size: 18px;
  --label-size: 15px;
}

body.aoi-unified main :is(.source-content, .chapter-body, .writing-manuscript, #writing-resources) {
  font-size: var(--reading-size);
}

body.aoi-unified main :is(.source-content, .chapter-body, #writing-resources)
  :is(p, div, section, article, aside, nav, header, footer, ul, ol, li, dl, dt, dd, blockquote,
      figure, figcaption, table, thead, tbody, tfoot, tr, th, td, caption,
      pre, code, details, summary, label, button, a, span, small, b, strong, em) {
  font-size: inherit;
}

body.aoi-unified main :is(.source-content, .chapter-body, #writing-resources) h3 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
}

body.aoi-unified main :is(.source-content, .chapter-body, #writing-resources) h4 {
  font-size: var(--reading-size);
}

body.aoi-unified main :is(.note, .breadcrumbs) { font-size: 1rem; }
body.aoi-unified main :is(.note, .breadcrumbs) a { font-size: inherit; }
body.aoi-unified main :is(.chapter-meta, .library-meta, .library-file-note, .library-resource-link) {
  font-size: var(--label-size);
}
body.aoi-unified main .question-map article { min-width: 0; }
body.aoi-unified main .question-map h3 { margin: .5em 0; }
body.aoi-unified main .question-map small { display: block; line-height: 1.6; }

@media (max-width: 600px) {
  body.aoi-unified main { --reading-size: 17px; }
  body.aoi-unified main .question-map { grid-template-columns: minmax(0, 1fr); }
}

/* Distinguish text links from prose without changing the card or button styles. */
body.aoi-unified main a[href]:not(.button, .button-link, .chapter, .library-row) {
  text-decoration-line: underline;
  text-decoration-thickness: .075em;
  text-underline-offset: .19em;
}
body.aoi-unified main a[href]:focus-visible {
  outline: 2px solid var(--aoi-green, #42634c);
  outline-offset: 3px;
}
body.aoi-unified #writing-resources ul { padding-inline-start: 0; }
body.aoi-unified #writing-resources li + li { margin-top: .45em; }

body.aoi-unified main a.lesson-action {
  box-sizing: border-box;
  display: inline-flex;
  width: 280px;
  max-width: 100%;
  flex: none;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 5px 14px;
  border: 1px solid #42634c;
  border-radius: 999px;
  background: #42634c;
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
  white-space: normal;
  vertical-align: middle;
}
body.aoi-unified main a.lesson-action:hover { background: #35573f; }
body.aoi-unified main .lesson-action-label { min-width: 0; overflow-wrap: anywhere; font-size: inherit; line-height: 1.1; }
body.aoi-unified main .lesson-action-arrow { flex: none; }

@media (max-width: 600px) {
  body.aoi-unified main a.lesson-action { width: 240px; }
}

body.aoi-unified main .lesson-action-label {
  overflow-wrap: normal;
  line-break: strict;
}
.course-button-name,
.course-button-verb { white-space: nowrap; }
body.library-overview .course > .lesson-action { align-self: flex-end; }
body.library-overview .library-hero-compact {
  grid-template-areas: "intro illustration" "action illustration";
  align-items: start;
  row-gap: 18px;
}
body.library-overview .library-hero-compact > div { grid-area: intro; align-self: end; }
body.library-overview .library-hero-compact > img { grid-area: illustration; align-self: center; }
body.library-overview .library-hero-compact > .lesson-action { grid-area: action; align-self: end; }
body.library-overview .library-review .card { display: flex; flex-direction: column; align-items: flex-start; }
body.library-overview .library-review .card .lesson-action { margin-top: auto; }
@media (max-width: 760px) {
  body.library-overview .course > .lesson-action { align-self: flex-start; }
}
@media (max-width: 600px) {
  body.library-overview .library-hero-compact { grid-template-areas: "intro" "illustration" "action"; }
}
body.library-overview :is(.course, .library-hero-compact, .library-review .card) {
  padding-block-end: 28px;
}
