/* Section-content rendering contract.
   One file, two consumers: the browser (imported from app.js, scoping
   .rich-text-surface, .part-body and .part-text) and the PDF (inlined
   into templates/pdf/print.html.twig). Whatever typography section HTML
   gets, it gets from here, so the editor and the PDF cannot drift apart.

   Dompdf-safe subset only: literal px values (no clamp/rem tokens),
   physical margins (no margin-block), no nesting. Scheme-aware colors
   use the double declaration - the literal stands in Dompdf, browsers
   take the var() re-declaration. app.css tokens resolve here at their
   16px-root minimums; if the app type scale moves, move these with it.
   Heading weight is 700, not the app's 650: Dompdf only honors weight
   multiples of 100 and would drop 650 to normal. */

.section-content {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto,
               "DejaVu Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-wrap: break-word;
}

.section-content h1 { font-size: 28px; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 16px; }
.section-content h2 { font-size: 24px; font-weight: 700;
  letter-spacing: -0.01em; line-height: 1.2; margin: 32px 0 12px; }
.section-content h3 { font-size: 20px; font-weight: 700;
  letter-spacing: -0.01em; line-height: 1.2; margin: 24px 0 8px; }
.section-content h4 { font-size: 18px; font-weight: 700;
  line-height: 1.2; margin: 16px 0 8px; }
.section-content h5 { font-size: 14px; font-weight: 700;
  line-height: 1.2; margin: 16px 0 8px; }
.section-content h6 { font-size: 13px; font-weight: 700;
  line-height: 1.2; margin: 16px 0 8px; }

.section-content p { margin: 16px 0; }
.section-content > p:first-child,
.section-content > h1:first-child,
.section-content > h2:first-child,
.section-content > h3:first-child,
.section-content > h4:first-child { margin-top: 0; }

.section-content ul, .section-content ol { margin: 16px 0; padding: 0 0 0 40px; }
.section-content ul { list-style-type: disc; }
.section-content ul ul { list-style-type: circle; }
.section-content ul ul ul { list-style-type: square; }
.section-content ol { list-style-type: decimal; }
.section-content ul ul, .section-content ul ol,
.section-content ol ul, .section-content ol ol { margin: 0; }

.section-content blockquote { margin: 16px 40px; }

.section-content table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.section-content th, .section-content td { border: 1px solid #999;
  padding: 4px 6px; text-align: left; vertical-align: top; }

.section-content a { color: #067d76; color: var(--accent);
  text-decoration: underline; }

.section-content code { font-family: "DejaVu Sans Mono", ui-monospace,
  "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em;
  background: #eceff3; background: var(--surface-sunken);
  padding: 2px 6px; border-radius: 6px; }
.section-content pre { font-family: "DejaVu Sans Mono", ui-monospace,
  "SF Mono", Menlo, Consolas, monospace; font-size: 14px;
  white-space: pre-wrap; margin: 16px 0; }

.section-content hr { border: 0; border-top: 1px solid #d9dee6;
  border-top-color: var(--border); margin: 24px 0; }

.section-content img { max-width: 100%; height: auto; }
