/* Indie10k sidebar header styling for mdBook */
#sidebar { --indie10k-header-h: 56px; }

#sidebar .indie10k-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--sidebar-border-color, rgba(0,0,0,0.08));
  position: sticky;
  top: 0;
  z-index: 102;
  background: var(--sidebar-bg);
}

#sidebar .indie10k-header a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

#sidebar .indie10k-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#sidebar .indie10k-title {
  display: grid;
  grid-auto-flow: row;
  line-height: 1.1;
}

#sidebar .indie10k-name {
  font-weight: 600;
  font-size: 14px;
}

#sidebar .indie10k-subtitle {
  font-size: 11px;
  color: var(--sidebar-muted-color, #6b7280);
}

#sidebar .indie10k-links {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 42px; /* indent to align under text, accounting for logo */
}

#sidebar .indie10k-links a {
  font-size: 12px;
  color: var(--sidebar-fg);
  text-decoration: none;
  opacity: 0.9;
}

#sidebar .indie10k-links a:hover {
  text-decoration: underline;
}

#sidebar .indie10k-links .signup {
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--theme-hover);
}

/* Ensure TOC sits under the fixed header (mdBook sets absolute positioning) */
#sidebar .sidebar-scrollbox {
  top: var(--indie10k-header-h) !important;
}

/* CTA section below content */
.indie10k-cta {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--table-border-color, rgba(0,0,0,0.1));
  border-radius: 8px;
  background: var(--theme-hover);
  text-align: center;
}
.indie10k-cta h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
}
.indie10k-cta p {
  margin: 0 0 1rem 0;
  color: var(--sidebar-muted-color, #6b7280);
}
.indie10k-cta .indie10k-cta-btn {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  text-decoration: none;
  background: var(--links, #2563eb);
  color: #fff;
}
/* Guard against global anchor color overrides */
.indie10k-cta .indie10k-cta-btn:link,
.indie10k-cta .indie10k-cta-btn:visited {
  color: #fff !important;
}
.indie10k-cta .indie10k-cta-btn:hover {
  filter: brightness(0.95);
}

@media print {
  .indie10k-cta { display: none; }
}
