/* GoZen Host — Primary: Deep Navy Blue #1E3A8A */
:root {
  --primary: #1E3A8A;
  --primary-hsl: 224, 64%, 33%;
  --blue: #1E3A8A;
  --blue-500: #1E3A8A;
  --link-color: #1E3A8A;
  --sidebar-primary: #1E3A8A;
  --btn-primary-bg: #1E3A8A;
  --content-link-color: #1E3A8A;
  --bs-primary: #1E3A8A;
  --bs-blue: #1E3A8A;
  --bs-link-color: #1E3A8A;
  --bs-primary-rgb: 30, 58, 138;
  --bs-link-color-rgb: 30, 58, 138;
}

/* Dark mode — muted Slate Blue #94A3B8 to match main site's silver aesthetic */
[data-dark-mode] {
  --primary: #94A3B8;
  --primary-hsl: 215, 16%, 65%;
  --blue: #94A3B8;
  --blue-500: #94A3B8;
  --link-color: #94A3B8;
  --sidebar-primary: #94A3B8;
  --btn-primary-bg: #94A3B8;
  --content-link-color: #94A3B8;
  --bs-primary: #94A3B8;
  --bs-blue: #94A3B8;
  --bs-link-color: #94A3B8;
  --bs-primary-rgb: 148, 163, 184;
  --bs-link-color-rgb: 148, 163, 184;
}

/* ===== Article Typography & Spacing ===== */

/* Heading spacing - give sections clear visual separation */
.main-content h2 {
  margin-top: 2.5rem !important;
  margin-bottom: 1rem !important;
}

.main-content h3 {
  margin-top: 2rem !important;
  margin-bottom: 0.75rem !important;
}

.main-content h4 {
  margin-top: 1.5rem !important;
  margin-bottom: 0.5rem !important;
}

/* The first heading right after the article intro shouldn't have extra top space */
.main-content > h2:first-child,
.main-content > h3:first-child {
  margin-top: 0 !important;
}

/* Paragraph spacing */
.main-content p {
  margin-bottom: 1.25rem;
}

/* List spacing - stop items from being a dense wall */
.main-content ul,
.main-content ol {
  margin-bottom: 1.25rem;
}

.main-content li {
  margin-bottom: 0.35rem;
}

.main-content li:last-child {
  margin-bottom: 0;
}

/* Code block spacing */
.main-content pre {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

/* Table spacing */
.main-content table {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

/* Alert/callout spacing */
.main-content .alert {
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}

/* ===== Custom Logo ===== */

/* Hide the default inline SVG logos */
.sidebar-brand a svg,
.logo-icon .small svg,
.logo-icon .big svg {
  display: none !important;
}

/* Sidebar logo — light mode (full wordmark) */
.sidebar-brand a {
  display: block;
  width: auto;
  height: 100%;
  background-image: url('/images/logos/logo-light.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
}

/* Header/mobile logo — light mode */
.logo-icon {
  display: inline-block;
  width: 40px;
  height: 40px;
  background-image: url('/images/logos/logo-light.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Dark mode — swap to dark variant */
[data-dark-mode] .sidebar-brand a {
  background-image: url('/images/logos/logo-dark.png');
}

[data-dark-mode] .logo-icon {
  background-image: url('/images/logos/logo-dark.png');
}

/* ===== Responsive: Icon logo on mobile/tablet (≤991px) ===== */
@media (max-width: 991px) {

  /* Sidebar logo — compact icon in light mode */
  .sidebar-brand a {
    width: 36px;
    height: 36px;
    background-image: url('/images/logos/logo-icon.png');
    background-position: center;
    /* Icon is white — invert + adjust hue to get navy blue (#1E3A8A) */
    filter: brightness(0) saturate(100%) invert(17%) sepia(63%) saturate(2896%) hue-rotate(215deg) brightness(93%) contrast(96%);
  }

  /* Header logo — compact icon in light mode */
  .logo-icon {
    width: 32px;
    height: 32px;
    background-image: url('/images/logos/logo-icon.png');
    filter: brightness(0) saturate(100%) invert(17%) sepia(63%) saturate(2896%) hue-rotate(215deg) brightness(93%) contrast(96%);
  }

  /* Dark mode mobile — white icon as-is, no filter */
  [data-dark-mode] .sidebar-brand a {
    background-image: url('/images/logos/logo-icon.png');
    filter: none;
  }

  [data-dark-mode] .logo-icon {
    background-image: url('/images/logos/logo-icon.png');
    filter: none;
  }
}