@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-display: swap;
}

@page {
  size: A4;
  margin: 18mm 18mm 22mm 18mm;
}

html, body {
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #0f172a;
  background: #ffffff;
  font-size: 11.5pt;
  line-height: 1.45;
}

p, li, a, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #0b1220;
}

h1 { break-before: page; font-size: 20pt; margin: 0 0 10pt; }
h2 { font-size: 15pt; margin: 18pt 0 8pt; }
h3 { font-size: 12.5pt; margin: 14pt 0 6pt; }

p { orphans: 3; widows: 3; margin: 0 0 10pt; }
pre, table, figure, blockquote { break-inside: avoid; }

pre, code {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", monospace;
}

pre {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  border-radius: 8px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

blockquote {
  margin: 12pt 0;
  padding: 0 0 0 10pt;
  border-left: 3px solid #cbd5e1;
  color: #334155;
}

hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 14pt 0;
}

.mermaid-figure {
  margin: 12pt 0;
}

.mermaid-figure svg {
  max-width: 100%;
  height: auto;
}

.mermaid-landscape {
  break-before: page;
  page: mermaidLandscape;
}

@page mermaidLandscape {
  size: A4 landscape;
  margin: 20mm;
}
