/* Shared breadcrumb shell + theme toggle. Path links stay in each page. */

.breadcrumb-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--bg-nav, rgba(10, 10, 15, 0.92));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 24px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border, #2a2a3a);
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  font-family: var(--sans, 'Inter', system-ui, sans-serif);
}

.breadcrumb-nav a {
  color: var(--accent, #498a9b);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.breadcrumb-nav a:hover {
  text-decoration: underline;
}

.breadcrumb-nav .bc-sep {
  margin: 0 8px;
  color: var(--text-dim, #8888a0);
  flex-shrink: 0;
}

.breadcrumb-nav .bc-current {
  color: var(--text-dim, #8888a0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

body {
  padding-top: 44px !important;
}

/* Toggle inside the breadcrumb (most pages) */
.breadcrumb-nav .theme-toggle {
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border, #2a2a3a);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--text-dim, #8888a0);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.breadcrumb-nav .theme-toggle:hover {
  border-color: var(--accent, #498a9b);
  color: var(--accent, #498a9b);
}

.breadcrumb-nav .theme-toggle svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* Fixed toggle when it sits outside the crumb (home) */
body > .theme-toggle {
  position: fixed;
  top: 7px;
  right: 16px;
  z-index: 10000;
  background: var(--toggle-bg, #1e1e2a);
  border: 1px solid var(--border, #2a2a3a);
  border-radius: 10px;
  padding: 7px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--toggle-icon, #8888a0);
  font-size: 0.82rem;
  font-family: var(--mono, ui-monospace, monospace);
}

body > .theme-toggle:hover {
  border-color: var(--accent, #498a9b);
}

body > .theme-toggle svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme='light'] .theme-toggle .icon-moon {
  display: none;
}

[data-theme='light'] .theme-toggle .icon-sun {
  display: block;
}
