/* Slightly wider measure and calmer code blocks than the stock theme. */
.quarto-title-block .description {
  font-size: 1.05rem;
  opacity: 0.85;
}

pre.sourceCode {
  border-radius: 6px;
}

/* Mermaid diagrams. Quarto's own colours read badly in both themes (grey boxes
   with blue text in light, a white slab in dark), so set them here. Centred
   because a narrow diagram hugging the left margin looks unfinished. */
svg.mermaid-js {
  display: block;
  margin: 0 auto;
}

svg.mermaid-js .cluster rect {
  fill: transparent !important;
  stroke: #adb5bd !important;
}

svg.mermaid-js .node rect {
  fill: #f1f3f5 !important;
  stroke: #adb5bd !important;
}

svg.mermaid-js .nodeLabel,
svg.mermaid-js .nodeLabel *,
svg.mermaid-js .cluster-label,
svg.mermaid-js .cluster-label * {
  color: #212529 !important;
  fill: #212529 !important;
}

svg.mermaid-js .flowchart-link {
  stroke: #6c757d !important;
}

svg.mermaid-js marker path {
  fill: #6c757d !important;
  stroke: #6c757d !important;
}

.quarto-dark svg.mermaid-js .cluster rect {
  stroke: #6c757d !important;
}

.quarto-dark svg.mermaid-js .node rect {
  fill: #343a40 !important;
  stroke: #868e96 !important;
}

.quarto-dark svg.mermaid-js .nodeLabel,
.quarto-dark svg.mermaid-js .nodeLabel *,
.quarto-dark svg.mermaid-js .cluster-label,
.quarto-dark svg.mermaid-js .cluster-label * {
  color: #dee2e6 !important;
  fill: #dee2e6 !important;
}

.quarto-dark svg.mermaid-js .flowchart-link {
  stroke: #adb5bd !important;
}

.quarto-dark svg.mermaid-js marker path {
  fill: #adb5bd !important;
  stroke: #adb5bd !important;
}

/* Mermaid edge labels, readable on both themes. */
svg.mermaid-js .edgeLabel,
svg.mermaid-js .edgeLabel p,
svg.mermaid-js .edgeLabel span {
  color: #495057 !important;
  background-color: #ffffff !important;
}

.quarto-dark svg.mermaid-js .edgeLabel,
.quarto-dark svg.mermaid-js .edgeLabel p,
.quarto-dark svg.mermaid-js .edgeLabel span {
  color: #dee2e6 !important;
  background-color: #222222 !important;
}

/* Wide diagrams scroll sideways on a phone instead of shrinking to nothing. */
@media (max-width: 767px) {
  .cell-output-display figure > div:has(> svg.mermaid-js) {
    overflow-x: auto;
  }

  svg.mermaid-js {
    min-width: 640px;
  }
}

/* Hand drawn SVG figures. The drawings use currentColor, so they follow the
   theme, and carry their light theme accent colours themselves, so they still
   render correctly if a browser holds an old copy of this file. A wide drawing
   shows on desktop and a narrow one on phones; the narrow one is hidden by its
   own hidden attribute, not by this file. */
.viz-figure {
  display: block;
  margin: 1.75rem 0;
}

.viz-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.viz-figure .viz-narrow {
  max-width: 420px;
  margin: 0 auto;
}

.viz-figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  opacity: 0.75;
}

/* !important because Bootstrap forces [hidden] to display: none !important. */
@media screen and (max-width: 575.98px) {
  .viz-figure .viz-wide {
    display: none;
  }

  .viz-figure .viz-narrow {
    display: block !important;
  }
}

@media print {
  /* Keep a figure and its caption on one printed page. */
  .viz-figure {
    break-inside: avoid;
  }

  .viz-figure .viz-wide {
    display: block !important;
  }

  .viz-figure .viz-narrow {
    display: none !important;
  }
}

.viz-accent-fill {
  fill: #2563eb;
}

.viz-accent-stroke {
  stroke: #2563eb;
}

.viz-accent-soft {
  fill: #2563eb;
  fill-opacity: 0.1;
}

.quarto-dark .viz-accent-fill {
  fill: #60a5fa;
}

.quarto-dark .viz-accent-stroke {
  stroke: #60a5fa;
}

.quarto-dark .viz-accent-soft {
  fill: #60a5fa;
  fill-opacity: 0.14;
}

.viz-grass {
  fill: #5aa469;
}

.quarto-dark .viz-grass {
  fill: #4a8f55;
}

/* Cookie choice for Google Analytics, see _analytics.html. */
.cookie-box {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 2000;
  box-sizing: border-box;
  width: min(22rem, calc(100% - 2rem));
  padding: 0.9rem 1rem;
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, inherit);
  border: 1px solid rgba(127, 127, 127, 0.35);
  border-radius: 0.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  font-size: 0.875rem;
}
.cookie-box p { margin: 0 0 0.75rem; }
.cookie-buttons { display: flex; gap: 0.5rem; }
/* Both answers look the same, so rejecting is as easy as accepting. */
.cookie-box .btn.cookie-btn {
  flex: 1;
  padding: 0.35rem 0.75rem;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(150, 150, 150, 0.9);
  border-radius: 999px;
}
.cookie-box .btn.cookie-btn:hover,
.cookie-box .btn.cookie-btn:focus-visible { background: rgba(127, 127, 127, 0.18); }
@media print { .cookie-box { display: none; } }

/* Newsletter signup box, added after every post and on the home and about pages. */
.subscribe {
  margin: 3rem 0 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(127, 127, 127, 0.35);
  border-radius: 0.5rem;
}
.subscribe-title { font-weight: 600; font-size: 1.15rem; margin-bottom: 0.25rem; }
.subscribe-lead { margin-bottom: 0.75rem; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.subscribe-form .form-control { flex: 1 1 14rem; width: auto; min-width: 0; }
.subscribe-note { font-size: 0.85rem; opacity: 0.75; margin: 0.75rem 0 0; }
.subscribe-status { margin: 0.75rem 0 0; font-weight: 600; }
/* Compact version in the right sidebar on wide screens. */
.subscribe.subscribe-side { margin: 1.5rem 0 0; padding: 0.9rem 1rem; font-size: 0.9rem; }
.subscribe-side .subscribe-title { font-size: 1rem; }
.subscribe-side .subscribe-lead { margin-bottom: 0.6rem; }
.subscribe-side .subscribe-form .form-control,
.subscribe-side .subscribe-form .btn { flex: 1 1 100%; }
.subscribe-side .subscribe-note { font-size: 0.78rem; }
@media print { .subscribe { display: none; } }
/* Calm theme preview: hairlines instead of fills, quiet underlined links. */
.navbar { border-bottom: 1px solid rgba(127, 127, 127, 0.25); box-shadow: none; }
main a, .quarto-listing a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.quarto-post .listing-title a, .quarto-listing .listing-title { text-decoration: none; }
.quarto-category, .listing-categories .listing-category { border-radius: 999px; opacity: 0.8; }
h1, h2, h3, .title { letter-spacing: -0.01em; }
p, li { line-height: 1.65; }

/* Same navbar height in light and dark, so switching doesn't make the page
   jump. The dark theme (darkly) otherwise doubles the padding. */
.navbar { --bs-navbar-padding-y: 0.5rem; }

/* Light and dark switch: a moon while the page is light, a sun while it is
   dark, from the same icon font as the GitHub and LinkedIn icons. Replaces
   Quarto's on/off switch, which didn't say what it switched. The round tap
   area is about 44px, but takes no extra room in the navbar. */
.navbar .quarto-color-scheme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: -0.5rem 0;
  padding: 0 !important;
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
/* The glyphs sit a little high in their box; this centres them on the search icon. */
.navbar .quarto-color-scheme-toggle .bi { display: block; line-height: 1; transform: translateY(0.1em); }
.navbar .quarto-color-scheme-toggle:hover,
.navbar .quarto-color-scheme-toggle:focus-visible {
  background-color: rgba(127, 127, 127, 0.15);
}
.navbar .quarto-color-scheme-toggle .bi::before,
.navbar .quarto-color-scheme-toggle:not(.alternate) .bi::before,
.navbar .quarto-color-scheme-toggle.alternate .bi::before {
  width: auto;
  height: auto;
  background-image: none;
  font-family: "bootstrap-icons" !important;
  display: block;
  font-size: 1.15rem;
  line-height: 1;
}
.navbar .quarto-color-scheme-toggle:not(.alternate) .bi::before { content: "\f497"; } /* moon */
.navbar .quarto-color-scheme-toggle.alternate .bi::before { content: "\f5a2"; }       /* sun */
/* On phones, keep the switch next to search on the right, not next to the name. */
@media (max-width: 991.98px) {
  .navbar .quarto-navbar-tools { margin-left: auto; }
  .navbar #quarto-search { margin-left: 0; }
}
