/* ==================================================================
   INK & INSTRUMENT — shared site navigation inside the MDX Living Notebook.
   Only the top bar changes. The bar keeps the notebook's own .nb-bar rules
   (fixed, pointer-events pass-through, static-view toggle); this file adds
   the brand, the site links and a no-JS disclosure menu for small screens.
   Nothing here selects inside .stage / .frame / .scene.
   ================================================================== */
.nbx { gap: 18px; justify-content: flex-start; }
.nbx > .nb-bar__right { margin-left: auto; }
.nbx__brand {
  font-family: 'Instrument Serif', Georgia, serif; font-size: 19px; letter-spacing: -.005em;
  color: #1E1C19 !important;
}
.nbx .nb-bar__back { padding-left: 14px !important; margin-left: 0 !important; border-left: 1px solid #D4CBB8; border-radius: 0 3px 3px 0 !important;
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #93401F; }
.nbx__site { display: flex; gap: 20px; margin-left: 10px; }
.nbx__site a { color: #57534B; font-size: 13px; position: relative; }
.nbx__site a::after {
  content: ""; position: absolute; left: 6px; right: 6px; bottom: 10px; height: 5px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 5' preserveAspectRatio='none'%3E%3Cpath d='M1 3.2 C14 1.6 30 2.4 46 2.2 C52 2.1 56 2.8 59 2.4' fill='none' stroke='%23B5552F' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  clip-path: inset(0 100% 0 0); transition: clip-path .32s steps(4, end);
}
.nbx__site a:hover::after, .nbx__site a:focus-visible::after { clip-path: inset(0 0 0 0); }
.nbx .nb-lang { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: .08em; }

/* small screens: a disclosure menu (no script needed) */
.nbx__menu { display: none; position: relative; }
.nbx__menu summary {
  list-style: none; cursor: pointer; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  color: #1E1C19; border-radius: 3px;
}
.nbx__menu summary::-webkit-details-marker { display: none; }
.nbx__menu[open] summary, .on-paper .nbx__menu summary, .static .nbx__menu summary { background: rgba(246, 241, 231, .88); }
.nbx__menu nav {
  position: absolute; top: 48px; left: 0; min-width: 220px; display: grid; padding: 8px 14px 12px;
  background: #F6F1E7; border: 1px solid #D4CBB8; box-shadow: 0 18px 40px -24px rgba(60, 45, 30, .45);
}
.nbx__menu nav a { font-family: 'Instrument Serif', Georgia, serif; font-size: 22px; color: #1E1C19; margin: 0 !important; }

@media (max-width: 1080px) {
  .nbx__site { display: none; }
  .nbx__menu { display: block; }
}
@media (max-width: 560px) {
  .nbx { gap: 8px; }
  .nbx .nbx__brand { display: none; }          /* beats the notebook's own .nb-bar a { display: inline-flex } */
  .nbx .nb-bar__back { border-left: 0; padding-left: 6px !important; }
}
@media (prefers-reduced-motion: reduce) { .nbx__site a::after { transition: none; } }
@media print { .nbx { display: none; } }
