/**
 * UPSC Notes — embed shell overrides (loaded by Next.js NoteContent).
 * Layout / navigation chrome only. Does not style note body cards.
 *
 * Sticky stack on note pages:
 *   1. Site navbar     — top: 0,     height: 4rem  (h-16)
 *   2. Breadcrumb bar  — top: 4rem,  height: 2.25rem (h-9)
 *   3. Note sidebar / mobnav — top: 6.25rem
 */

.note-page {
  --note-navbar-h: 4rem;
  --note-breadcrumb-h: 2.25rem;
}

.note-page .note-content-root {
  --note-nav-offset: calc(var(--note-navbar-h) + var(--note-breadcrumb-h));
}

.note-content-root {
  width: 100%;
  min-height: 60vh;
}

.note-content-root .note-content {
  width: 100%;
}

/* Break out of site max-width container */
.note-content-root .layout,
.note-content-root #layout,
.note-content-root .wrap.flex,
.note-content-root > .note-content > .layout,
.note-content-root > .note-content > #layout,
.note-content-root > .note-content > .wrap {
  max-width: none;
  width: 100%;
  margin: 0;
}

/* Sticky sidebars sit below navbar + breadcrumb */
.note-content-root #sidebar,
.note-content-root .sidebar,
.note-content-root aside.sidebar,
.note-content-root aside#sidebar,
.note-content-root .wrap.flex > nav.toc,
.note-content-root .wrap > nav.toc[data-sidebar] {
  top: var(--note-nav-offset, 6.25rem) !important;
  height: calc(100vh - var(--note-nav-offset, 6.25rem)) !important;
  max-height: calc(100vh - var(--note-nav-offset, 6.25rem)) !important;
  z-index: 30;
}

/* Mobile section jump bar */
.note-content-root .mobnav {
  top: var(--note-nav-offset, 6.25rem) !important;
  z-index: 30;
}

/* Legacy mobile top TOC (modern-india) */
.note-content-root .layout > .toc,
.note-content-root body > .toc {
  top: var(--note-nav-offset, 6.25rem) !important;
}

/* Hero bands: avoid negative-margin clipping inside embed */
.note-content-root .hero,
.note-content-root .titlewrap,
.note-content-root header.hero,
.note-content-root header.top {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.note-content-root main .hero {
  border-radius: 0 0 16px 16px;
}

/* Scroll margin for anchored headings (full sticky chrome) */
.note-content-root [id] {
  scroll-margin-top: calc(var(--note-nav-offset, 6.25rem) + 0.75rem);
}

/* Hide duplicate inline TOC once note uses sidebar shell */
.note-content-root nav.toc.toc-inline-duplicate {
  display: none !important;
}

/* Savai wordmark strip above note content */
.note-page .savai-note-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: #fff8e6;
  border-bottom: 1px solid #ffe08a;
  font-size: 12px;
  font-weight: 600;
  color: #b87200;
  font-family: system-ui, -apple-system, sans-serif;
}

.note-page .savai-note-badge span {
  color: #945c00;
}
