:root {
  --page-width: 900px;
  --prose-width: 760px;
  --page-x: 22px;
  --page-y: 18px;
  --text: #111827;
  --muted: #6b7280;
  --faint: #e5e7eb;
  --link: #2563eb;
  --block-indent: 11px;
  --block-gap: 2px;
  --block-control-size: 16px;
  --block-control-gap: 6px;
  --block-line-height: 1.38;
  --text-size: 0.95rem;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--page-y) var(--page-x) 40px;
  color: var(--text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--text-size);
  line-height: var(--block-line-height);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 550;
  line-height: var(--block-line-height);
}

h1 {
  margin-bottom: 4px;
  font-size: 1.32rem;
  font-weight: 600;
}

h2 {
  font-size: 1.08rem;
}

h3,
h4,
h5,
h6 {
  font-size: 0.98rem;
}

p,
ol,
ul {
  margin: 1px 0;
}

ol,
ul {
  padding-left: 0;
}

li {
  margin: 1px 0;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: #1d4ed8;
}

.site-header {
  margin: 4px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--faint);
}

.site-title {
  margin-bottom: 6px;
  font-size: 1.45rem;
  font-weight: 650;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-nav a {
  color: #374151;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 2.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--faint);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

section {
  margin: 0;
}

.prose-page {
  max-width: var(--prose-width);
  color: #1f2937;
  font-size: 1rem;
  line-height: 1.52;
}

.prose-page section + section {
  margin-top: 1.35rem;
}

.prose-page h2,
.prose-page h3 {
  margin: 1.25rem 0 0.35rem;
  color: var(--text);
  font-weight: 650;
  line-height: 1.25;
}

.prose-page h2:first-child,
.prose-page h3:first-child {
  margin-top: 0;
}

.prose-page h2 {
  font-size: 1.22rem;
}

.prose-page h3 {
  font-size: 1.08rem;
}

.prose-page p {
  margin: 0.45rem 0;
}

.prose-page ol,
.prose-page ul {
  margin: 0.45rem 0 0.9rem;
  padding-left: 1.45rem;
}

.prose-page ol {
  list-style: decimal;
}

.prose-page ul {
  list-style: disc;
}

.prose-page li {
  margin: 0.35rem 0;
  padding-left: 0.15rem;
}

.prose-page strong {
  color: var(--text);
  font-weight: 650;
}

.block {
  margin: var(--block-gap) 0 var(--block-gap) calc(var(--depth) * var(--block-indent));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

p.block {
  padding-left: calc(var(--block-control-size) + var(--block-control-gap));
}

.topic-subtitle {
  margin: 1px 0 6px var(--block-indent);
  color: var(--muted);
  font-size: 1rem;
  line-height: var(--block-line-height);
}

.topic-overview,
.topic-overview-gold,
.topic-overview-drivers,
.content-part,
.content-lesson,
.content-section,
.content-subsection,
.content-subsubsection,
.chapter,
.lesson,
.text-node,
.list-node,
.list-item,
.content-block,
.twf-item,
.twf-standard,
.twf-exemplar {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.topic-overview h2,
.content-part > h2,
.content-subsection h5,
.content-subsubsection h6,
.content-block h5,
.chapter h2,
.lesson h3 {
  margin: 1px 0;
  color: var(--text);
  font-size: inherit;
  font-weight: 400;
  line-height: var(--block-line-height);
}

.block-type-block_part {
  margin-top: 4px;
}

.block-type-block_part:first-child {
  margin-top: var(--block-gap);
}

.part-description .article-paragraph {
  margin-left: 0;
  padding-left: 0;
  font-size: inherit;
  font-weight: 400;
  color: var(--text);
  line-height: var(--block-line-height);
}

.block-type-block_part > summary h2,
.block-type-block_part > h2 {
  font-size: 1.02rem;
  font-weight: 550;
}

.block-type-block_lesson > summary > span,
.block-type-block_orientation > summary > span,
.twfset-node > summary > span {
  font-size: inherit;
  font-weight: 400;
}

.reading-node[open] > summary > span {
  font-size: 1.08rem;
  font-weight: 600;
}

.reading-node[open] > summary {
  margin-bottom: 6px;
  padding-top: 4px;
}

.reading-node[open] > .text-content {
  max-width: var(--prose-width);
}

.reading-node[open] > .text-content > .block {
  margin-top: 8px;
}

.reading-node[open] .block-type-block_section > summary > span {
  font-size: 1rem;
  font-weight: 550;
}

.reading-node[open] .block-type-block_section > summary {
  padding-top: 2px;
}

.reading-node[open] .block-type-block_text > summary > span {
  font-weight: 400;
}

.reading-node[open] .block-type-block_text > .text-content {
  margin-top: 2px;
}

.article-content {
  margin-left: 0;
  max-width: var(--prose-width);
}

.article-content .block {
  margin-left: 0;
}

.reading-node[open] > .article-content {
  padding-left: calc(var(--block-control-size) + var(--block-control-gap));
}

.reading-node[open] .article-content > .block > summary {
  margin-left: calc(-1 * (var(--block-control-size) + var(--block-control-gap)));
}

.reading-node[open] .article-content > .block > summary > span {
  grid-column: 2;
}

.article-content p.block,
.article-content .article-paragraph {
  margin: 0.45rem 0;
  padding-left: 0;
  color: #1f2937;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.52;
}

.article-content .typed-list {
  margin: 0.45rem 0 0.7rem;
  padding-left: 1.5rem;
}

.article-content .block-type-block_item {
  margin: 0.2rem 0;
  padding-left: 0.15rem;
}

.lesson-title,
.content-section-title,
.block > summary,
.lesson-section > summary,
.list-toggle {
  display: grid;
  grid-template-columns: var(--block-control-size) minmax(0, 1fr);
  align-items: start;
  column-gap: var(--block-control-gap);
  padding: 1px 0;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 400;
  line-height: var(--block-line-height);
  list-style: none;
}

.lesson-title::marker,
.content-section-title::marker,
.block > summary::marker,
.lesson-section > summary::marker,
.list-toggle::marker {
  content: "";
  font-size: 0;
}

.lesson-title::-webkit-details-marker,
.content-section-title::-webkit-details-marker,
.block > summary::-webkit-details-marker,
.lesson-section > summary::-webkit-details-marker,
.list-toggle::-webkit-details-marker {
  display: none;
}

.lesson-title::before,
.content-section-title::before,
.block > summary::before,
.lesson-section > summary::before,
.list-toggle::before {
  grid-column: 1;
  width: var(--block-control-size);
  height: var(--block-control-size);
  margin-top: 0.12em;
  background-color: var(--muted);
  content: "";
  opacity: 0.7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(0deg);
  transform-origin: center;
  transition: transform 120ms ease;
}

.content-lesson[open] > .lesson-title::before,
.content-section[open] > .content-section-title::before,
.block[open] > summary::before,
.lesson-section[open] > summary::before,
.list-node[open] > .list-toggle::before {
  transform: rotate(90deg);
}

.lesson-title:hover,
.content-section-title:hover,
.block > summary:hover {
  color: #374151;
}

.chapter-content,
.lesson-content,
.text-content,
.content-lesson > :not(.lesson-title),
.content-section > :not(.content-section-title),
.twf-task-content,
.twf-review-content {
  margin-left: 0;
  padding: 0;
}

.content-subsection,
.content-subsubsection {
  margin-left: calc(var(--depth) * var(--block-indent));
}

.topic-overview-body > :last-child,
.content-subsubsection > :last-child {
  margin-bottom: 0;
}

.topic-content p,
.topic-content li,
.topic-overview-body p,
.topic-overview-body li,
.twf-feedback-body p,
.twf-feedback-body li {
  color: #1f2937;
  font-size: inherit;
  font-weight: 400;
  line-height: var(--block-line-height);
}

.topic-content p,
.topic-overview-body p,
.twf-feedback-body p {
  margin: 1px 0;
}

.topic-content ul,
.topic-overview-body ul,
.twf-feedback-body ul {
  margin: 1px 0 3px;
  padding-left: 1.15em;
  list-style: disc;
}

.topic-content ol,
.topic-overview-body ol,
.twf-feedback-body ol {
  margin: 1px 0 3px;
  padding-left: 18px;
  list-style: decimal;
}

.topic-content ol ol,
.topic-overview-body ol ol,
.twf-feedback-body ol ol {
  list-style: lower-alpha;
}

.topic-content li + li,
.topic-overview-body li + li,
.twf-feedback-body li + li {
  margin-top: 1px;
}

.typed-list {
  margin: 1px 0 3px;
  padding-left: 1.15em;
  list-style: revert;
}

/* List containers own indentation; items must not also inherit outline depth. */
.typed-list > .block-type-block_item {
  margin-left: 0;
}

.content-summary,
.twf-feedback-body {
  color: #1f2937;
}

.content-summary {
  margin: 1px 0;
  font-size: inherit;
  line-height: var(--block-line-height);
}

.content-quote {
  margin: 2px 0 3px calc(var(--depth) * var(--block-indent));
  padding: 0 0 0 8px;
  border-left: 1px solid var(--faint);
  background: transparent;
  color: #374151;
}

.content-quote p {
  margin: 1px 0;
  color: inherit;
  font-size: inherit;
  line-height: var(--block-line-height);
}

.content-admonition {
  margin: 6px 0 8px calc(var(--depth) * var(--block-indent));
  padding: 8px 10px;
  border: 1px solid var(--faint);
  border-left: 3px solid #64748b;
  border-radius: 3px;
  background: #f8fafc;
}

.admonition-note {
  border-left-color: #2563eb;
}

.admonition-caution,
.admonition-warning {
  border-left-color: #dc2626;
}

.admonition-tip {
  border-left-color: #16a34a;
}

.admonition-title {
  margin: 0 0 3px;
  text-align: left;
  color: var(--text);
  font-weight: 650;
}

.content-code {
  margin: 8px 0 10px calc(var(--depth) * var(--block-indent));
  padding: 10px 12px;
  overflow: auto;
  border: 1px solid var(--faint);
  border-radius: 3px;
  background: #f8fafc;
  line-height: 1.45;
}

.content-code code {
  padding: 0;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
}

.content-table {
  margin: 8px 0 10px calc(var(--depth) * var(--block-indent));
  overflow-x: auto;
}

.content-table table {
  width: 100%;
  border-collapse: collapse;
}

.content-table th,
.content-table td {
  padding: 5px 7px;
  border: 1px solid var(--faint);
  text-align: left;
  vertical-align: top;
}

.missing-insert,
.recursive-insert {
  color: #b91c1c;
  font-weight: 550;
}

.content-figure {
  display: block;
  max-width: 100%;
  margin: 8px auto 10px calc(var(--depth) * var(--block-indent));
  scroll-margin-top: 2rem;
}

.content-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--faint);
  border-radius: 2px;
  background: #fff;
}

.content-figure-caption {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.32;
}

.content-math {
  max-width: 100%;
  margin: 0.75rem 0 0.85rem calc(var(--depth) * var(--block-indent));
  overflow-x: auto;
  text-align: center;
}

.content-math-source {
  display: inline-block;
  color: var(--text);
  line-height: 1.5;
  white-space: pre;
}

.content-math-source.is-raw {
  padding: 0.2rem 0.35rem;
  border: 1px solid var(--faint);
  border-radius: 2px;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
}

.content-inline-math-source {
  white-space: nowrap;
}

.content-inline-math-source .katex {
  font-size: 0.95em;
}

.content-inline-math-source.is-raw {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
}

.content-equation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1rem;
  scroll-margin-top: 2rem;
}

.content-cross-reference {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.15em;
}

.content-reference-missing {
  color: #b91c1c;
  font-weight: 550;
}

.content-figure:target,
.content-equation:target {
  outline: 2px solid color-mix(in srgb, var(--link) 45%, transparent);
  outline-offset: 4px;
  background: color-mix(in srgb, var(--link) 8%, transparent);
}

.content-equation-source {
  justify-self: center;
}

.content-equation-number {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.content-asset {
  margin: 6px 0 8px calc(var(--depth) * var(--block-indent));
}

.content-file {
  line-height: 1.4;
}

.content-audio-player {
  display: block;
  width: min(100%, 520px);
}

.content-asset-caption {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.32;
}

.twf-evaluation {
  display: grid;
  gap: 2px;
  margin: 0 0 4px;
}

.twf-standard {
  --standard-checkbox-size: var(--block-control-size);
  --standard-checkbox-box: 13px;
  --standard-checkbox-gap: var(--block-control-gap);
  --standard-text-offset: var(--block-indent);
}

.twf-standard-list {
  margin: 0 0 3px;
  padding: 0;
  list-style: none;
}

/* Lesson checklists: checkboxes sit where list bullets do, so item text
   lines up with list and paragraph text. */
.topic-content .content-checklist {
  padding-left: 0;
}

/* Specific enough to beat `.lesson-section > .article-content > .block`. */
.topic-content .article-content .block.content-checklist {
  margin-left: calc(-1 * (var(--standard-checkbox-size) + var(--standard-checkbox-gap)));
}

.twf-standard-item {
  margin: 1px 0;
  list-style: none;
}

.twf-standard-item > .twf-standard-list {
  margin: 1px 0 1px var(--standard-text-offset);
}

.twf-standard-item::marker {
  content: "";
}

.twf-standard-item label {
  display: grid;
  grid-template-columns: var(--standard-checkbox-size) minmax(0, 1fr);
  align-items: start;
  column-gap: var(--standard-checkbox-gap);
  line-height: var(--block-line-height);
}

/* The box is smaller than its column, so item text stays aligned. It is
   centered on the first line; font-size: inherit makes 1em the text's em. */
.twf-standard-item input {
  grid-column: 1;
  justify-self: center;
  width: var(--standard-checkbox-box);
  height: var(--standard-checkbox-box);
  margin: calc((var(--block-line-height) * 1em - var(--standard-checkbox-box)) / 2) 0 0;
  font-size: inherit;
}

.twf-standard-item label > span {
  grid-column: 2;
}

.twf-exemplar p {
  margin: 1px 0;
}

.twf-image img {
  display: block;
  max-width: 100%;
  height: auto;
}

.twf-answer {
  margin: 2px 0 6px;
}

.twf-item {
  margin: 2px 0;
}

.twf-item > .twf-prompt,
.twf-reveal > .twf-prompt,
.twf-review-section > summary {
  color: var(--text);
  font-size: inherit;
  font-weight: 400;
}

.twf-prompt > span,
.twf-review-section > summary > span {
  min-width: 0;
}

/* A numbered TwF uses a hanging indent: the number gets its own column, and the prompt,
   response box, and feedback all line up with the prompt text. The column fits two digits. */
.twf-item {
  --twf-index-width: 1.4em;
}

.twf-item > .twf-response-summary {
  grid-template-columns: var(--block-control-size) var(--twf-index-width) minmax(0, 1fr);
  grid-template-rows: auto auto;
}

.twf-response-summary::before {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.twf-response-summary > .twf-index {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
  white-space: nowrap;
}

.twf-response-summary > .twf-prompt-text {
  grid-column: 3;
  grid-row: 1;
  display: block;
  margin-bottom: 2px;
}

.twf-response-summary + .twf-task-content {
  padding-left: calc(var(--twf-index-width) + var(--block-control-gap));
}

.twf-response {
  padding: 0;
}

/* Inside a lesson, a TwF's or Example's arrow hangs in the same column as the section
   arrows, so its prompt and response box line up with the lesson text. */
.reading-node[open] .article-content > .twf-article > .twf-item > summary {
  margin-left: calc(-1 * (var(--block-control-size) + var(--block-control-gap)));
}

/* Keep the arrow level with the prompt, not centered on the prompt and response box together. */
.twf-item > .twf-response-summary {
  align-items: start;
}

.twf-item > .twf-response-summary::before {
  grid-row: 1;
  align-self: start;
  /* Center the arrow on the prompt's first line, even when the prompt wraps. */
  margin-top: calc((var(--block-line-height) * 1em - var(--block-control-size)) / 2);
}

/* Exemplar and standard contents start under their labels, not under their arrows. */
.twf-review-section > .twf-review-content {
  padding-left: calc(var(--block-control-size) + var(--block-control-gap));
}

/* The standard is a checklist, not a bulleted list: no list indent, and each nested
   checkbox sits under its parent item's text. */
.twf-feedback-body .twf-standard-list {
  padding-left: 0;
}

.twf-feedback-body .twf-standard-item > .twf-standard-list {
  margin-left: calc(var(--standard-checkbox-size) + var(--standard-checkbox-gap));
}

.twf-response-input {
  grid-column: 3;
  display: block;
  width: 100%;
  min-height: calc(1.3em + 4px);
  margin: 0 0 3px;
  padding: 2px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-size: inherit;
  line-height: 1.3;
  overflow: hidden;
  resize: none;
}

.twf-response-input::placeholder {
  color: var(--muted);
}

.twf-response-input:focus {
  border-color: #94a3b8;
  outline: 1px solid #cbd5e1;
  outline-offset: 1px;
}

.twf-reveal {
  margin-top: 2px;
}

.twf-feedback-body,
.twf-response .twf-feedback-body,
.twf-task-content > .twf-feedback-body {
  margin-left: 0;
  padding: 0;
}

.about-page,
.why-this-matters,
.how-it-works {
  margin-top: 4px;
}

@media (max-width: 640px) {
  :root {
    --page-x: 16px;
    --page-y: 16px;
    --block-indent: 10px;
  }

  h1 {
    font-size: 1.3rem;
  }
}

/* Arguments in standard form: field names in a narrow column, content beside them. */
.argument-fields {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin: 4px 0 0;
}

.argument-fields > dt {
  font-weight: 650;
}

.argument-fields > dd {
  margin: 0;
}

.argument-fields p {
  margin: 0;
}

.argument-reasons {
  margin: 0;
  padding-left: 1.4em;
}

@media (max-width: 520px) {
  .argument-fields {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .argument-fields > dd {
    margin: 0 0 6px 1rem;
  }
}

/* Definition lists look like bulleted lists with bold lead-ins:
   "• Term: first paragraph...". The term floats left so the first paragraph
   runs on after it; later paragraphs and nested lists sit below. */
.content-definition-list {
  display: flow-root;
  margin: 0.55rem 0 1rem;
  padding-left: 2.1rem;
  line-height: 1.62;
}

/* Same color and line height as list items, overriding theme paragraph rules. */
.topic-content .content-definition-list,
.topic-content .content-definition-list > dd > p.block,
.reading-node[open] .article-content .content-definition-list > dd > p.block {
  color: #1f2937;
  line-height: 1.62;
}

.content-definition-list > dt {
  display: list-item;
  list-style: disc outside;
  float: left;
  clear: left;
  margin: 0.25rem 0.3em 0 0;
  font-weight: 700;
  text-align: left;
}


.content-definition-list > dt::after {
  content: ":";
}

/* Padding, not margin: paragraph margins can't leak past a definition and
   shift the next term off its line. */
.content-definition-list > dd {
  margin: 0;
  padding: 0.25rem 0 1px;
}

.content-definition-list > dd > * {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.content-definition-list > dd > :first-child {
  margin-top: 0;
}

/* Inline, so wrapped lines run back under the term instead of beside it. */
.content-definition-list > dd > p:first-child {
  display: inline;
}

/* Standalone lesson pages: small "Lesson" label, title, intro, open sections. */
.page-kicker,
.lesson-back {
  max-width: var(--prose-width, none);
  margin-right: auto;
  margin-left: auto;
}

.page-kicker {
  margin-bottom: 0.2rem;
  color: var(--muted, #6f6a61);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Shown when a guidebook lesson linked here: a way back to that lesson. */
.lesson-back {
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

.lesson-back-bottom {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.page-kicker + h1 {
  margin-top: 0;
}

.lesson-intro {
  margin-bottom: 1.6rem;
  font-size: 1.08rem;
}

.lesson-intro p.block {
  margin: 0 0 0.5rem;
  padding-left: 0;
}

.lesson-intro > .block,
.lesson-section > .article-content > .block {
  margin-left: 0;
}

/* The rule sits close to its heading, so it reads as the top of the section. */
.lesson-section {
  margin: 0;
  padding-top: 0.15rem;
  border-top: 1px solid #c4b8a6;
}

.lesson-section > summary > h2 {
  margin: 0.4rem 0 0.5rem;
  color: var(--heading, #151515);
  font-size: 1.32rem;
  font-weight: 700;
  line-height: 1.25;
}

.lesson-section > .article-content {
  margin-bottom: 1.2rem;
}

/* The arrow hangs in the left margin so the heading stays at the outer edge. */
.lesson-section > summary {
  margin-left: calc(-1 * (var(--block-control-size) + var(--block-control-gap)));
}

/* Subheadings get more space above than below, as on GuideBook pages. */
.lesson-section .block-type-h2,
.lesson-section .block-type-h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

.lesson-section > .article-content > .block-type-h2:first-child {
  margin-top: 0.5rem;
}

/* One text edge: paragraphs, boxes, and list text share an indent; headings
   stay at the outer edge and bullets hang in the gap between. */
.lesson-section {
  --lesson-indent: 2.1rem;
}

.lesson-section > .article-content {
  padding-left: var(--lesson-indent);
}

.lesson-section .content-subsection > h5,
.lesson-section .content-subsubsection > h6 {
  margin-left: calc(-1 * var(--lesson-indent));
}

.lesson-section .article-content > .typed-list,
.lesson-section .content-subsection > .typed-list,
.lesson-section .content-subsubsection > .typed-list,
.lesson-section .article-content > .content-definition-list,
.lesson-section .content-subsection > .content-definition-list,
.lesson-section .content-subsubsection > .content-definition-list {
  padding-left: 0;
}

.lesson-section .article-content > .typed-list > li,
.lesson-section .content-subsection > .typed-list > li,
.lesson-section .content-subsubsection > .typed-list > li {
  padding-left: 0;
}

/* List markers hang left of the list text. Pull paragraphs out by the same
   amount so lead-in lines start where the numbers and bullets start. */
.lesson-section {
  --marker-hang: 1.1em;
}

.lesson-section .article-content > .article-paragraph,
.lesson-section .content-subsection > .article-paragraph,
.lesson-section .content-subsubsection > .article-paragraph {
  margin-left: calc(-1 * var(--marker-hang));
}

@media (max-width: 680px) {
  .lesson-section {
    --lesson-indent: 1.3rem;
  }

  /* No room in the margin: the arrow sits inside, and the content lines up
     under the heading text, as in GuideBook focus view on phones. */
  .lesson-section > summary {
    margin-left: 0;
  }

  .lesson-section > .article-content {
    padding-left: calc(var(--block-control-size) + var(--block-control-gap) + var(--lesson-indent));
  }

  .lesson-section .content-subsection > h5,
  .lesson-section .content-subsubsection > h6 {
    margin-left: calc(-1 * var(--lesson-indent));
  }
}

/* Lesson video: a click-to-play thumbnail that becomes the YouTube player. */
.lesson-video {
  margin: 0 0 1.4rem;
  max-width: var(--prose-width, 42rem);
}

.lesson-video-play,
.lesson-video-frame {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.lesson-video-play img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lesson-video-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.72);
  transition: background 0.15s;
}

.lesson-video-icon::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent #fff;
}

.lesson-video-play:hover .lesson-video-icon,
.lesson-video-play:focus-visible .lesson-video-icon {
  background: #c4302b;
}

.lesson-video figcaption {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted, #6b645b);
}

/* Homepage headline */
/* A tinted block that frames the headline and the site's job. */
.home-hero {
  margin: 0.6rem 0 1.6rem;
  padding: 1.6rem 1.8rem;
  border-radius: 10px;
  border-left: 5px solid var(--link);
  background: color-mix(in srgb, var(--link) 14%, var(--paper, #fff));
}

.prose-page .home-job {
  margin: 0 0 1rem;
  color: var(--text);
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
}

.prose-page .home-headline {
  margin: 0 0 0.6rem;
  color: var(--heading, var(--text));
  font-size: 2.9rem;
  font-weight: 700;
  line-height: 1.1;
}

.prose-page .home-subhead {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.prose-page .home-status {
  margin-top: 1.3rem;
}

.home-action {
  margin-top: 1.1rem;
}

.button-link {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  background: var(--link);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.button-link:hover {
  color: #fff;
  filter: brightness(1.12);
}

.home-action-secondary {
  margin-top: 0.7rem;
}

/* Smaller button for a secondary action, same color as the main one. */
.button-link.button-link-small {
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
}

@media (max-width: 680px) {
  .home-hero {
    padding: 1.2rem 1.1rem;
  }

  .prose-page .home-headline {
    font-size: 2.3rem;
  }

  .prose-page .home-job {
    font-size: 1.08rem;
  }

  .prose-page .home-subhead {
    font-size: 0.92rem;
  }
}
