/*
 * GAMANET C4 - Integration Manual / Blue v02.2 - synchronized TOC and image support
 * Source: Integration Manual.Blue.v02(1).dotx
 * Use with gamanet-integration-blue.lua and gamanet-integration-blue.html5.
 * All document styling is scoped to .gamanet-document. No remote resources.
 */
.gamanet-document {
  --gm-accent: #2F5496;
  --gm-theme-accent: #4472C4;
  --gm-text: #252B32;
  --gm-toc-text: #2B2B2B;
  --gm-test-text: #242424;
  --gm-gray: #616161;
  --gm-heading-3: #1F3763;
  --gm-heading-deep: #17365D;
  --gm-caption: #56616E;
  --gm-link: #0563C1;
  --gm-visited-link: #954F72;
  --gm-border: #B4C6E7;
  --gm-white: #FFFFFF;
  /* Word auto line spacing uses the Noto Sans natural line box (1.362em),
   * not just the nominal font size. These values match that line box. */
  --gm-line-single: 1.362;
  --gm-line-body: 1.526575;    /* 1.362 * 269/240 */
  --gm-line-tight: 1.44145;   /* 1.362 * 254/240 */
  --gm-line-small: 1.4982;    /* 1.362 * 264/240 */
  --gm-font: "Noto Sans", "Segoe UI", Arial, sans-serif;
  box-sizing: border-box;
  width: 210mm;
  max-width: 100%;
  min-width: 0;
  margin: 24px auto;
  padding: 19mm 22mm 18mm;
  background: var(--gm-white);
  color: var(--gm-text);
  font-family: var(--gm-font);
  font-size: 10.5pt;
  font-weight: 400;
  line-height: var(--gm-line-body);
  text-align: start;
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body.gamanet-page { margin: 0; padding: 0; background: #EEEEEE; }
.gamanet-document *, .gamanet-document *::before,
.gamanet-document *::after { box-sizing: border-box; }
.gamanet-document :where(p, ul, ol, dl, blockquote, pre, figure) {
  margin: 0 0 6pt;
}
.gamanet-document p { orphans: 3; widows: 3; }
.gamanet-document :where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--gm-font);
  font-weight: 700;
  text-align: start;
  break-after: avoid;
  page-break-after: avoid;
  scroll-margin-top: 20px;
  overflow-wrap: break-word;
}
.gamanet-document h1 {
  color: var(--gm-accent);
  font-size: 20pt;
  line-height: var(--gm-line-tight);
  margin: 24pt 0 7pt;
}
.gamanet-document h2 {
  color: var(--gm-accent);
  font-size: 14pt;
  line-height: var(--gm-line-tight);
  margin: 12pt 0 7pt;
}
.gamanet-document h3 {
  color: var(--gm-heading-3);
  font-size: 11pt;
  line-height: var(--gm-line-tight);
  margin: 12pt 0 7pt;
}
.gamanet-document :where(h4, h5, h6, .gm-heading-7, .gm-heading-8, .gm-heading-9) {
  color: var(--gm-heading-deep);
  font-size: 10.5pt;
  line-height: var(--gm-line-body);
  margin: 10pt 0 0;
}
.gamanet-document :where(h1, h2, h3, h4, h5, h6) a {
  color: inherit;
  text-decoration: none;
}
.gamanet-document :where(strong, b, .gm-strong) { font-weight: 700; }
.gamanet-document :where(em, i, .gm-emphasis) { font-style: italic; }
.gamanet-document a { color: var(--gm-link); text-decoration: underline; }
.gamanet-document a:visited { color: var(--gm-visited-link); }
.gamanet-document a:hover { text-decoration-thickness: 2px; }
.gamanet-document :focus-visible { outline: 2px solid var(--gm-accent); outline-offset: 3px; }
.gamanet-document .gm-hyperlink { color: inherit; }
.gamanet-document .gm-no-spacing p { margin-bottom: 0; line-height: var(--gm-line-single); }
.gamanet-document .gm-body-text-2 { line-height: 2.724; }
.gamanet-document .gm-body-text-3 { font-size: 8pt; }

/* Cover: preserve the gray band, left-aligned brand and source spacing. */
.gamanet-document .gm-brand-banner {
  background: var(--gm-gray);
  color: var(--gm-white);
  padding: 12pt 11pt;
  margin: 0;
}
.gamanet-document .gm-cover-brand {
  font-size: 22pt;
  line-height: var(--gm-line-single);
  font-weight: 700;
  color: var(--gm-white);
  text-align: start;
}
.gamanet-document .gm-cover-brand p { margin: 0; }
.gamanet-document .gm-cover-kicker {
  color: var(--gm-theme-accent);
  font-size: 9.5pt;
  font-weight: 700;
  line-height: var(--gm-line-small);
}
.gamanet-document .gm-cover-kicker p { margin-bottom: 5pt; }
.gamanet-document .gm-cover > .gm-first-kicker { margin-top: 73pt; }
.gamanet-document .gm-cover > .gm-later-kicker { margin-top: 32pt; }
.gamanet-document :where(.gm-title, h1.title) {
  color: var(--gm-accent);
  font-size: 30pt;
  font-weight: 700;
  line-height: var(--gm-line-tight);
  margin: 0;
}
.gamanet-document .gm-title p { margin: 0 0 12pt; }
.gamanet-document :where(.gm-subtitle, p.subtitle) {
  color: var(--gm-gray);
  font-size: 13pt;
  font-weight: 400;
  font-style: normal;
  line-height: var(--gm-line-tight);
}
.gamanet-document .gm-subtitle p { margin-bottom: 7pt; }
.gamanet-document .gm-cover .gm-table-wrap { margin-top: 7pt; }

/* Contents is inserted by Lua at its Word location, never above the cover.
 * No printed Word page numbers: HTML links target the actual headings.
 * First-level rows match the title; deeper rows retain their gray styling.
 */
.gamanet-document .gm-toc { margin: 28pt 0 14pt; }
.gamanet-document .gm-toc-title {
  color: var(--gm-accent);
  font-size: 20pt;
  font-weight: 700;
  line-height: var(--gm-line-small);
  margin: 0 0 5pt;
}
.gamanet-document #TOC { color: var(--gm-toc-text); font-size: 10.5pt; font-weight: 400; }
.gamanet-document #TOC ul { list-style: none; margin: 0; padding: 0; }
.gamanet-document #TOC li { margin: 0; padding: 0; line-height: var(--gm-line-body); }
/* TOC rows are consecutive lines, without body-list paragraph gaps. */
.gamanet-document #TOC li > p,
.gamanet-document #TOC li > .gm-native-list-paragraph > p { margin: 0; }
/* First-level entries use the same dark blue as Contents / Obsah.
 * Nested lists retain their existing gray color below. */
.gamanet-document #TOC > :where(ul, ol) > li { color: var(--gm-accent); }
.gamanet-document #TOC :where(a, a:visited, span, strong, em, b, i) {
  color: inherit;
  font-family: var(--gm-font);
  font-size: inherit;
  font-weight: 400;
  font-style: normal;
  text-decoration: none;
  background: transparent;
}
.gamanet-document #TOC a:hover { text-decoration: underline; }
.gamanet-document #TOC ul ul {
  padding-inline-start: 14pt;
  margin-top: 0;
  color: var(--gm-gray);
  font-size: 10pt;
}

/* Lists: only explicit inline emphasis is bold, not the entire list. */
.gamanet-document :where(ul, ol) { padding-inline-start: 18pt; font-weight: 400; }
.gamanet-document li { margin: 0 0 4pt; padding-inline-start: 0; font-weight: 400; }
.gamanet-document li::marker { font-weight: 400; }
/* List markers come only from semantic ul/ol/li elements. The Lua filter
 * retains Word paragraph wrappers inside existing items without making a
 * second list. Style their paragraphs like ordinary list paragraphs. */
.gamanet-document li > p,
.gamanet-document li > .gm-native-list-paragraph > p { margin-bottom: 4pt; }
.gamanet-document .gm-native-list-paragraph { margin: 0; padding: 0; }
.gamanet-document li :where(ul, ol) { margin-top: 4pt; margin-bottom: 0; }
.gamanet-document .gm-list-continue { margin-inline-start: 18pt; }
.gamanet-document .gm-list-continue-2 { margin-inline-start: 36pt; }
.gamanet-document .gm-list-continue-3 { margin-inline-start: 54pt; }
.gamanet-document ul.task-list { list-style: none; }
.gamanet-document .task-list-item input { margin-inline-end: 5pt; }

/* Tables: source widths, gray header, white body, pale-blue template grid. */
.gamanet-document .gm-table-wrap { width: 100%; margin: 0 0 6pt; overflow-x: auto; }
.gamanet-document table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 9.5pt;
  line-height: var(--gm-line-tight);
  color: var(--gm-text);
  margin: 0;
}
.gamanet-document :where(th, td) {
  border: 0.5pt solid var(--gm-border);
  padding: 3.6pt 5pt;
  vertical-align: middle;
  text-align: start;
  overflow-wrap: anywhere;
  hyphens: manual;
}
.gamanet-document :where(thead th, thead td, .gm-header-cell) {
  color: var(--gm-white);
  background: var(--gm-gray);
  font-weight: 700;
}
.gamanet-document tbody td { background: var(--gm-white); font-weight: 400; }
.gamanet-document tbody .gm-header-cell { background: var(--gm-gray); color: var(--gm-white); font-weight: 700; }
.gamanet-document tbody th:not(.gm-header-cell) { background: var(--gm-white); }
.gamanet-document :where(td, th) :where(p, ul, ol, blockquote) { margin: 0; }
.gamanet-document :where(td, th) li > .gm-native-list-paragraph > p { margin: 0; }
.gamanet-document :where(td, th) p + p { margin-top: 3pt; }
.gamanet-document :where(td, th) li { margin-bottom: 3pt; }
.gamanet-document :where(td, th) li:last-child { margin-bottom: 0; }
.gamanet-document .gm-table-text { font-size: 9.5pt; line-height: var(--gm-line-tight); }
.gamanet-document .gm-table-text p { margin: 0; }
.gamanet-document .gm-table-header { font-size: 9.5pt; line-height: var(--gm-line-tight); font-weight: 700; color: var(--gm-white); }
.gamanet-document .gm-table-header p { margin: 0; }
.gamanet-document :where(thead, .gm-header-cell) a { color: var(--gm-white); }
.gamanet-document :where(thead, .gm-header-cell) .gm-table-text { color: inherit; }
.gamanet-document table .align-center { text-align: center; }
.gamanet-document table .align-right { text-align: right; }
.gamanet-document caption { caption-side: bottom; padding: 5pt 0 0; text-align: start; }

/* Supporting paragraph styles defined in the DOTX. */
.gamanet-document :where(.gm-small-text, .gm-author-guidance) {
  color: var(--gm-gray); font-size: 9pt; line-height: var(--gm-line-small);
}
.gamanet-document .gm-small-text p { margin-bottom: 5pt; }
.gamanet-document .gm-author-guidance { font-style: italic; }
.gamanet-document .gm-author-guidance p { margin-bottom: 8pt; }
.gamanet-document .gm-placeholder { color: var(--gm-gray); line-height: var(--gm-line-small); }
.gamanet-document .gm-placeholder p { margin-bottom: 5pt; }
.gamanet-document .gm-test-text { line-height: var(--gm-line-small); }
.gamanet-document .gm-test-text p { margin-bottom: 5pt; }
.gamanet-document .gm-test-label { color: var(--gm-test-text); font-size: 9pt; font-weight: 700; line-height: var(--gm-line-small); }
.gamanet-document .gm-test-label p { margin-bottom: 5pt; }
.gamanet-document .gm-test-heading-style {
  color: var(--gm-test-text); font-size: 12pt; font-weight: 700;
  line-height: var(--gm-line-small); margin-top: 9pt; margin-bottom: 5pt;
}
.gamanet-document :where(.gm-caption, figcaption, caption) {
  font-size: 9pt; font-weight: 700; line-height: var(--gm-line-single); color: var(--gm-caption);
}
.gamanet-document .gm-caption { margin-top: 5pt; }
.gamanet-document .gm-quote { font-style: italic; color: var(--gm-caption); }
.gamanet-document .gm-intense-quote {
  font-style: italic; font-weight: 700; color: var(--gm-accent);
  margin: 10pt 46.8pt 14pt;
}
.gamanet-document blockquote { margin-inline-start: 18pt; margin-inline-end: 18pt; }
/* Images: use the corporate contain/alignment rules without changing the
 * integration palette, page geometry, TOC, lists, or table typography.
 * The Lua filter supplies image resources; CSS controls only presentation. */
.gamanet-document :where(img, svg, video) { max-width: 100%; height: auto; }
.gamanet-document img { object-fit: contain; vertical-align: middle; }
/* Override fixed Word inline height only when a display width is present.
 * Height-only images retain their authored size; small inline icons stay inline. */
.gamanet-document img.gm-image-responsive { height: auto !important; }
.gamanet-document :where(figure, .gm-figure) {
  max-width: 100%;
  min-width: 0;
  text-align: center;
  break-inside: avoid-page;
}
.gamanet-document figure { margin: 8pt 0; }
.gamanet-document .gm-figure > p { margin: 0; }
.gamanet-document figure img { display: inline-block; }
.gamanet-document figcaption { margin-top: 5pt; }
.gamanet-document .gm-macro { font-family: var(--gm-font); font-size: 10pt; white-space: pre-wrap; }
.gamanet-document pre {
  padding: 7pt 9pt; border: 0.5pt solid var(--gm-border);
  white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.3;
}
.gamanet-document :where(code, kbd, samp) { font-family: "Noto Sans Mono", Consolas, monospace; font-size: 0.95em; }
.gamanet-document pre code { font-size: 9.5pt; }
.gamanet-document hr { border: 0; border-top: 0.5pt solid var(--gm-border); margin: 12pt 0; }
.gamanet-document .footnotes { font-size: 9pt; color: var(--gm-gray); }
.gamanet-document .gm-document-footer {
  margin-top: 18pt; color: var(--gm-caption); font-size: 8pt; line-height: var(--gm-line-single);
}
.gamanet-document .gm-page-break { display: none; }

/* Screen layout stays continuous; chapter/test page breaks apply only to print. */
@media screen and (max-width: 820px) {
  .gamanet-document { margin: 0 auto; }
}
@media screen and (max-width: 600px) {
  .gamanet-document { width: 100%; padding: 22px 18px 30px; }
  .gamanet-document :where(.gm-title, h1.title) { font-size: 25pt; }
  .gamanet-document h1 { font-size: 19pt; }
  .gamanet-document .gm-cover > .gm-first-kicker { margin-top: 36pt; }
  .gamanet-document .gm-intense-quote { margin-inline: 18pt; }
  .gamanet-document table.gm-wide-table { min-width: 540px; }
}
@page { size: A4; margin: 19mm 22mm 18mm; }
@media print {
  body.gamanet-page { background: #FFFFFF; }
  .gamanet-document {
    width: auto; max-width: none; margin: 0; padding: 0;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .gamanet-document .gm-cover { break-after: page; page-break-after: always; }
  .gamanet-document .gm-toc { break-before: page; page-break-before: always; margin-top: 0; }
  .gamanet-document h1:not(.gm-toc-title):not(.title) {
    break-before: page; page-break-before: always; margin-top: 0;
  }
  .gamanet-document .gm-print-test-break {
    break-before: page; page-break-before: always; margin-top: 0;
  }
  .gamanet-document .gm-page-break { display: block; break-before: page; page-break-before: always; }
  .gamanet-document .gm-table-wrap { overflow: visible; }
  .gamanet-document table { table-layout: fixed; width: 100%; min-width: 0; }
  .gamanet-document thead { display: table-header-group; }
  .gamanet-document tfoot { display: table-footer-group; }
  .gamanet-document tr { break-inside: avoid; page-break-inside: avoid; }
  .gamanet-document :where(figure, pre) { break-inside: avoid; page-break-inside: avoid; }
  .gamanet-document a { text-decoration: none; }
}
