/* The product guide's design language (documentation/house/doc.py: BRAND, _MONO, _SANS).
   Dark: the guide's own page. Light: the same teal family as text and rules on white, with the
   lime kept as a tick beside a teal edge, because lime text is unreadable on white.
   Every colour on the site is one of these tokens. Material sets html{font-size:125%}. */
:root {
  --mx-bg: #0f2b2e;
  --mx-panel: #1a4044;
  --mx-well: #0a2124;
  --mx-rule: #24555a;
  --mx-text: #d3dcdc;
  --mx-muted: #8fa3a5;
  --mx-strong: #f2f6f6;
  --mx-lime: #deff00;
  --mx-mono: "DejaVu Sans Mono", "JetBrains Mono", Consolas, monospace;
  --mx-sans: Carlito, Lato, Calibri, "Liberation Sans", Arial, sans-serif;
  --md-text-font-family: var(--mx-sans);
  --md-code-font-family: var(--mx-mono);
  --md-radius: 6px;
}
[data-md-color-scheme="default"] {
  --mx-page: #ffffff;
  --mx-ink: var(--mx-bg);
  --mx-ink-strong: var(--mx-well);
  --mx-ink-muted: color-mix(in srgb, var(--mx-bg) 62%, #ffffff);
  --mx-line: color-mix(in srgb, var(--mx-rule) 28%, #ffffff);
  --mx-surface: color-mix(in srgb, var(--mx-well) 4%, #ffffff);
  --mx-accent: var(--mx-rule);
  --mx-tick: linear-gradient(90deg, var(--mx-bg) 0 1px, var(--mx-lime) 1px 100%);
  --mx-shadow: 0 1px 3px color-mix(in srgb, var(--mx-bg) 14%, transparent);
  --md-default-bg-color: var(--mx-page);
  --md-default-fg-color: var(--mx-ink);
  --md-default-fg-color--light: var(--mx-ink-muted);
  --md-default-fg-color--lighter: color-mix(in srgb, var(--mx-bg) 35%, #ffffff);
  --md-default-fg-color--lightest: var(--mx-line);
  --md-primary-fg-color: var(--mx-accent);
  --md-primary-fg-color--light: var(--mx-muted);
  --md-primary-fg-color--dark: var(--mx-bg);
  --md-accent-fg-color: var(--mx-bg);
  --md-typeset-a-color: var(--mx-rule);
  --md-code-bg-color: var(--mx-surface);
  --md-code-fg-color: var(--mx-bg);
}
[data-md-color-scheme="slate"] {
  --mx-page: var(--mx-bg);
  --mx-ink: var(--mx-text);
  --mx-ink-strong: var(--mx-strong);
  --mx-ink-muted: var(--mx-muted);
  --mx-line: var(--mx-rule);
  --mx-surface: var(--mx-panel);
  --mx-accent: var(--mx-lime);
  --mx-tick: linear-gradient(90deg, var(--mx-lime) 0 100%);
  --mx-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  --md-hue: 185;
  --md-default-bg-color: var(--mx-bg);
  --md-default-fg-color: var(--mx-text);
  --md-default-fg-color--light: var(--mx-muted);
  --md-default-fg-color--lighter: color-mix(in srgb, var(--mx-muted) 60%, transparent);
  --md-default-fg-color--lightest: var(--mx-rule);
  --md-primary-fg-color: var(--mx-lime) !important;
  --md-primary-fg-color--light: var(--mx-muted) !important;
  --md-primary-fg-color--dark: var(--mx-bg) !important;
  --md-accent-fg-color: var(--mx-lime) !important;
  --md-typeset-a-color: var(--mx-lime) !important;
  --md-code-bg-color: var(--mx-well);
  --md-code-fg-color: var(--mx-strong);
  --md-code-hl-keyword-color: var(--mx-muted);
  --md-code-hl-name-color: var(--mx-muted);
  --md-code-hl-function-color: var(--mx-muted);
  --md-code-hl-constant-color: var(--mx-muted);
  --md-code-hl-variable-color: var(--mx-muted);
  --md-code-hl-string-color: var(--mx-strong);
  --md-code-hl-number-color: var(--mx-strong);
  --md-code-hl-special-color: var(--mx-strong);
  --md-code-hl-operator-color: var(--mx-text);
  --md-code-hl-punctuation-color: var(--mx-text);
  --md-code-hl-generic-color: var(--mx-strong);
  --md-code-hl-comment-color: color-mix(in srgb, var(--mx-muted) 75%, transparent);
}

body,
.md-typeset,
.md-header,
.md-tabs,
.md-nav {
  font-family: var(--mx-sans);
}
.md-typeset {
  font-size: clamp(0.75rem, 1.8vw, 0.8rem);
  font-weight: 400;
  line-height: 1.6;
}
.md-typeset strong {
  color: var(--mx-ink-strong);
}

/* Headings: the guide's monospace at normal weight; an H2 opens with a short lime rule. */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  font-family: var(--mx-mono);
  font-weight: 400;
  color: var(--mx-ink-strong);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.md-typeset h1 {
  font-size: clamp(1.2rem, 5vw, 1.6rem);
  line-height: 1.25;
}
.md-typeset h2 {
  font-size: clamp(0.92rem, 3.5vw, 1.15rem);
  line-height: 1.25;
  margin-top: 2.4em;
}
.md-typeset h2::before {
  content: "";
  display: block;
  width: 2.2rem;
  height: 2px;
  background: var(--mx-tick);
  margin-bottom: 0.9em;
}
.md-typeset h1 + h2 {
  margin-top: 1.2em;
}
.md-typeset h3 {
  font-size: clamp(0.8rem, 2.8vw, 0.95rem);
  line-height: 1.25;
}
.md-typeset h4 {
  font-size: 0.8rem;
}

/* The guide's small uppercase, letter-spaced monospace label (`IN THE UI`, `CONFIGURATION`). */
.md-typeset .mx-label {
  display: block;
  font-family: var(--mx-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mx-ink-muted);
  margin: 1.6em 0 0.4em;
}

/* The layout: Material centres every row (header, tabs, content) inside `.md-grid`. 60rem
   leaves the text column at a comfortable reading width next to the left navigation. */
.md-grid {
  max-width: 60rem;
}

/* Mermaid diagrams: use the site font (not Mermaid's default Trebuchet) at a
   comfortable size, so labels read cleanly and match the rest of the docs. */
.mermaid,
.mermaid .nodeLabel,
.mermaid .edgeLabel,
.mermaid .cluster-label,
.mermaid span,
.mermaid p,
.mermaid div {
  font-family: var(--md-text-font-family, var(--md-text-font, sans-serif)) !important;
}
.mermaid .nodeLabel,
.mermaid .nodeLabel *,
.mermaid .edgeLabel,
.mermaid .edgeLabel * {
  font-size: 15px;
  line-height: 1.4;
}

/* Edge labels (prompt, clean prompt, ...): blend the label background into the
   page so it reads as plain text instead of a boxed rectangle. */
.mermaid .edgeLabel,
.mermaid .edgeLabel p,
.mermaid .edgeLabel span,
.mermaid .edgeLabel div,
.mermaid .edgeLabel foreignObject div,
.mermaid .edgeLabels .edgeLabel {
  background-color: transparent !important;
  color: var(--md-default-fg-color) !important;
}
.mermaid .edgeLabel rect,
.mermaid .edgeLabels rect,
.mermaid .edgeLabel .label rect {
  fill: transparent !important;
  stroke: none !important;
  opacity: 0 !important;
}

/* Uppercase the filter and tool-scan content (not the client/LLM nodes, which
   keep normal case). Mermaid adds the classDef name as a CSS class on the node. */
.mermaid .content .nodeLabel,
.mermaid .content .nodeLabel *,
.mermaid .betacontent .nodeLabel,
.mermaid .betacontent .nodeLabel *,
.mermaid g.node.content .nodeLabel,
.mermaid g.node.betacontent .nodeLabel {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 14px;
}

/* Mermaid subgraph (cluster) titles: bigger and cleaner. Applies to the
   architecture diagram. All cluster titles read bolder; the outer "MATVIS
   firewall" is the largest and brand-green, with "Inbound" / "Outbound" a step
   below. Both fill (SVG text) and color (HTML labels) are set for robustness. */
.mermaid .cluster-label,
.mermaid .cluster-label span,
.mermaid .cluster-label p {
  font-weight: 700;
  font-size: 1.3em;
}

/* Remove the hover pilcrow (¶) permalink from every heading, sitewide. */
.md-typeset .headerlink {
  display: none;
}

/* Filter sections (Firewall config): lay the intro text and its screenshot
   side by side (text left, capture right) so each filter reads as a compact,
   professional block instead of a full-width image. Stacks on narrow screens. */
/* Tools page only (scoped via the invisible .page-tools marker): separate the
   h3 subsections (Tool call checks / Tool response checks) with a hairline rule
   above each heading. The marker itself is hidden. */
.page-tools {
  display: none;
}
.md-typeset:has(.page-tools) h3 {
  border-top: 1px solid var(--md-default-fg-color--lightest);
  margin-top: 2.4em;
  padding-top: 1.6em;
}

/* Status badges (Firewall analytics status list): small coloured pills that
   mirror the dashboard's status colours. Green = allowed, red = blocked,
   amber = passed-with-a-note (bypassed / pseudonymized / allowlisted). */
.md-typeset .st {
  display: inline-block;
  padding: 0.05em 0.5em;
  border-radius: 0.4rem;
  font-weight: 500;
  font-size: 0.9em;
  white-space: nowrap;
}
/* Status badges mirror the app's Label "soft" variant colours (success / error
   / warning / info / secondary / disabled). */
.md-typeset .st--green {
  color: #0e7048;
  background-color: rgba(34, 197, 94, 0.16);
}
.md-typeset .st--red {
  color: #b71d18;
  background-color: rgba(255, 86, 48, 0.16);
}
.md-typeset .st--amber {
  color: #8f5600;
  background-color: rgba(255, 171, 0, 0.16);
}
.md-typeset .st--blue {
  color: #006c9c;
  background-color: rgba(0, 184, 217, 0.16);
}
.md-typeset .st--violet {
  color: #5119b7;
  background-color: rgba(142, 51, 255, 0.16);
}
.md-typeset .st--gray {
  color: #637381;
  background-color: rgba(145, 158, 171, 0.16);
}
[data-md-color-scheme="slate"] .md-typeset .st--green {
  color: #77ed8b;
}
[data-md-color-scheme="slate"] .md-typeset .st--red {
  color: #ffac82;
}
[data-md-color-scheme="slate"] .md-typeset .st--amber {
  color: #ffd666;
}
[data-md-color-scheme="slate"] .md-typeset .st--blue {
  color: #61f3f3;
}
[data-md-color-scheme="slate"] .md-typeset .st--violet {
  color: #c684ff;
}
[data-md-color-scheme="slate"] .md-typeset .st--gray {
  color: #c4cdd5;
}
.md-typeset .tabbed-content {
    padding-left: 1rem;
}

::selection {
  background-color: color-mix(in srgb, var(--mx-lime) 55%, transparent);
  color: var(--mx-bg);
}
.md-typeset .highlight {
  border: 1px solid var(--mx-line);
}
/* Inside content tabs the tab panel is already the container, so drop the code
   block's own border/shadow (they otherwise poke past the panel edge). */
.md-typeset .tabbed-set .highlight {
  border: none;
  box-shadow: none;
}

/* Branded 404 page (overrides/404.html). */
.md-typeset .not-found {
  max-width: 40rem;
  margin: 0 auto;
  padding: 4rem 1rem;
  text-align: center;
}
.md-typeset .not-found__code {
  margin: 0;
  font-family: var(--md-text-font-family, sans-serif);
  font-weight: 800;
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 1;
  color: var(--md-primary-fg-color);
}
.md-typeset .not-found__title {
  margin: 0.2rem 0 0.6rem;
}
.md-typeset .not-found__lead {
  margin: 0 auto 1.6rem;
  max-width: 30rem;
  color: var(--md-default-fg-color--light);
}
.md-typeset .not-found .md-button--primary {
  background-color: var(--md-primary-fg-color);
  border-color: var(--md-primary-fg-color);
  color: var(--mx-page);
}

/* Code blocks (and their highlight wrapper). */
.md-typeset pre > code {
  border-radius: var(--md-radius);
}
.md-typeset .highlight,
.md-typeset .highlighttable {
  border-radius: var(--md-radius);
  box-shadow: var(--mx-shadow);
}
/* Content tabs (=== "..."): round the label bar and the panel. */
.md-typeset .tabbed-set {
  border-radius: var(--md-radius);
  overflow: hidden;
  box-shadow: var(--mx-shadow);
}

/* Sub-entries inside a "mother" grid card (e.g. Deployment → Integrations:
   an Overview link on top, then Open WebUI divided below, all within
   the one card). Each sub-row is separated by a hairline rule. */
/* Deployment landing: "mother" cards, each holding sub-cards (Overview on top,
   then Open WebUI below), styled like the dashboard panels. */
.md-typeset .mcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1rem;
  margin: 1em 0;
}
.md-typeset .mcard {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: var(--md-radius);
  box-shadow: var(--mx-shadow);
  padding: 1.1rem 1.2rem 1.2rem;
}
.md-typeset .mcard > h3 {
  margin: 0 0 0.3rem;
}
.md-typeset .mcard > p {
  margin: 0 0 0.9rem;
  color: var(--md-default-fg-color--light);
  font-size: 0.85em;
}

/* --- Pro polish: scrollbars, table interactions, focus rings, link hover --- */

/* Thin brand-toned scrollbars. */
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--mx-muted) 70%, transparent) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--mx-muted) 55%, transparent);
  border: 2px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background-color: var(--mx-muted);
}

/* Tables as in the guide: no box, hairline rows, uppercase monospace column heads, a bold
   first column. */
.md-typeset table:not([class]) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  font-size: 0.72rem;
}
.md-typeset table:not([class]) th {
  background: transparent;
  color: var(--mx-ink-muted);
  font-family: var(--mx-mono);
  font-weight: 400;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--mx-line);
}
.md-typeset table:not([class]) td {
  border-top: 0;
  border-bottom: 1px solid var(--mx-line);
}
.md-typeset table:not([class]) td:first-child {
  font-weight: 700;
  color: var(--mx-ink-strong);
}
.md-typeset table:not([class]) tbody tr:hover {
  background-color: transparent;
  box-shadow: none;
}

/* --- Pro polish II: typography & element detailing (no content changes) --- */

html {
  scroll-behavior: smooth;
}

/* Inline code on the code-block background, without a border, so a run of names reads as text. */
.md-typeset :not(pre):not(.highlight) > code {
  background-color: var(--md-code-bg-color);
  border: none;
  border-radius: 4px;
  padding: 0.15em 0.5em;
  font-size: 0.86em;
}

/* Blockquotes and callouts as in the guide: larger text behind a lime bar, no box, no icon. */
.md-typeset blockquote {
  border-left: 0;
  padding: 0.1rem 0 0.1rem 1rem;
  background: var(--mx-tick) left / 3px 100% no-repeat;
  color: var(--mx-ink-strong);
  font-size: 0.9rem;
}

/* Keyboard keys. */
.md-typeset kbd {
  border-radius: 5px;
}


/* Inline code in tables (field names, type names) should not break mid-token.
   The table scrolls horizontally if a row gets too wide, which is preferable to
   splitting an identifier like `ToolResponseInput` across two lines. */
.md-typeset table:not([class]) code {
  white-space: nowrap;
}

/* Admonitions: the guide's callout. A lime bar, no box, no icon, the title as a small label. */
.md-typeset .admonition,
.md-typeset .admonition[class] {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--mx-tick) left / 3px 100% no-repeat;
  padding: 0.1rem 0 0.1rem 1rem;
  margin-left: 0;
  font-size: 0.8rem;
  color: var(--mx-ink-strong);
}
.md-typeset .admonition > .admonition-title,
.md-typeset .admonition[class] > .admonition-title {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0 0 0.3em;
  font-family: var(--mx-mono);
  font-weight: 400;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mx-ink-muted);
}
.md-typeset .admonition > .admonition-title::before,
.md-typeset .admonition > .admonition-title::after {
  display: none;
}
.md-typeset .admonition > :last-child {
  margin-bottom: 0.2em;
}
.md-typeset details {
  border-radius: var(--md-radius);
  box-shadow: none;
  margin-left: 0;
}
.md-typeset__table {
  display: block;
  box-sizing: border-box;
  width: 100%;
}
.md-typeset__table table:not([class]) {
  display: table;
  width: 100%;
}
/* Collapsible blocks (examples, reference lists) in the neutral border of the other boxes,
   whatever their type: they hold reference material, not a warning. Callouts that do not
   collapse keep their colour. */
.md-typeset details,
.md-typeset details[class],
.md-typeset details > summary,
.md-typeset details[class] > summary {
  border-color: var(--md-default-fg-color--lightest);
  background-color: transparent;
}
.md-typeset details[class] > summary::before,
.md-typeset details[class] > summary::after {
  background-color: var(--md-default-fg-color--light);
}
.md-typeset details[class]:focus-within {
  box-shadow: none;
}
.md-typeset details > summary:focus:not(:focus-visible) {
  outline: none;
}


/* Line breaks: no single word left alone on a paragraph's last line, and headings that wrap
   break into even lines. */
.md-typeset p,
.md-typeset li,
.md-typeset td {
  text-wrap: pretty;
}
