/* post-body.css: a blog post's body (.bp-body), the markup contract the server's posts rely on (SPEC-SITE 5): h2, h3,
   p, ul, ol, li, a (every place, inside li too), strong, b, em, blockquote, div.bp-note, div.bp-table and its table,
   thead, tbody, tr, th, td, figure.bp-figure with img and figcaption; and, outside the contract, h4, code, pre, hr, a
   table with no frame and an img with no figure, set in the body's type so none is hidden or runs out (PLAN-SITE
   Task 15). Every rule sits under .bp-body and every value has its fallback, so the admin preview can load this file
   alone (P4). On the paper: the text in the second ink, headings and bold in the first, links in brand, underlined */
.bp-body {
  font-family: var(--f-sans, "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif);
  font-size: 17px; line-height: 1.9; letter-spacing: -0.01em; color: var(--on-light-2, #4B4B5A);
  word-break: keep-all; line-break: strict; overflow-wrap: break-word;
}
/* the flow: 24px between blocks; a heading takes its own space above (64, 44, 32) and holds the next block close */
.bp-body > * { margin: 0; }
.bp-body > * + * { margin-top: 24px; }
.bp-body p, .bp-body li { font-size: 17px; line-height: 1.9; }
.bp-body h2 { margin: 64px 0 20px; font-size: 26px; line-height: 1.4; font-weight: 700; letter-spacing: -0.03em; color: var(--on-light-1, #0C0C12); scroll-margin-top: 24px; }
.bp-body h3 { margin: 44px 0 14px; font-size: 21px; line-height: 1.5; font-weight: 700; letter-spacing: -0.025em; color: var(--on-light-1, #0C0C12); scroll-margin-top: 24px; }
.bp-body h4 { margin: 32px 0 10px; font-size: 18px; line-height: 1.6; font-weight: 700; letter-spacing: -0.02em; color: var(--on-light-1, #0C0C12); }
.bp-body h2 + *, .bp-body h3 + *, .bp-body h4 + * { margin-top: 0; }
.bp-body > :first-child { margin-top: 0; }

/* lists: the markers in brand, 8px between items */
.bp-body ul, .bp-body ol { padding-left: 1.3em; }
.bp-body ul { list-style: disc; }
.bp-body ol { list-style: decimal; }
.bp-body li { padding-left: .2em; }
.bp-body li + li, .bp-body li > ul, .bp-body li > ol { margin-top: 8px; }
.bp-body li { text-wrap: pretty; }   /* an item's last line is not one short word, as the design rules give the short span and li text (Task 18 design check: the legal lists and the posts' lists) */
.bp-body li::marker { color: var(--brand, #6A4CFF); font-variant-numeric: tabular-nums; }

/* links everywhere (inside li too): brand, underlined; a long address breaks where it must */
.bp-body a { color: var(--brand, #6A4CFF); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .28em; overflow-wrap: anywhere; transition: color 180ms cubic-bezier(.22, 1, .36, 1); }
.bp-body a:hover { color: var(--brand-hover, #5A3BF0); }
.bp-body b, .bp-body strong { font-weight: 700; color: var(--on-light-1, #0C0C12); }
.bp-body em { font-style: normal; color: var(--on-light-1, #0C0C12); }

/* a quote: a 2px brand line on its left */
.bp-body blockquote { margin-left: 0; margin-right: 0; padding: 2px 0 2px 22px; border-left: 2px solid var(--brand, #6A4CFF); }
.bp-body blockquote > * { margin: 0; }
.bp-body blockquote > * + * { margin-top: 12px; }

/* a note: a paper box with a fine border */
.bp-body .bp-note { padding: 22px 26px; border: 1px solid var(--line-light, rgba(12, 12, 18, .10)); border-radius: 14px; background: var(--paper-50, #FBFBFD); }
.bp-body .bp-note > * { margin: 0; }
.bp-body .bp-note > * + * { margin-top: 10px; }
.bp-body .bp-note p, .bp-body .bp-note li { font-size: 16px; line-height: 1.8; }

/* a table: in its frame (.bp-table) it scrolls sideways when wider than the column; rules only, the heads in the first ink */
.bp-body .bp-table { overflow-x: auto; }
.bp-body table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.bp-body th { padding: 12px 16px 12px 0; text-align: left; vertical-align: bottom; font-size: 14px; font-weight: 600; color: var(--on-light-1, #0C0C12); border-bottom: 1px solid var(--line-light-strong, rgba(12, 12, 18, .18)); }
.bp-body td { padding: 14px 16px 14px 0; vertical-align: top; border-bottom: 1px solid var(--line-light, rgba(12, 12, 18, .10)); }
.bp-body th:last-child, .bp-body td:last-child { padding-right: 0; }
/* a table with no frame scrolls by itself */
.bp-body table { display: block; overflow-x: auto; }
.bp-body .bp-table table { display: table; overflow: visible; }

/* a picture: in its frame (.bp-figure) with its caption under a fine rule; any picture stays inside the column */
.bp-body img { max-width: 100%; height: auto; }
.bp-body figure { margin-left: 0; margin-right: 0; }
.bp-body .bp-figure { overflow: hidden; border: 1px solid var(--line-light, rgba(12, 12, 18, .10)); border-radius: 14px; background: var(--paper-50, #FBFBFD); }
.bp-body .bp-figure img { display: block; width: 100%; }
.bp-body figcaption { padding: 12px 18px 14px; font-size: 14px; line-height: 1.6; color: var(--on-light-3, #6C6C7A); }
.bp-body .bp-figure figcaption { border-top: 1px solid var(--line-light, rgba(12, 12, 18, .10)); }

/* code in the body's type (one family) on the paper box; a block of it scrolls sideways */
.bp-body code { padding: .1em .4em; font-family: inherit; font-size: .92em; color: var(--on-light-1, #0C0C12); border: 1px solid var(--line-light, rgba(12, 12, 18, .10)); border-radius: 6px; background: var(--paper-50, #FBFBFD); overflow-wrap: anywhere; }
.bp-body pre { padding: 18px 22px; font-family: inherit; font-size: 15px; line-height: 1.7; white-space: pre; overflow-x: auto; color: var(--on-light-1, #0C0C12); border: 1px solid var(--line-light, rgba(12, 12, 18, .10)); border-radius: 14px; background: var(--paper-50, #FBFBFD); }
.bp-body pre code { padding: 0; font-size: inherit; border: 0; background: none; }
.bp-body hr { height: 0; margin: 48px 0; border: 0; border-top: 1px solid var(--line-light-strong, rgba(12, 12, 18, .18)); }

/* the wrapping and the picture box a public post takes from base.css (lines 25, 27, 28), here too so the admin
   preview, which has no base.css, breaks its lines as the post does (PLAN-SITE-2 Task 19, SPEC-SITE T12); base.css
   balances h1 to h3 only, so a public post's h4 takes its balance from this line (code review minor 1) */
.bp-body h2, .bp-body h3, .bp-body h4 { text-wrap: balance; }
.bp-body p { text-wrap: pretty; }
.bp-body img { display: block; }
