:root {
  --dasp-logo-max-width: 140px;
}

/*
 * Shared safety cap for the current DASP logo. Existing component widths can
 * still make the logo smaller; this rule only prevents oversized rendering.
 */
img[src*="/homepage-assets/dasp/dasp-logo-new.png"] {
  max-width: var(--dasp-logo-max-width, 140px) !important;
  height: auto;
  object-fit: contain;
}

/* PV Allocator uses a wide logo in the open rail and a compact mark in it. */
.dasp-sidebar-brand {
  --dasp-logo-max-width: 128px;
}

body.dasp-sidebar-collapsed .dasp-sidebar-brand {
  --dasp-logo-max-width: 64px;
}

/* On mobile the sidebar behaves as a drawer, so both states share one cap. */
@media (max-width: 820px) {
  :root {
    --dasp-logo-max-width: 110px;
  }

  .dasp-sidebar-brand,
  body.dasp-sidebar-collapsed .dasp-sidebar-brand {
    --dasp-logo-max-width: 110px;
  }
}
