/*
 * KB imported-content styling.
 *
 * The imported manual is rendered Material for MkDocs HTML, wrapped in
 * <article class="md-content__inner md-typeset">. The site theme does not style
 * that vocabulary, so this sheet themes it (typography, tables, code +
 * syntax highlighting, admonitions, collapsibles, images) using the KB brand
 * tokens. Everything is scoped under ".kb-article .md-typeset" so it cannot
 * leak into the global theme.
 */

.kb-article .md-typeset {
  /* Corporate Design roles (mirror the tokens declared on .kb-article). */
  --kb-text: #142F4E;        /* DARK BLUE */
  --kb-muted: #67717A;       /* DARK GREY */
  --kb-faint: #BACDDC;       /* BLUE 20% */
  --kb-brand: #0B4A82;       /* BLUE */
  --kb-brand-hover: #009EEE; /* LIGHT BLUE */
  --kb-border: #BACDDC;      /* BLUE 20% */
  --kb-border-soft: #EDF2F6; /* BLUE 10% */
  --kb-surface-soft: #EDF2F6;
  --kb-code-bg: #f6f8fa;
  --kb-radius: 0.6rem;
  --kb-radius-sm: 0.4rem;

  color: var(--kb-text);
  font-size: 0.95rem;
  line-height: 1.65;
  word-wrap: break-word;
}

/* The Material content wrapper carries layout margins meant for its own theme;
   neutralize them so the body sits flush inside the KB article box. */
.kb-article .md-typeset.md-content__inner,
.kb-article .md-content__inner.md-typeset {
  margin: 0;
  padding: 0;
}

/* ---- Headings ---- */
.kb-article .md-typeset h1,
.kb-article .md-typeset h2,
.kb-article .md-typeset h3,
.kb-article .md-typeset h4,
.kb-article .md-typeset h5,
.kb-article .md-typeset h6 {
  color: var(--kb-text);
  font-weight: 700;
  line-height: 1.25;
  scroll-margin-top: 1.5rem;
}
.kb-article .md-typeset h2 {
  font-size: 1.45rem;
  margin: 2rem 0 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--kb-border-soft);
}
.kb-article .md-typeset h3 { font-size: 1.2rem; margin: 1.6rem 0 0.6rem; }
.kb-article .md-typeset h4 { font-size: 1.05rem; margin: 1.3rem 0 0.5rem; }
.kb-article .md-typeset h5,
.kb-article .md-typeset h6 { font-size: 0.95rem; margin: 1.1rem 0 0.45rem; color: var(--kb-muted); }
.kb-article .md-typeset > :first-child { margin-top: 0; }

/* ---- Text, links, lists ---- */
.kb-article .md-typeset p { margin: 0 0 1rem; }
.kb-article .md-typeset a {
  color: var(--kb-brand);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--kb-c-blue-20, #BACDDC);
  overflow-wrap: anywhere;
}
.kb-article .md-typeset a:hover {
  color: var(--kb-brand-hover);
  text-decoration-color: currentColor;
}

.kb-article .md-typeset ul,
.kb-article .md-typeset ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.kb-article .md-typeset li { margin: 0.3rem 0; }
.kb-article .md-typeset li > ul,
.kb-article .md-typeset li > ol { margin-bottom: 0; }

.kb-article .md-typeset hr {
  border: 0;
  border-top: 1px solid var(--kb-border);
  margin: 1.75rem 0;
}

.kb-article .md-typeset blockquote {
  margin: 0 0 1rem;
  padding: 0.4rem 0 0.4rem 1rem;
  border-left: 3px solid var(--kb-border);
  color: var(--kb-muted);
}

.kb-article .md-typeset sub,
.kb-article .md-typeset sup { line-height: 0; }

/* ---- Images ---- */
.kb-article .md-typeset img {
  max-width: 100%;
  height: auto;
  border-radius: var(--kb-radius-sm);
  border: 1px solid var(--kb-border-soft);
}
.kb-article .md-typeset figure { margin: 1.25rem 0; text-align: center; }
.kb-article .md-typeset figcaption { color: var(--kb-muted); font-size: 0.82rem; margin-top: 0.4rem; }

/* ---- Tables ---- */
.kb-article .md-typeset table {
  display: block;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  border: 1px solid var(--kb-border);
  border-radius: var(--kb-radius-sm);
}
.kb-article .md-typeset table th,
.kb-article .md-typeset table td {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--kb-border);
  vertical-align: top;
  text-align: left;
}
.kb-article .md-typeset table th {
  background: var(--kb-surface-soft);
  font-weight: 700;
  color: var(--kb-text);
}
.kb-article .md-typeset table tbody tr:nth-child(even) { background: #fafbfc; }

/* ---- Inline code ---- */
.kb-article .md-typeset code {
  font-family: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
  font-size: 0.85em;
}
.kb-article .md-typeset p > code,
.kb-article .md-typeset li > code,
.kb-article .md-typeset td > code,
.kb-article .md-typeset a > code {
  background: var(--kb-code-bg);
  border: 1px solid var(--kb-border-soft);
  border-radius: 0.3rem;
  padding: 0.1em 0.35em;
  color: var(--kb-danger, #C0392B);
}

/* ---- Code blocks (Pygments) ---- */
.kb-article .md-typeset .highlight,
.kb-article .md-typeset pre {
  margin: 0 0 1.25rem;
}
.kb-article .md-typeset .highlight pre,
.kb-article .md-typeset pre {
  background: var(--kb-code-bg);
  border: 1px solid var(--kb-border-soft);
  border-radius: var(--kb-radius-sm);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.55;
}
.kb-article .md-typeset .highlight pre code,
.kb-article .md-typeset pre code {
  background: none;
  border: 0;
  padding: 0;
  color: var(--kb-text);
  white-space: pre;
}
/* Pygments line-number table (rare): keep the gutter subtle, drop borders. */
.kb-article .md-typeset .highlighttable { display: block; overflow-x: auto; border: 0; }
.kb-article .md-typeset .highlighttable td { border: 0; padding: 0; }
.kb-article .md-typeset .highlighttable .linenos,
.kb-article .md-typeset .linenodiv pre { color: var(--kb-faint); user-select: none; }

/* Pygments token colors (GitHub-light-like, neutral and brand-compatible). */
.kb-article .md-typeset .highlight .c,
.kb-article .md-typeset .highlight .ch,
.kb-article .md-typeset .highlight .cm,
.kb-article .md-typeset .highlight .cp,
.kb-article .md-typeset .highlight .cpf,
.kb-article .md-typeset .highlight .c1,
.kb-article .md-typeset .highlight .cs { color: #6e7781; font-style: italic; }
.kb-article .md-typeset .highlight .k,
.kb-article .md-typeset .highlight .kc,
.kb-article .md-typeset .highlight .kd,
.kb-article .md-typeset .highlight .kn,
.kb-article .md-typeset .highlight .kp,
.kb-article .md-typeset .highlight .kr,
.kb-article .md-typeset .highlight .kt { color: #cf222e; }
.kb-article .md-typeset .highlight .o,
.kb-article .md-typeset .highlight .ow { color: #0550ae; }
.kb-article .md-typeset .highlight .s,
.kb-article .md-typeset .highlight .sa,
.kb-article .md-typeset .highlight .sb,
.kb-article .md-typeset .highlight .sc,
.kb-article .md-typeset .highlight .dl,
.kb-article .md-typeset .highlight .sd,
.kb-article .md-typeset .highlight .s2,
.kb-article .md-typeset .highlight .se,
.kb-article .md-typeset .highlight .sh,
.kb-article .md-typeset .highlight .si,
.kb-article .md-typeset .highlight .sx,
.kb-article .md-typeset .highlight .sr,
.kb-article .md-typeset .highlight .s1,
.kb-article .md-typeset .highlight .ss { color: #0a3069; }
.kb-article .md-typeset .highlight .m,
.kb-article .md-typeset .highlight .mb,
.kb-article .md-typeset .highlight .mf,
.kb-article .md-typeset .highlight .mh,
.kb-article .md-typeset .highlight .mi,
.kb-article .md-typeset .highlight .mo,
.kb-article .md-typeset .highlight .il { color: #0550ae; }
.kb-article .md-typeset .highlight .na,
.kb-article .md-typeset .highlight .nb,
.kb-article .md-typeset .highlight .bp { color: #0550ae; }
.kb-article .md-typeset .highlight .nc,
.kb-article .md-typeset .highlight .nn,
.kb-article .md-typeset .highlight .nf,
.kb-article .md-typeset .highlight .fm { color: #8250df; }
.kb-article .md-typeset .highlight .nv,
.kb-article .md-typeset .highlight .vc,
.kb-article .md-typeset .highlight .vg,
.kb-article .md-typeset .highlight .vi { color: #953800; }
.kb-article .md-typeset .highlight .nt { color: #116329; }
.kb-article .md-typeset .highlight .err { color: #cf222e; }

/* ---- Admonitions & collapsibles ---- */
.kb-article .md-typeset .admonition,
.kb-article .md-typeset details[class] {
  --kb-adm: var(--kb-brand);
  --kb-adm-bg: var(--kb-surface-soft);
  --kb-adm-icon: "\f05a";
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--kb-adm-bg);
  border: 1px solid var(--kb-border-soft);
  border-left: 4px solid var(--kb-adm);
  border-radius: var(--kb-radius-sm);
  font-size: 0.9rem;
}
.kb-article .md-typeset .admonition > :last-child,
.kb-article .md-typeset details[class] > :last-child { margin-bottom: 0; }

.kb-article .md-typeset .admonition-title,
.kb-article .md-typeset details[class] > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-weight: 700;
  color: var(--kb-text);
}
.kb-article .md-typeset .admonition-title::before,
.kb-article .md-typeset details[class] > summary::before {
  content: var(--kb-adm-icon);
  font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free";
  font-weight: 300;
  color: var(--kb-adm);
  font-size: 1rem;
  flex: 0 0 auto;
}

/* Collapsible specifics */
.kb-article .md-typeset details[class] { padding-bottom: 0.85rem; }
.kb-article .md-typeset details[class] > summary {
  cursor: pointer;
  list-style: none;
  margin-bottom: 0;
}
.kb-article .md-typeset details[class][open] > summary { margin-bottom: 0.6rem; }
.kb-article .md-typeset details[class] > summary::-webkit-details-marker { display: none; }
.kb-article .md-typeset details[class] > summary::after {
  content: "\f054";
  font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free";
  font-weight: 300;
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--kb-muted);
  transition: transform 0.15s ease;
}
.kb-article .md-typeset details[class][open] > summary::after { transform: rotate(90deg); }

/* Type palette + icon (covers MkDocs Material types and common aliases). */
.kb-article .md-typeset .admonition.info, .kb-article .md-typeset details.info,
.kb-article .md-typeset .admonition.todo, .kb-article .md-typeset details.todo,
.kb-article .md-typeset .admonition.note, .kb-article .md-typeset details.note {
  --kb-adm: var(--kb-brand); --kb-adm-bg: var(--kb-surface-soft); --kb-adm-icon: "\f05a";
}
.kb-article .md-typeset .admonition.tip, .kb-article .md-typeset details.tip,
.kb-article .md-typeset .admonition.hint, .kb-article .md-typeset details.hint,
.kb-article .md-typeset .admonition.important, .kb-article .md-typeset details.important {
  --kb-adm: var(--kb-c-green, #92D14F); --kb-adm-bg: #eef7e3; --kb-adm-icon: "\f0eb";
}
.kb-article .md-typeset .admonition.success, .kb-article .md-typeset details.success,
.kb-article .md-typeset .admonition.check, .kb-article .md-typeset details.check,
.kb-article .md-typeset .admonition.done, .kb-article .md-typeset details.done {
  --kb-adm: var(--kb-c-green, #92D14F); --kb-adm-bg: #eef7e3; --kb-adm-icon: "\f058";
}
.kb-article .md-typeset .admonition.warning, .kb-article .md-typeset details.warning,
.kb-article .md-typeset .admonition.caution, .kb-article .md-typeset details.caution,
.kb-article .md-typeset .admonition.attention, .kb-article .md-typeset details.attention {
  --kb-adm: var(--kb-c-orange, #FF9660); --kb-adm-bg: #fff1e9; --kb-adm-icon: "\f071";
}
.kb-article .md-typeset .admonition.danger, .kb-article .md-typeset details.danger,
.kb-article .md-typeset .admonition.error, .kb-article .md-typeset details.error,
.kb-article .md-typeset .admonition.failure, .kb-article .md-typeset details.failure,
.kb-article .md-typeset .admonition.fail, .kb-article .md-typeset details.fail,
.kb-article .md-typeset .admonition.bug, .kb-article .md-typeset details.bug {
  --kb-adm: var(--kb-c-red, #C0392B); --kb-adm-bg: #f9e9e7; --kb-adm-icon: "\f06a";
}
.kb-article .md-typeset .admonition.question, .kb-article .md-typeset details.question,
.kb-article .md-typeset .admonition.help, .kb-article .md-typeset details.help,
.kb-article .md-typeset .admonition.faq, .kb-article .md-typeset details.faq {
  --kb-adm: var(--kb-brand-hover, #009EEE); --kb-adm-bg: #e3f4fd; --kb-adm-icon: "\f059";
}
.kb-article .md-typeset .admonition.abstract, .kb-article .md-typeset details.abstract,
.kb-article .md-typeset .admonition.summary, .kb-article .md-typeset details.summary,
.kb-article .md-typeset .admonition.tldr, .kb-article .md-typeset details.tldr {
  --kb-adm: var(--kb-muted); --kb-adm-bg: #eef1f4; --kb-adm-icon: "\f0ea";
}
.kb-article .md-typeset .admonition.example, .kb-article .md-typeset details.example,
.kb-article .md-typeset .admonition.quote, .kb-article .md-typeset details.quote,
.kb-article .md-typeset .admonition.cite, .kb-article .md-typeset details.cite {
  --kb-adm: var(--kb-text); --kb-adm-bg: var(--kb-surface-soft); --kb-adm-icon: "\f10d";
}

/* ==========================================================================
   Confluence-imported content (".kb-confluence")
   Confluence "export_view" uses a different HTML vocabulary than MkDocs.
   These rules normalize its code panels, embedded images and information
   macros onto the same look as the MkDocs-sourced articles above. Generic
   elements (img, pre, table, code, headings, lists) are already covered by
   the ".md-typeset" rules since the body is wrapped in ".md-typeset".
   ========================================================================== */

/* ---- Click-to-enlarge affordance (both sources) ---- */
.kb-article .md-typeset img.kb-zoomable { cursor: zoom-in; }

/* ---- Code macro ----
   Strip Confluence's panel chrome so the inner <pre> uses the shared
   code-block styling (background, border, radius, padding). */
.kb-article .md-typeset .code.panel,
.kb-article .md-typeset .codeContent {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.kb-article .md-typeset .code.panel { margin: 0 0 1.25rem; }
.kb-article .md-typeset .code.panel pre,
.kb-article .md-typeset pre.syntaxhighlighter-pre { margin: 0; }

/* ---- Embedded images ---- */
.kb-article .md-typeset .confluence-embedded-file-wrapper {
  display: inline-block;
  max-width: 100%;
}
.kb-article .md-typeset .confluence-embedded-file-wrapper img { display: block; }

/* ---- Information macros (info / note / warning / tip) ----
   Confluence markup:
   <div class="confluence-information-macro confluence-information-macro-warning">
     <p class="title">…</p><span class="aui-icon …"></span>
     <div class="confluence-information-macro-body">…</div>
   </div>
   Re-themed to match the MkDocs admonition look. */
.kb-article .md-typeset .confluence-information-macro {
  --kb-adm: var(--kb-brand);
  --kb-adm-bg: var(--kb-surface-soft);
  --kb-adm-icon: "\f05a";
  position: relative;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem 0.85rem 2.7rem;
  background: var(--kb-adm-bg);
  border: 1px solid var(--kb-border-soft);
  border-left: 4px solid var(--kb-adm);
  border-radius: var(--kb-radius-sm);
  font-size: 0.9rem;
}
.kb-article .md-typeset .confluence-information-macro > .title {
  margin: 0 0 0.4rem;
  font-weight: 700;
  color: var(--kb-text);
}
.kb-article .md-typeset .confluence-information-macro-body > :last-child,
.kb-article .md-typeset .confluence-information-macro > :last-child { margin-bottom: 0; }
/* Replace Confluence's sprite icon with a Font Awesome glyph (as admonitions). */
.kb-article .md-typeset .confluence-information-macro .confluence-information-macro-icon,
.kb-article .md-typeset .confluence-information-macro .aui-icon { display: none; }
.kb-article .md-typeset .confluence-information-macro::before {
  content: var(--kb-adm-icon);
  font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free";
  font-weight: 300;
  position: absolute;
  left: 1rem;
  top: 0.9rem;
  color: var(--kb-adm);
  font-size: 1rem;
}
.kb-article .md-typeset .confluence-information-macro-tip {
  --kb-adm: var(--kb-c-green, #92D14F); --kb-adm-bg: #eef7e3; --kb-adm-icon: "\f0eb";
}
.kb-article .md-typeset .confluence-information-macro-note,
.kb-article .md-typeset .confluence-information-macro-warning {
  --kb-adm: var(--kb-c-orange, #FF9660); --kb-adm-bg: #fff1e9; --kb-adm-icon: "\f071";
}
.kb-article .md-typeset .confluence-information-macro-error {
  --kb-adm: var(--kb-c-red, #C0392B); --kb-adm-bg: #f9e9e7; --kb-adm-icon: "\f06a";
}
