/* mdpress 1.1.4 - print-first layout. Local WOFF2 faces are in fonts.css. */
:root {
   --accent: #cb2821;
   --ink: #333333;
   --link: #197bbd;
   --rule: #dedede;
   --muted: #747474;
   --code-bg: #f5f5f5;
   --font-body: "Mdpress Noto Sans", "Mdpress DejaVu Symbols", sans-serif;
   --font-heading: "Mdpress Alata Ham", "Mdpress Noto Sans", sans-serif;
   --font-code: "Mdpress Noto Mono", "Mdpress DejaVu Symbols", monospace;
}

@page {
   size: A4;
   margin: 17mm 17mm 18mm 17mm;
   @top-center {
      content: "";
      width: 176mm;
      border-bottom: 0.4pt solid #dedede;
      margin-bottom: 4mm;
   }
   @bottom-left {
      content: string(doc-title);
      width: 33.333%;
      color: #555555;
      font: 8pt var(--font-body);
      border-top: 0.4pt solid #dedede;
      padding-top: 2mm;
   }
   @bottom-right {
      content: counter(page);
      width: 33.333%;
      text-align: right;
      color: #555555;
      font: 8pt var(--font-body);
      border-top: 0.4pt solid #dedede;
      padding-top: 2mm;
   }
   @bottom-center {
      content: "";
      width: 33.333%;
      color: #555555;
      font: 8pt var(--font-body);
      border-top: 0.4pt solid #dedede;
      padding-top: 2mm;
   }
}

html { -webkit-text-size-adjust: 100%; }
body {
   margin: 0;
   background: #ffffff;
   color: var(--ink);
   font-family: var(--font-body);
   font-size: 10.5pt;
   line-height: 1.36;
   overflow-wrap: anywhere;
}
.document { margin: 0 auto; }
article > h1:first-child {
   string-set: doc-title content(text);
   font-size: 25pt;
   line-height: 1.2;
   margin: 0 0 13pt;
   text-align: center;
   bookmark-level: 1;
}
h1, h2, h3, h4, h5, h6 {
   font-family: var(--font-heading);
   color: var(--accent);
   font-weight: 600;
   line-height: 1.2;
   text-align: left;
   break-after: avoid-page;
   page-break-after: avoid;
   orphans: 2;
}
h1 { font-size: 20pt; margin: 19pt 0 11pt; }
h2 { font-size: 17pt; margin: 18pt 0 10pt; }
h3 { font-size: 12.5pt; margin: 16pt 0 9pt; }
h4 { font-size: 11pt; margin: 12pt 0 7pt; }
h5, h6 { font-size: 10.5pt; margin: 11pt 0 6pt; }
p { margin: 0 0 11pt; text-align: justify; orphans: 2; widows: 2; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 700; }
ul, ol { padding-left: 1.6em; margin: 0 0 12pt; }
li { margin-bottom: 3pt; }
li p { margin-bottom: 3pt; }
code, pre { font-family: var(--font-code); }
p code, li code, td code {
   color: var(--accent);
   background: #fbf3f2;
   font-size: .89em;
   padding: .05em .24em;
   border-radius: 2px;
}
.code-block {
   position: relative;
   margin: 11pt 0 13pt;
   background: var(--code-bg);
   border: .6pt solid #d6d6d6;
   border-radius: 4px;
   break-inside: auto;
}
.code-block pre {
   font-family: var(--font-code);
   white-space: pre-wrap;
   overflow-wrap: anywhere;
   font-size: 8.6pt;
   line-height: 1.34;
   margin: 0;
   padding: 11pt 9pt;
}
.code-language {
   float: right;
   font-size: 7pt;
   color: #666666;
   padding: 3pt 7pt 0 0;
   font-family: var(--font-body);
}
img {
   display: block;
   margin: 9pt auto 13pt;
   max-width: 100%;
   height: auto;
   object-fit: contain;
   break-inside: avoid;
}
p:has(> img:only-child) { text-align: center; }
blockquote {
   border-left: 3pt solid var(--accent);
   margin: 12pt 0;
   padding: 3pt 9pt;
   color: #555555;
}
blockquote p:last-child { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 15pt 0; }
table {
   width: 100%;
   border-collapse: collapse;
   font-size: 9.3pt;
   line-height: 1.32;
   margin: 12pt 0 15pt;
}
tr { break-inside: avoid; }
th, td { border-bottom: .5pt solid #dedede; padding: 4pt 5pt; vertical-align: top; text-align: left; }
thead th { background: var(--accent); color: white; font-weight: 700; }
tbody tr:nth-child(even) { background: #f9f9f9; }
td p { text-align: left; }
.missing-image { display: block; background: #ffebeb; color: #9c1f14; padding: 9pt; }
.toc {
   margin: 15pt 0 19pt;
   padding: 12pt 15pt;
   border: 1px solid #e7e7e7;
   background: #fcfcfc;
}
.toc-title {
   font-size: 17pt;
   margin: 0 0 10pt;
   bookmark-level: none;
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; line-height: 1.5; break-inside: avoid; }
.toc a { color: var(--ink); }
.toc-depth-1, .toc-depth-2 { padding-left: 0; font-weight: 600; }
.toc-depth-3 { padding-left: 13pt; font-size: 9.4pt; }
.toc-depth-4 { padding-left: 26pt; font-size: 9pt; }
.toc-depth-5, .toc-depth-6 { padding-left: 39pt; font-size: 8.6pt; }

.theme-resume article > h1:first-child { font-size: 26pt; margin-bottom: 20pt; }
.theme-resume article > h1:first-child + p img {
   width: auto;
   max-height: 58mm;
   max-width: 100%;
   margin: 9pt auto 14pt;
}
.theme-resume h1 { font-size: 20pt; margin-top: 21pt; }
.theme-resume h3 { font-size: 12.5pt; margin-top: 18pt; }
.theme-resume p { line-height: 1.28; margin-bottom: 12pt; }
.theme-resume ul { margin-bottom: 14pt; }
.theme-resume li { margin-bottom: 5pt; }
/* Resume tables have only internal horizontal separators, not an underline. */
.theme-resume table { margin-top: 8pt; }
.theme-resume table tbody tr:last-child > td,
.theme-resume table tbody tr:last-child > th {
   border-bottom: 0;
}

/* Manual tables are full grids, including header and outer perimeter. */
.theme-manual table {
   border: .7pt solid #b8b8b8;
   border-collapse: collapse;
}
.theme-manual table th,
.theme-manual table td {
   border: .7pt solid #b8b8b8;
}
.theme-manual table thead th {
   border-color: #b0221c;
}
.theme-manual h2 { font-size: 17pt; }
.theme-manual .code-block { break-inside: avoid-page; }

@media screen {
   body { background: #f2f3f5; }
   .document {
      background: white;
      box-sizing: border-box;
      max-width: 860px;
      min-height: 100vh;
      margin: 24px auto;
      padding: 54px 67px 70px;
      box-shadow: 0 4px 35px #00000012;
   }
   .toc a:hover { color: var(--accent); }
}
@media print {
   body { background: #ffffff; }
   .document { margin: 0; padding: 0; }
   .toc { break-after: avoid; }
   .toc a::after {
      content: leader(dotted) target-counter(attr(href), page);
      font-weight: normal;
      color: #777777;
   }
}
@media screen and (max-width: 720px) {
   .document { margin: 0; padding: 22px; box-shadow: none; }
}

/* Print-friendly checkboxes, fenced code captions and anchors. */
li { overflow-wrap: anywhere; }
.footnotes { font-size: 9pt; border-top: 1px solid var(--rule); padding-top: 6pt; }
:target { scroll-margin-top: 25px; }

@page { size: A4; }
@page:right {
   @bottom-left { content: string(doc-title); }
   @bottom-center { content: ""; }
   @bottom-right { content: counter(page); }
}
@page:left {
   @bottom-left { content: string(doc-title); }
   @bottom-center { content: ""; }
   @bottom-right { content: counter(page); }
}
