/* The Veldt palette (The Saturday Evening Post, September 23, 1950).
   Savanna Gold #E68926, Lion Rust #BC4E22, Nursery Sky #588CBA,
   Wall White #EEF2F0, Shade #292925 */

@import url("https://fonts.googleapis.com/css2?family=Fira+Sans+Condensed:wght@500;600&family=Ubuntu:ital,wght@0,400;0,500;1,400&family=Ubuntu+Mono:wght@400;700&display=swap");

:root {
  --bs-body-font-family: Ubuntu, sans-serif;
  --bs-font-monospace: "Ubuntu Mono", monospace;
}

/* Fonts */
body,
p,
li,
.nav-link,
.table {
  font-family: Ubuntu, sans-serif;
}

h1,
h2,
h3,
h4,
#toc-title {
  font-family: "Fira Sans Condensed", sans-serif;
}

code,
pre,
kbd {
  font-family: "Ubuntu Mono", monospace;
}

/* Light mode */
body {
  background-color: #FFFFFF;
  color: #292925;
}

h1,
h2,
h3,
h4 {
  color: #292925;
}

a {
  color: #BC4E22;
}

a:hover {
  color: #3D6F9C;
}

/* great-docs sets its link color variable on :root (black in light
   mode) and loads after this file, so set the light values on body */
body:not(.quarto-dark) {
  --gd-link-color: #BC4E22;
  --gd-active-link: #BC4E22;
}

/* great-docs paints links inside paragraphs black ("p a"); keep them
   Lion Rust in light mode */
body:not(.quarto-dark) :is(p, li) a {
  color: #BC4E22;
}

body:not(.quarto-dark) :is(p, li) a:hover {
  color: #3D6F9C;
}

/* Savanna Gold stripe under the navbar in both modes (great-docs' own
   .navbar rule loads later, so this needs more weight) */
html body .navbar {
  border-bottom: 3px solid #E68926 !important;
}

/* Inline code: small Lion Rust pill on softened Wall White */
:not(pre) > code {
  color: #BC4E22;
  background-color: #F5F7F6;
  padding: 0.1em 0.3em;
  border-radius: 0.25rem;
}

/* Code blocks: softened Wall White */
pre,
div.sourceCode {
  background-color: #F5F7F6 !important;
  border: 1px solid rgba(41, 41, 37, 0.15);
}

pre code {
  background-color: transparent !important;
}

/* Dark mode: great-docs sets both markers */
body.quarto-dark,
[data-bs-theme="dark"] body {
  background-color: #292925;
  color: #EEF2F0;
}

body.quarto-dark :is(h1, h2, h3, h4) {
  color: #EEF2F0;
}

body.quarto-dark a {
  color: #E68926;
}

body.quarto-dark a:hover {
  color: #588CBA;
}

body.quarto-dark :not(pre) > code {
  color: #E68926;
  background-color: rgba(238, 242, 240, 0.08);
}

body.quarto-dark pre,
body.quarto-dark div.sourceCode {
  background-color: rgba(238, 242, 240, 0.06) !important;
  border-color: rgba(238, 242, 240, 0.15);
}

/* Mermaid: diagrams stay light (great-docs fixes the theme), so set
   them on Wall White in both modes with a Shade border */
.cell-output-display:has(.mermaid-js) {
  background: #F5F7F6;
  border-color: rgba(41, 41, 37, 0.25);
}

body.quarto-dark .cell-output-display:has(.mermaid-js) {
  background: #EEF2F0;
  border-color: #E68926;
}

svg.mermaid-js .edgeLabel,
svg.mermaid-js .edgeLabel p {
  background-color: #F5F7F6 !important;
}

/* Dark page surfaces: Shade instead of great-docs' near black */
html.quarto-dark,
body.quarto-dark {
  --gd-bg-primary: #292925;
  --gd-bg-secondary: #31312D;
  --gd-bg-tertiary: #3A3A35;
  --gd-sidebar-bg: #292925;
  --gd-navbar-bg: #1E1E1B;
  --gd-text-primary: #EEF2F0;
  --gd-link-color: #E68926;
  --gd-active-link: #E68926;
  --gd-code-bg: rgba(238, 242, 240, 0.08);
  --gd-code-color: #E68926;
  --gd-border-color: rgba(238, 242, 240, 0.15);
}

/* Diagram colors for nodes without their own style line. Diagrams keep
   these in dark mode too (a header script stops great-docs repainting
   them), since they sit on a Wall White panel */
:root,
body,
body.quarto-dark {
  --mermaid-bg-color: #F5F7F6;
  --mermaid-node-bg-color: #FFFFFF;
  --mermaid-node-fg-color: #292925;
  --mermaid-fg-color: #292925;
  --mermaid-fg-color--lighter: #5A5A55;
  --mermaid-fg-color--lightest: #8A8A84;
  --mermaid-edge-color: #292925;
  --mermaid-label-bg-color: #F5F7F6;
  --mermaid-label-fg-color: #292925;
}

/* great-docs paints every label <p> #333 in dark mode; let labels keep
   their node's text color */
body.quarto-dark svg.mermaid-js .nodeLabel :is(p, code, span, div) {
  color: inherit !important;
}

/* Edges and edge labels: mermaid draws them with its own lightgrey
   inside each SVG (ID selectors), which is faint on the Wall White
   panel, so force Shade in both modes */
svg.mermaid-js .flowchart-link,
svg.mermaid-js path.relation,
svg.mermaid-js .messageLine0,
svg.mermaid-js .messageLine1 {
  stroke: #292925 !important;
}

svg.mermaid-js marker path,
svg.mermaid-js .arrowheadPath,
svg.mermaid-js .arrowMarkerPath {
  fill: #292925 !important;
  stroke: #292925 !important;
}

svg.mermaid-js .edgeLabel,
svg.mermaid-js .edgeLabel :is(p, span, div),
svg.mermaid-js .labelBkg {
  color: #292925 !important;
  background-color: #F5F7F6 !important;
}

svg.mermaid-js .edgeLabel rect {
  fill: #F5F7F6 !important;
}
