/* User Provided Stylesheet */

/* ============================================================
   nanobeam-course — custom theming on top of MyST book-theme.
   Loaded via `site.options.style` in myst.yml.

   Light-mode brand: deep blue / RGB 0 63 92 / #003F5C.
   Dark-mode accent: normalized RGB (0, 0.7, 1) / #00B3FF.
   Light-mode highlight: PMS 7459 / RGB 66 152 181 / #4298B5.
   Dark-mode highlight: deep blue / #2D6F91.
   Lighter tints are used in dark mode for accessible contrast.
   ============================================================ */

:root {
  --nbc-brand: #003f5c;
  --nbc-accent: var(--nbc-brand);
  --nbc-highlight: #4298b5;
  --nbc-highlight-soft: rgba(66, 152, 181, 0.16);
  --nbc-highlight-contrast: #002b3a;
}
html.dark {
  --nbc-accent: #cddce5;
  --nbc-highlight: #2d6f91;
  --nbc-highlight-soft: rgba(45, 111, 145, 0.24);
  --nbc-highlight-contrast: #fff;
}

/* ---------- Site title (upper-left) ---------- */
.myst-home-link,
.myst-home-link span {
  color: var(--nbc-accent) !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.myst-home-link:hover span {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}
.myst-home-link-logo {
  margin-right: 0.5rem !important;
}
.myst-home-link-logo img {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
}

/* ---------- Top-nav links ---------- */
.myst-top-nav-item {
  font-weight: 500;
}
.myst-top-nav-item a:hover,
.myst-top-nav-dropdown button:hover {
  color: var(--nbc-accent);
}
.myst-top-nav-dropdown button svg {
  color: var(--nbc-highlight);
}
.myst-top-nav-dropdown {
  position: relative;
  overflow: visible;
}
.myst-top-nav-dropdown-items {
  top: 100% !important;
  right: auto !important;
  bottom: auto !important;
  left: 0 !important;
  z-index: 100;
  max-height: calc(100vh - 5rem);
  margin-top: 0.5rem !important;
  overflow-y: auto;
  transform-origin: top left !important;
}
.myst-top-nav-dropdown-item:hover,
.myst-top-nav-dropdown-item:focus {
  background-color: var(--nbc-highlight-soft) !important;
}

/* On desktop, place the primary page tabs beside the site title. The explicit
   sidebar rule also covers a dev server that has retained an older copy of the
   MyST layout configuration. */
@media (min-width: 1024px) {
  .myst-primary-sidebar {
    display: none !important;
  }

  .myst-top-nav-bar {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    column-gap: 0.5rem;
  }
  .myst-top-nav-bar > :first-child {
    grid-column: 1;
    grid-row: 1;
  }
  .myst-top-nav-bar > :last-child {
    display: contents;
  }
  .myst-top-nav-bar > :last-child > :first-child {
    display: flex !important;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: start;
    gap: 0.25rem;
    overflow: visible;
    padding: 0;
    white-space: nowrap;
  }
  .myst-top-nav-bar > :last-child > :nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  .myst-top-nav-bar > :last-child > :nth-child(3) {
    grid-column: 3;
    grid-row: 1;
  }
  .myst-top-nav-bar .nbc-search {
    grid-column: 3;
    grid-row: 1;
  }
  .myst-theme-button {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
    margin-left: auto;
  }
  .myst-top-nav-item {
    display: flex;
    align-items: center;
    margin: 0;
  }
  .myst-top-nav-dropdown {
    display: flex;
    align-items: center;
    margin: 0 !important;
    z-index: 50;
  }
  .myst-top-nav-dropdown button {
    margin: 0 !important;
    padding: 0.4rem 0.65rem;
    line-height: inherit;
    cursor: pointer;
  }
  .myst-top-nav-item > a {
    margin: 0;
    padding: 0.4rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 0.4rem;
  }
  .myst-top-nav-item > a:hover {
    background-color: var(--nbc-highlight-soft);
  }
  .myst-top-nav-item > a.border-b {
    color: var(--nbc-accent);
    background-color: var(--nbc-highlight-soft);
    border-color: var(--nbc-highlight);
  }
}

/* Keep the light/dark toggle at the far-right edge on smaller layouts too. */
.myst-theme-button {
  margin-left: auto !important;
}

/* ---------- Article links ----------
   Scoped to <article> so the home-link and navbar controls keep
   their own colors. */
article a:not(.myst-home-link),
article .link,
article .hover-link {
  color: var(--nbc-accent) !important;
}

/* The theme crops hover-preview thumbnails to a 150px-tall banner. Keep the
   full portrait visible in the Team page preview used by the User Program. */
.hover-card-content img[src*="/Ribet-"] {
  height: auto !important;
  object-fit: contain !important;
  object-position: center;
}

/* Cards: accent title, neutral body text */
article a.myst-card {
  color: inherit !important;
}
article a.myst-card .myst-card-title {
  color: var(--nbc-accent);
}
article a.myst-card:hover {
  border-color: var(--nbc-highlight) !important;
}

/* The Publications page already contains complete citations. MyST also
   derives a bibliography from its DOI links, so suppress that duplicate. */
article:has(> #papers):has(> #patents) .myst-bibliography {
  display: none;
}

/* Resource cards link their papers inline, so the generated bibliography is
   also redundant on the Open-Source Code page. */
article:has(> #maped):has(> #py4dstem) .myst-bibliography {
  display: none;
}

/* ---------- Places book-theme still uses Tailwind blue ---------- */
.myst-tab-item-header-active {
  color: var(--nbc-accent) !important;
  border-bottom-color: var(--nbc-highlight) !important;
}
.myst-toc-item.active,
.myst-toc-item-exact {
  background-color: var(--nbc-highlight-soft) !important;
}
.myst-toc-item:focus,
.myst-toc-item:focus-visible {
  outline-color: var(--nbc-highlight) !important;
}
.myst-code-copy-icon {
  color: var(--nbc-accent) !important;
}
.myst-code-copy-icon:hover {
  opacity: 0.7;
}
.outline-blue-200 {
  outline-color: var(--nbc-highlight-soft) !important;
}
button.myst-search-bar:hover {
  border-color: var(--nbc-highlight) !important;
  --tw-ring-color: var(--nbc-highlight) !important;
}

/* ---------- Code blocks ----------
   book-theme leaves `pre` at overflow-x: visible, so one long line pushes
   the whole page sideways on narrow screens. Scroll inside the block
   instead, and never let it widen the article. */
article pre {
  max-width: 100%;
  overflow-x: auto;
}

/* ---------- Inline code spans ---------- */
:not(pre) > code {
  color: var(--nbc-accent);
}
html.dark :not(pre) > code {
  color: var(--nbc-accent);
}

/* Keep content dropdowns neutral against the black dark-mode background. */
html.dark .myst-dropdown {
  border-color: rgba(255, 255, 255, 0.2) !important;
  background-color: transparent !important;
}
html.dark .myst-dropdown-header {
  color: var(--nbc-accent) !important;
  background-color: rgba(255, 255, 255, 0.09) !important;
}
html.dark .myst-dropdown-header:hover {
  background-color: rgba(255, 255, 255, 0.14) !important;
}
html.dark .myst-dropdown-body {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

/* ---------- Left sidebar ----------
   Smaller type, tighter rhythm, bold top-level sections. */
.myst-primary-sidebar-toc {
  font-size: 0.85rem;
}
.myst-primary-sidebar-toc .myst-toc-item {
  margin-top: 0.125rem;
  margin-bottom: 0.125rem;
}
.myst-primary-sidebar-toc a.myst-toc-item {
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}
.myst-primary-sidebar-toc .myst-toc-item > div {
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}
.myst-primary-sidebar-toc button svg {
  height: 1.1rem;
  width: 1.1rem;
}
/* Top-level sections (Agenda, Course Blocks, ...) in bold */
.myst-toc > div > .myst-toc-item {
  font-weight: 700;
}
/* book-theme marks the section containing the current page in blue; make it
   bold accent instead, and keep the page links themselves accented when active. */
.myst-primary-sidebar-toc .text-blue-800,
html.dark .myst-primary-sidebar-toc .dark\:text-blue-200 {
  color: var(--nbc-accent) !important;
  font-weight: 700;
}
.myst-primary-sidebar-toc a.myst-toc-item-exact,
.myst-primary-sidebar-toc a.myst-toc-item.active {
  color: var(--nbc-accent) !important;
  font-weight: 700;
}
/* The site title is already in the top bar; drop the duplicate
   root entry at the top of the sidebar. */
.myst-toc > a.myst-toc-item[title="Nanobeam 4DSTEM"] {
  display: none;
}
/* book-theme replays a height:0 -> full expand animation on every
   `data-state=open`; the sections start open, so kill the animation
   and make any real toggle instant. */
.myst-primary-sidebar-toc .collapsible-content {
  animation: none !important;
}

/* ---------- Hide the article-style frontmatter strip ---------- */
.myst-fm-block-header,
.myst-fm-block-date-doi,
header.myst-fm-authors-affiliations {
  display: none !important;
}

/* ---------- Landing page ---------- */
.nbc-hero {
  max-width: 34rem;
  margin: 1.5rem auto 0.5rem auto;
}
.nbc-hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}
.nbc-tagline {
  text-align: left;
  font-size: 1.15rem;
  opacity: 0.85;
  max-width: 46rem;
  margin: 1rem auto 1.5rem auto;
}

/* ---------- Home-page banner ---------- */
article:has(.nbc-home-banner) {
  width: 100%;
  max-width: none;
}
article:has(.nbc-home-banner) > :not(.nbc-home-banner) {
  grid-column: body;
}
.nbc-home-banner {
  display: block;
  grid-column: screen !important;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0 0 2rem;
  border-radius: 0;
}
@media (max-width: 700px) {
  .nbc-home-banner {
    margin-bottom: 1.5rem;
  }
}

/* ---------- Research themes ---------- */
.nbc-research-list {
  display: grid;
  width: calc(100% + 10rem);
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  margin: 1rem 0 2.5rem;
}
.nbc-research-card {
  display: grid;
  grid-template-columns: minmax(16rem, 2fr) minmax(0, 3fr);
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 18rem;
  overflow: hidden;
  border: 1px solid rgba(0, 63, 92, 0.2);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.08);
}
.nbc-research-card:nth-child(even) {
  grid-template-columns: minmax(0, 3fr) minmax(16rem, 2fr);
}
html.dark .nbc-research-card {
  border-color: rgba(0, 179, 255, 0.28);
  background: rgba(45, 111, 145, 0.12);
}
.nbc-research-image-placeholder,
.nbc-research-image {
  display: grid;
  grid-column: 1;
  grid-row: 1 / 3;
  min-height: 18rem;
  place-items: center;
  padding: 1rem;
  color: var(--nbc-accent);
  background: var(--nbc-highlight-soft);
  border-right: 2px dashed var(--nbc-highlight);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}
html.dark .nbc-research-image-placeholder,
html.dark .nbc-research-image {
  color: #003f5c;
  background: #dcecf3;
}
.nbc-research-image img {
  width: 90%;
  height: 90%;
  max-height: 18rem;
  object-fit: contain;
}
.nbc-research-image-cryo img,
.nbc-research-image-computational img,
.nbc-research-image-functional img {
  width: 90%;
  height: auto;
  max-height: none;
}
.nbc-research-image-placeholder p {
  margin: 0;
}
.nbc-research-card:nth-child(even) .nbc-research-image-placeholder,
.nbc-research-card:nth-child(even) .nbc-research-image {
  grid-column: 2;
  border-right: 0;
  border-left: 2px dashed var(--nbc-highlight);
}
.nbc-research-copy {
  display: flex;
  grid-column: 2;
  grid-row: 2;
  flex-direction: column;
  justify-content: flex-start;
  padding: 2rem;
}
.nbc-research-card > h2,
.nbc-research-card > h3 {
  align-self: end;
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding: 2rem 2rem 0.65rem;
  color: var(--nbc-accent);
  font-size: 1.35rem;
  line-height: 1.35;
}
.nbc-research-card:nth-child(even) > h2,
.nbc-research-card:nth-child(even) > h3,
.nbc-research-card:nth-child(even) > .nbc-research-copy {
  grid-column: 1;
}
.nbc-research-card > h2 + .nbc-research-copy,
.nbc-research-card > h3 + .nbc-research-copy {
  padding-top: 0;
}
.nbc-research-copy p {
  margin: 0;
  line-height: 1.65;
}
@media (max-width: 700px) {
  .nbc-research-list {
    width: 100%;
  }
  .nbc-research-card,
  .nbc-research-card:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    min-height: 0;
  }
  .nbc-research-image-placeholder,
  .nbc-research-image,
  .nbc-research-card:nth-child(even) .nbc-research-image-placeholder,
  .nbc-research-card:nth-child(even) .nbc-research-image {
    grid-column: 1;
    grid-row: auto;
    min-height: 14rem;
    border-right: 0;
    border-bottom: 2px dashed var(--nbc-highlight);
    border-left: 0;
  }
  .nbc-research-card > h2,
  .nbc-research-card > h3 {
    grid-column: 1;
    grid-row: auto;
    padding: 1.5rem 1.5rem 0.5rem;
  }
  .nbc-research-copy {
    grid-column: 1;
    grid-row: auto;
    padding: 1.5rem;
  }
}

/* ---------- Gallery ---------- */
.nbc-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
  margin: 1rem 0 2.5rem;
}
.nbc-gallery-grid > * {
  margin: 0;
}
.nbc-gallery-grid .nbc-gallery-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(0, 63, 92, 0.2);
  border-radius: 0.65rem;
  background: var(--nbc-highlight-soft);
  box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.1);
}
html.dark .nbc-gallery-grid .nbc-gallery-image {
  border-color: rgba(0, 179, 255, 0.28);
}

@media (max-width: 700px) {
  .nbc-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

/* Organizer list — compact row under the title */
.nbc-organizers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.5rem 0.75rem;
  margin: 0.75rem 0 1.25rem 0;
  font-size: 0.95rem;
}
.nbc-organizers p {
  margin: 0;
}

/* ---------- Team ---------- */
.nbc-team-profile-row {
  display: grid;
  width: calc(100% + 10rem);
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
  align-items: start;
  gap: 2.5rem;
  margin: 1.5rem 0;
}
.nbc-team-bio {
  max-width: 46rem;
  font-size: 0.925rem;
  line-height: 1.65;
}
.nbc-team-bio p:first-child {
  margin-top: 0;
}
@media (max-width: 700px) {
  .nbc-team-profile-row {
    width: 100%;
    grid-template-columns: minmax(0, 18rem);
    gap: 1.25rem;
  }
}
.nbc-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 18rem));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.nbc-team-card {
  overflow: hidden;
  border: 1px solid rgba(0, 63, 92, 0.2);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.08);
}
html.dark .nbc-team-card {
  border-color: rgba(0, 179, 255, 0.28);
  background: rgba(45, 111, 145, 0.12);
}
.nbc-team-card .nbc-team-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin: 0;
}
.nbc-team-card .nbc-team-logo {
  box-sizing: border-box;
  object-fit: contain;
  padding: 1.25rem;
  background: #fff;
}
.nbc-team-card h3 {
  margin: 0;
  padding: 1rem 1.1rem 1.1rem;
  color: var(--nbc-accent);
  font-size: 1.15rem;
}
.nbc-team-card:has(.nbc-team-links) h3 {
  padding-bottom: 0.35rem;
}
.nbc-team-card:has(.nbc-team-note) h3 {
  padding-bottom: 0.4rem;
}
.nbc-team-note {
  padding: 0 1.1rem 1.1rem;
  font-size: 0.9rem;
}
.nbc-team-note p {
  margin: 0;
}
.nbc-team-contact {
  padding: 0 1.1rem 0.35rem;
  font-size: 0.82rem;
}
.nbc-team-contact p {
  margin: 0;
}
.nbc-team-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 1.1rem 1.1rem;
}
.nbc-team-links p {
  display: contents;
}
.nbc-team-links a {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--nbc-accent);
  border-radius: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}
.nbc-team-links a:hover,
.nbc-team-links a:focus-visible {
  color: var(--nbc-highlight-contrast) !important;
  border-color: var(--nbc-highlight);
  background: var(--nbc-highlight);
}

/* ---------- Resources ---------- */
.nbc-resource-row {
  display: grid;
  grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
  margin: 1rem 0 2.5rem;
}
.nbc-user-program-row {
  width: calc(100% + 10rem);
  grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
  gap: 2.5rem;
}
.nbc-funding-row {
  width: calc(100% + 10rem);
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
  gap: 2.5rem;
}
.nbc-user-program-row .nbc-resource-copy,
.nbc-funding-row .nbc-resource-copy {
  max-width: 46rem;
}
.nbc-funding-row .nbc-resource-copy h3 {
  margin-top: 0;
}
.nbc-funding-institution {
  color: var(--nbc-accent);
  font-weight: 500;
}
.nbc-funding-collaborators {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0;
  line-height: 1.5;
}
.nbc-funding-logos {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  align-items: start;
  justify-items: center;
  gap: 0.75rem;
}
.nbc-funding-logos img {
  max-height: 9rem;
}
.nbc-mf-funding-logo {
  align-content: center;
  align-items: center;
}
.nbc-user-highlights-grid {
  display: grid;
  width: calc(100% + 10rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1rem 0 2.5rem;
}
.nbc-user-highlight-card {
  overflow: hidden;
  border: 1px solid rgba(0, 63, 92, 0.2);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.08);
}
html.dark .nbc-user-highlight-card {
  border-color: rgba(0, 179, 255, 0.28);
  background: rgba(45, 111, 145, 0.12);
}
.nbc-user-highlight-image-placeholder {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  padding: 1rem;
  color: var(--nbc-accent);
  background: var(--nbc-highlight-soft);
  border-bottom: 2px dashed var(--nbc-highlight);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}
.nbc-user-highlight-image-placeholder p {
  margin: 0;
}
.nbc-user-highlight-image {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid rgba(0, 63, 92, 0.2);
}
.nbc-user-highlight-image img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
}
.nbc-user-highlight-card > p {
  margin: 0;
  padding: 1rem 1rem 0;
  font-size: 0.9rem;
  line-height: 1.55;
}
.nbc-user-highlight-card > p:last-child {
  padding-bottom: 1rem;
  color: var(--nbc-accent);
  font-size: 0.82rem;
}
.nbc-resource-image-placeholder {
  display: grid;
  min-height: 11rem;
  place-items: center;
  padding: 1rem;
  color: var(--nbc-accent);
  background: var(--nbc-highlight-soft);
  border: 2px dashed var(--nbc-highlight);
  border-radius: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}
.nbc-resource-image {
  display: grid;
  min-height: 11rem;
  place-items: center;
  padding: 1rem;
  background: #fff;
  border: 1px solid rgba(0, 63, 92, 0.2);
  border-radius: 0.75rem;
}
.nbc-resource-image img {
  display: block;
  width: 100%;
  max-height: 15rem;
  margin: 0;
  object-fit: contain;
}
.nbc-resource-image img.nbc-maped-image {
  max-height: 24rem;
}
.nbc-user-program-row .nbc-resource-image {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  justify-items: center;
  gap: 1rem 1.25rem;
}
.nbc-user-program-row .nbc-mf-photo {
  grid-column: 1 / -1;
  height: auto;
  max-height: none;
  border-radius: 0.4rem;
  object-fit: contain;
}
.nbc-user-program-row .nbc-mf-logo,
.nbc-user-program-row .nbc-lbl-logo {
  width: 85%;
  height: 4rem;
  max-height: 4rem;
  object-fit: contain;
}
.nbc-resource-image-placeholder p,
.nbc-resource-copy p {
  margin: 0;
}
.nbc-resource-copy p + p {
  margin-top: 0.85rem;
}
.nbc-resource-copy {
  min-height: 11rem;
  padding: 1.25rem;
  border-left: 3px solid var(--nbc-highlight);
  background: var(--nbc-highlight-soft);
  border-radius: 0 0.5rem 0.5rem 0;
}
@media (max-width: 700px) {
  .nbc-resource-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  .nbc-user-program-row {
    width: 100%;
  }
  .nbc-funding-row {
    width: 100%;
  }
  .nbc-user-highlights-grid {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
  .nbc-resource-image-placeholder,
  .nbc-resource-image,
  .nbc-resource-copy {
    min-height: 8rem;
  }
}

/* ---------- Site footer ---------- */
footer.footer {
  display: flex !important;
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  min-height: 0;
  align-items: center;
  justify-content: flex-end;
  margin: 0 !important;
  padding: 0.2rem 1rem !important;
  background-color: #fff !important;
  background-image: linear-gradient(
    var(--nbc-highlight-soft),
    var(--nbc-highlight-soft)
  ) !important;
  box-shadow: none !important;
}
footer.footer > * {
  width: auto !important;
  margin-right: 0 !important;
  margin-left: auto !important;
}
body {
  padding-bottom: 2.35rem;
}
.nbc-site-footer-inner {
  display: flex;
  flex: 0 0 auto;
  width: auto;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  margin: 0 0 0 auto;
}
.nbc-site-footer-inner p {
  display: contents;
  margin: 0;
}
.nbc-site-footer-inner .nbc-footer-logo {
  display: block;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  margin: 0;
  object-fit: contain;
}
.nbc-site-footer-inner .nbc-footer-lbl-logo {
  margin-left: auto;
  height: 1.45rem;
}
.nbc-site-footer-inner .nbc-footer-mf-logo {
  height: 1.85rem;
  mix-blend-mode: multiply;
}

/* ---------- Search ----------
   The theme's dialog-based search is replaced at runtime (see
   scripts/patch_theme.py) with a flat input in the top bar. No overlay,
   no scroll lock, so opening it never shifts the page. */
.nbc-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;          /* allow the input to shrink inside the flex nav */
}
.nbc-search input {
  height: 2.5rem;
  width: 100%;
  max-width: 12rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  color: inherit;
  background: rgb(249, 250, 251);
  border: 1px solid rgb(209, 213, 219);
  border-radius: 0.5rem;
  outline: none;
  appearance: none;
}
html.dark .nbc-search input {
  background: rgb(55, 65, 81);
  border-color: rgb(75, 85, 99);
}
.nbc-search input::-webkit-search-cancel-button {
  appearance: none;
}
.nbc-search input:focus {
  border-color: var(--nbc-highlight);
  box-shadow: 0 0 0 1px var(--nbc-highlight);
}
@media (min-width: 640px) {
  .nbc-search input { max-width: 20rem; }
}
.nbc-search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1000;
  width: min(26rem, 90vw);
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.25rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}
html.dark .nbc-search-results {
  background: rgb(28, 25, 23);
  border-color: rgba(255, 255, 255, 0.18);
}
a.nbc-search-hit {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 0.35rem;
  color: inherit !important;
  text-decoration: none;
}
a.nbc-search-hit:hover,
a.nbc-search-hit.active {
  background: var(--nbc-highlight);
  color: var(--nbc-highlight-contrast) !important;
}
.nbc-search-hit-title {
  font-size: 0.85rem;
  font-weight: 600;
}
.nbc-search-hit-text {
  font-size: 0.78rem;
  opacity: 0.75;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Article heading spacing ----------
   With hide_title_block, the first heading otherwise sits flush
   against the top bar. */
article {
  padding-top: 1.75rem;
}

/* Instructors label on the landing page */
.nbc-instructors-label {
  margin: 1.25rem 0 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

/* ---------- Agenda table ---------- */
article table td,
article table th {
  vertical-align: top;
}
/* keep time ranges ("15:00 – 16:00") on one line */
article table td:first-child,
article table th:first-child {
  white-space: nowrap;
}
