.site-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
  user-select: none;
}

.bolt-site-logo {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.bolt-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-left: auto;
  border-radius: 999px;
  color: #6f7785;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.bolt-sidebar-toggle:hover {
  background: #e8f1ff;
  color: #1a6dff;
}

@media (min-width: 50rem) {
  body .side-bar {
    left: 0 !important;
    width: 16.5rem !important;
    min-width: 16.5rem !important;
  }

  body .main {
    margin-left: 16.5rem !important;
    width: calc(100% - 16.5rem) !important;
    max-width: none !important;
  }

  body .main-content-wrap {
    width: 100% !important;
    max-width: none !important;
    justify-content: flex-start !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body .main-content {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 1.5rem;
    padding-right: 3rem;
  }

  .side-bar,
  .main {
    transition: width 0.2s ease, margin-left 0.2s ease;
  }

  .bolt-sidebar-collapsed .side-bar {
    width: 4.5rem !important;
    min-width: 4.5rem !important;
  }

  .bolt-sidebar-collapsed .main {
    margin-left: 4.5rem !important;
    width: calc(100% - 4.5rem) !important;
  }

  .bolt-sidebar-collapsed .site-title {
    position: relative;
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    font-size: 0;
    gap: 0.25rem;
    overflow: visible;
  }

  .bolt-sidebar-collapsed .bolt-sidebar-toggle {
    position: absolute;
    top: 50%;
    right: -0.85rem;
    width: 1.8rem;
    height: 1.8rem;
    margin-left: 0;
    background: #1a6dff;
    box-shadow: 0 0.25rem 0.75rem rgba(26, 109, 255, 0.28);
    color: #ffffff;
    font-size: 1.25rem;
    transform: translateY(-50%);
    z-index: 20;
  }

  .bolt-sidebar-collapsed .bolt-sidebar-toggle:hover {
    background: #1555cc;
    color: #ffffff;
  }

  .bolt-sidebar-collapsed .site-nav,
  .bolt-sidebar-collapsed .site-footer {
    display: none !important;
  }
}

.bolt-hero-logo {
  display: block;
  width: min(30rem, 82%);
  height: auto;
  object-fit: contain;
  margin: 0 auto 1.75rem;
}

.bolt-overview-lead {
  max-width: none;
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem;
  border-left: 0.25rem solid #1a6dff;
  border-radius: 0.5rem;
  background: linear-gradient(90deg, rgba(26, 109, 255, 0.08), rgba(26, 109, 255, 0.02));
}

.bolt-overview-lead p {
  margin: 0;
  color: #3f4654;
  font-size: 1.05rem;
  line-height: 1.75;
}

.bolt-overview-lead p + p {
  margin-top: 0.85rem;
}

.site-nav,
.nav-list,
.blog-post-links {
  scrollbar-width: thin;
}

.side-bar {
  overflow-y: auto;
}

.site-nav {
  max-height: calc(100vh - 7.5rem);
  overflow-y: auto;
  padding-bottom: 1rem;
}

body .site-nav > .nav-list > .nav-list-item > .nav-list-link {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45rem;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.blog-nav-item {
  position: relative;
}

.blog-nav-item > .nav-list-link {
  padding-right: 2rem;
}

.blog-toggle-button {
  position: absolute;
  top: 0.15rem;
  right: 0.35rem;
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: #6f7785;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.5rem;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.blog-toggle-button:hover {
  background: #e8f1ff;
}

.blog-posts-collapsed .blog-toggle-button {
  transform: rotate(-90deg);
}

.blog-post-links {
  display: block !important;
  max-height: 9.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-top: 0.25rem;
  padding-left: 0.75rem;
  border-left: 1px solid #e6e6ef;
}

.blog-posts-collapsed .blog-post-links {
  display: none !important;
}

.blog-post-links .nav-list-link {
  font-size: 0.88rem;
  line-height: 1.25rem;
}

.post-meta {
  color: #6f7785;
  font-size: 0.9rem;
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
}

.post-list {
  padding-left: 1.25rem;
}

/* Darken blog post content so body text and key details remain prominent. */
body .main-content {
  color: #1f2937;
}

body .main-content h1,
body .main-content h2,
body .main-content h3 {
  color: #111827;
}

body .main-content strong {
  color: #111827;
  font-weight: 700;
}

body .main-content code {
  color: #1850b8;
}

body .main-content table th {
  background: #f3f4f6;
  color: #111827;
  font-weight: 600;
}

body .main-content .note {
  border-left: 0.3rem solid #1a6dff;
}

@media (max-width: 50rem) {
  .site-nav {
    max-height: calc(100vh - 5rem);
  }

  .blog-post-links {
    max-height: 8rem;
  }

  .bolt-hero-logo {
    width: min(24rem, 92%);
  }
}

/* ============================================================
   Feature cards (added on home page below the hero lead)
   ============================================================ */
.bolt-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0 0 2rem;
}

.bolt-cards .card {
  border: 1px solid #e6e6ef;
  border-radius: 0.75rem;
  padding: 1.25rem;
  height: 100%;
  background: #ffffff;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.bolt-cards .card:hover {
  transform: translateY(-3px);
  border-color: #1a6dff;
  box-shadow: 0 0.75rem 1.75rem rgba(26, 109, 255, 0.12);
}

.bolt-cards .card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.bolt-cards .card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5rem;
  color: #4b5563;
}

@media (max-width: 50rem) {
  .bolt-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   Dark mode (toggled by .bolt-dark on <body>, see head_custom.html)
   ============================================================ */
body.bolt-dark {
  background: #0d1117;
  color: #c9d1d9;
}

body.bolt-dark .side-bar,
body.bolt-dark .main-content-wrap {
  background: #0d1117;
}

body.bolt-dark .side-bar {
  border-right: 1px solid #21262d;
}

body.bolt-dark .site-title,
body.bolt-dark .main-content {
  color: #c9d1d9;
}

body.bolt-dark .main-content h1,
body.bolt-dark .main-content h2,
body.bolt-dark .main-content h3,
body.bolt-dark .main-content h4 {
  color: #e6edf3;
}

body.bolt-dark .main-content strong { color: #e6edf3; }
body.bolt-dark .main-content a { color: #58a6ff; }
body.bolt-dark .main-content code { color: #79c0ff; background: #161b22; }

body.bolt-dark .site-nav .nav-list-link { color: #c9d1d9; }
body.bolt-dark .site-nav .nav-list-link:hover { background: #161b22; }
body.bolt-dark .nav-list-item .nav-list-link.active { color: #58a6ff; }

body.bolt-dark .search-input {
  background: #161b22;
  color: #c9d1d9;
  border-color: #21262d;
}

body.bolt-dark .bolt-overview-lead {
  border-left-color: #58a6ff;
  background: linear-gradient(90deg, rgba(56, 139, 253, 0.12), rgba(56, 139, 253, 0.03));
}
body.bolt-dark .bolt-overview-lead p { color: #c9d1d9; }

body.bolt-dark .bolt-cards .card {
  background: #161b22;
  border-color: #21262d;
}
body.bolt-dark .bolt-cards .card p { color: #9da7b3; }
body.bolt-dark .bolt-cards .card:hover {
  border-color: #58a6ff;
  box-shadow: 0 0.75rem 1.75rem rgba(56, 139, 253, 0.18);
}

body.bolt-dark .bolt-sidebar-toggle { color: #8b949e; }
body.bolt-dark .bolt-sidebar-toggle:hover { background: #161b22; color: #58a6ff; }
body.bolt-dark .blog-toggle-button { color: #8b949e; }
body.bolt-dark .blog-toggle-button:hover { background: #161b22; }
body.bolt-dark .blog-post-links { border-left-color: #21262d; }
body.bolt-dark .main-content table th { background: #161b22; color: #e6edf3; }

/* Theme toggle button (far right of the top aux-nav toolbar) */
.aux-nav .aux-nav-list { align-items: stretch; }
.aux-nav .aux-nav-list-item.bolt-theme-toggle-item {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  padding-right: 1rem;
}
.bolt-theme-toggle {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  border: 1px solid #e6e6ef;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
}
.bolt-theme-toggle:hover { border-color: #1a6dff; }
body.bolt-dark .bolt-theme-toggle {
  background: #161b22;
  border-color: #21262d;
}

/* Dark mode: fix leftover light areas (top aux nav bar, header) */
body.bolt-dark .main-header,
body.bolt-dark .aux-nav,
body.bolt-dark .aux-nav-list,
body.bolt-dark .search {
  background: #0d1117;
}
body.bolt-dark .main-header { border-bottom: 1px solid #21262d; }
body.bolt-dark .aux-nav-list-item a,
body.bolt-dark .site-button { color: #c9d1d9; }
body.bolt-dark .search-input::placeholder { color: #6e7681; }
body.bolt-dark .search-input { background: #161b22 !important; color: #c9d1d9 !important; }
body.bolt-dark .search-results { background: #161b22; border-color: #21262d; }
/* Soften hero logo white background in dark mode */
body.bolt-dark .bolt-hero-logo {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

/* Dark mode: active nav item highlight */
body.bolt-dark .site-nav .nav-list-item > .nav-list-link.active {
  background: #161b22;
  color: #58a6ff;
}
body.bolt-dark .nav-list-link.active::before { background: #58a6ff; }

/* ============================================================
   Readable line length: cap main content width, left-aligned.
   Container stays full-width; text is constrained for readability.
   ============================================================ */
@media (min-width: 50rem) {
  body .main-content {
    max-width: 72rem !important;   /* widened */
    margin-left: auto !important;
    margin-right: auto !important;
  }
  /* Feature cards may span wider than the text column */
  body .main-content .bolt-cards {
    max-width: 64rem;
  }
}

/* ============================================================
   Dark mode: brighten sidebar text for readability (high priority).
   Overrides theme defaults that dim nav/footer/search text.
   ============================================================ */
body.bolt-dark .side-bar { background: #0d1117; }
body.bolt-dark .site-nav .nav-list .nav-list-item .nav-list-link {
  color: #e6edf3 !important;
}
body.bolt-dark .site-nav .nav-list .nav-list-item .nav-list-link:hover {
  background: #21262d !important;
  color: #ffffff !important;
}
body.bolt-dark .site-nav .nav-list .nav-list-item .nav-list-link.active {
  color: #79c0ff !important;
  background: #161b22 !important;
}
/* Blog sub-post links a touch softer but still clearly readable */
body.bolt-dark .blog-post-links .nav-list-link { color: #c9d1d9 !important; }
/* Sidebar footer ("This site uses Just the Docs...") */
body.bolt-dark .site-footer,
body.bolt-dark .site-footer a { color: #8b949e !important; }
/* Search input + placeholder */
body.bolt-dark .search-input { color: #e6edf3 !important; }
body.bolt-dark .search-input::placeholder { color: #9da7b3 !important; }
/* Nav icons (e.g. external link/github chevrons) inherit brighter color */
body.bolt-dark .site-nav svg { fill: #e6edf3 !important; }

/* ============================================================
   Dark mode: code blocks (fix white strips on dark pages).
   Give fenced code a dark surface + light syntax tokens.
   ============================================================ */
body.bolt-dark div.highlighter-rouge,
body.bolt-dark div.listingblock > div.content,
body.bolt-dark figure.highlight {
  background-color: #161b22 !important;
}
body.bolt-dark div.highlighter-rouge div.highlight {
  border-color: #30363d !important;
  background-color: #161b22 !important;
}
body.bolt-dark div.highlighter-rouge pre.highlight,
body.bolt-dark div.highlighter-rouge code,
body.bolt-dark figure.highlight pre,
body.bolt-dark pre.highlight {
  background-color: #161b22 !important;
  color: #e6edf3 !important;
}
/* Copy button glyph visible on dark */
body.bolt-dark div.highlighter-rouge > button,
body.bolt-dark figure.highlight > button { color: #8b949e !important; }
body.bolt-dark div.highlighter-rouge > button svg,
body.bolt-dark figure.highlight > button svg { fill: #8b949e !important; }
/* Syntax token colors (GitHub dark palette) */
body.bolt-dark .highlight .c,
body.bolt-dark .highlight .c1,
body.bolt-dark .highlight .cm,
body.bolt-dark .highlight .cs { color: #8b949e !important; }
body.bolt-dark .highlight .k,
body.bolt-dark .highlight .kd,
body.bolt-dark .highlight .kn,
body.bolt-dark .highlight .kt { color: #ff7b72 !important; }
body.bolt-dark .highlight .s,
body.bolt-dark .highlight .s1,
body.bolt-dark .highlight .s2,
body.bolt-dark .highlight .sb { color: #a5d6ff !important; }
body.bolt-dark .highlight .n,
body.bolt-dark .highlight .nv,
body.bolt-dark .highlight .nn { color: #e6edf3 !important; }
body.bolt-dark .highlight .nf,
body.bolt-dark .highlight .nt { color: #d2a8ff !important; }
body.bolt-dark .highlight .mi,
body.bolt-dark .highlight .mf,
body.bolt-dark .highlight .m { color: #79c0ff !important; }
body.bolt-dark .highlight .o,
body.bolt-dark .highlight .p { color: #e6edf3 !important; }

/* ============================================================
   Dark mode: tables + standalone inline code white backgrounds.
   ============================================================ */
body.bolt-dark .main-content th,
body.bolt-dark .main-content td {
  background-color: #0d1117 !important;
  color: #e6edf3 !important;
  border-bottom: 1px solid #30363d !important;
  border-left: 1px solid #30363d !important;
}
body.bolt-dark .main-content thead th {
  background-color: #161b22 !important;
  border-bottom: 1px solid #30363d !important;
}
/* Inline code chips outside pre/figure */
body.bolt-dark .main-content :not(pre, figure) > code {
  background-color: #161b22 !important;
  border: 1px solid #30363d !important;
  color: #79c0ff !important;
}

/* ============================================================
   Resizable sidebar: drag the right edge to change width.
   A CSS var drives both the sidebar width and the main margin.
   Desktop only (>= 50rem); mobile keeps the theme's full-width nav.
   ============================================================ */
:root { --bolt-sidebar-width: 16.5rem; }
@media (min-width: 50rem) {
  body.bolt-resizable-ready .side-bar {
    width: var(--bolt-sidebar-width) !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  body.bolt-resizable-ready .side-bar + .main {
    margin-left: var(--bolt-sidebar-width) !important;
    width: calc(100vw - var(--bolt-sidebar-width)) !important;
    max-width: calc(100vw - var(--bolt-sidebar-width)) !important;
    box-sizing: border-box;
  }
  /* Content shrinks with the main area and stays centered (cap 72rem) */
  body.bolt-resizable-ready .main-content,
  body.bolt-resizable-ready .main-content-wrap { min-width: 0 !important; }

  /* Sidebar inner panels fill the (resized) sidebar width and left-align,
     so a wider sidebar actually gives nav text more room on one line
     instead of just adding empty space on the left. */
  body.bolt-resizable-ready .side-bar { align-items: stretch !important; }
  body.bolt-resizable-ready .site-nav,
  body.bolt-resizable-ready .site-header,
  body.bolt-resizable-ready .site-footer {
    width: 100% !important;
  }
  /* Let long nav labels use the extra width on a single line */
  body.bolt-resizable-ready .site-nav .nav-list-link { white-space: nowrap; }
  /* Drag handle sits on the sidebar's right edge */
  .bolt-sidebar-resizer {
    position: fixed;
    top: 0;
    left: calc(var(--bolt-sidebar-width) - 3px);
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 1100;
    background: transparent;
    transition: background-color 0.15s ease;
  }
  .bolt-sidebar-resizer:hover,
  .bolt-sidebar-resizer.bolt-dragging {
    background: rgba(26, 109, 255, 0.35);
  }
  body.bolt-dark .bolt-sidebar-resizer:hover,
  body.bolt-dark .bolt-sidebar-resizer.bolt-dragging {
    background: rgba(88, 166, 255, 0.4);
  }
  /* While dragging, kill text selection + iframe capture */
  body.bolt-resizing { user-select: none; cursor: col-resize; }
  body.bolt-resizing * { pointer-events: none; }
  body.bolt-resizing .bolt-sidebar-resizer { pointer-events: auto; }
}
/* Hide the resizer on mobile where sidebar is full-width */
@media (max-width: 49.99rem) {
  .bolt-sidebar-resizer { display: none !important; }
}
